GDCE 2013 Shining The Light On Crysis 3
GDCE 2013 Shining The Light On Crysis 3
GDCE 2013 Shining The Light On Crysis 3
Presenter
Name
Pierre-Yves Donzallaz
Title
Sr. Lighting Artist, Crytek
Games
Pierre-Yves Donzallaz
Plan
Introduction Production Lighting basics Physics & Materials Real-Time Lighting Features Case Studies
Outdoor Lighting Indoor Lighting Cinematics
Conclusion
Pierre-Yves Donzallaz
Introduction
Crytek
Founded in 1999 Core pillars
Technology (CryENGINE) Content creation (Crysis, Ryse, Homefront 2, etc.) Publishing (GFACE)
Pierre-Yves Donzallaz
CryENGINE
Development time
+13 years
Platforms
PC & mobile Microsoft Xbox 360 & Xbox One Sony PS3 & PS4
Licensees
Games Military (simulation & training) Architecture (visualization) Etc.
Pierre-Yves Donzallaz
Pierre-Yves Donzallaz
Crysis Franchise
Type
First Person Shooter
Character
Super soldier equiped with a Nanosuit
Focus
Sandbox gameplay Visual experience
Pierre-Yves Donzallaz
Crysis Franchise
Trilogy
Crysis 1 (2007): Awakening of an ancient alien civilization on an island Crysis 2 (2011): Alien invasion in New York Crysis 3 (2013): Awakening and destruction of the alien boss in New York
Pierre-Yves Donzallaz
10
Production
Crysis 3 Focus
Improved graphics quality
Push the visual quality even further Set a new benchmark for next generation games
Improved gameplay
Bigger levels More variety
Environments Weapons Enemies
Pierre-Yves Donzallaz
12
Initial constaints
Smaller core team
~150 people on Crysis 2 ~100 people on Crysis 3 Frankfurt team
Handful of graphics programmers Dozen of environment artists Couple of level artists Couple of FX artists 1 lighting artist
Pierre-Yves Donzallaz
13
Initial constaints
Shorter production time
38 months for Crysis 2 23 months for Crysis 3
Pierre-Yves Donzallaz
14
Full production
Iterations and finalization
From white-box to final art
Pierre-Yves Donzallaz
15
Concept art
Art Direction
Crysis 1 meets Crysis 2
Natural settings
Overgrown urban environment Exremely dense vegetation Grass fields, rivers, jungles, etc.
Lighting
Dappled lighting Wet materials
Pierre-Yves Donzallaz
19
Full production
Overview
All levels in the production pipeline at the same time Sequential focus phases of 1 to 2 weeks for every level
Design pit (Level design director) Art pit (Art director) Optimization pit (RND)
Level 1
Design Pit
Art Pit
Optimization
Level 2
Level 3
Design Pit
Art Pit
Optimization
Design Pit
Art Pit
Optimization
No post-production
Lighting and FX on time
Level 4
Level N
Design Pit
Art Pit
Optimization
Design Pit
Art Pit
Post mortem
Tight production time Smooth and straightforward production Game delivered on time with a great art quality
Pierre-Yves Donzallaz
20
Lighting Basics
Lighting Basics
What makes lighting interesting?
Intention Contrast Directionality Depth
Pierre-Yves Donzallaz
22
Intention
Storytelling and emotions
Color temperature
Warm tones: happiness, hope, security, etc. Cold tones: sadness, danger, darkness, etc.
Fog
Low density: exploration, security, etc. High density: unknown, danger, etc.
Pierre-Yves Donzallaz
23
Shadows
Mediums
Highlights
Usual objective
Obtain a wide range and high contrasted picture
Narrow range
Pierre-Yves Donzallaz GDC Europe 2013
Wide range
24
Contrast
Low contrast
Pierre-Yves Donzallaz GDC Europe 2013
High contrast
25
Contrast
Low contrast
Pierre-Yves Donzallaz GDC Europe 2013
High contrast
26
Color Contrast
High contrast from complementary colors Commonly emphasized tones
Cold tones
Sky Shadows
Warm tones
Skin Fires & explosions
Pierre-Yves Donzallaz
27
Color Contrast
Pierre-Yves Donzallaz
29
Lighting Ratio
Relationship between light and darkness
Studio: key light and fill light Outdoor: sun light and shadows
1.5:1 (Overcast)
10:1 (Overdone)
Directionality
Position of the key light sources
Ensure proper lighting ratio Improvement of the player leading
Side (too high lighting ratio)
Depth
Layers with different values or steps Increased dimension factor
Separation Readability
High depth
36
Non-Metals Overview
Diffuse reflection
Specular reflection
Incident light
Pierre-Yves Donzallaz
48
Metals Overview
No diffuse reflection
Specular reflection
Incident light
Absorption No scattering
Pierre-Yves Donzallaz
50
Surface Roughness
Sharp reflections
Polished surface
Blurry reflections
Rough surface
Pierre-Yves Donzallaz GDC Europe 2013 51
Materials
Diffuse texture
Specular texture
Glossiness/roughness texture
Pierre-Yves Donzallaz
52
Specular Textures
Common mistakes
Total lack of consistency between the specular textures Specular texture created from a diffuse texture (grey-scale & high contrast)
Diffuse texture
Solution
Physically-based approach
Pierre-Yves Donzallaz GDC Europe 2013 53
Augustin-Jean Fresnel
The stronger the angle of incidence of the light, the stronger the reflection.
Augustin-Jean Fresnel (17881827)
Image credit: Wikipedia
Pierre-Yves Donzallaz GDC Europe 2013 54
Fresnel Effect
Reflection Coefficients
Metals
Non-metals
Pierre-Yves Donzallaz
56
Specular color
Non-metals: grey-scaled Metals: slightly colored (gold, copper, nickel)
Non-metals
Metals
Pierre-Yves Donzallaz
57
Pierre-Yves Donzallaz
58
Glossiness\Roughness
Roughness defined by a value [0;255]
Uniform roughness
Matte 0 Rough Polished Mirror 255
Glossiness range
Specular texture
Glossiness texture
59
Diffuse Textures
Common mistakes
Visible light & shadows Too strong ambient occlusion Too high contrast
Solution
Lighting control during capture Calibration during and after capture
Diffuse Textures\Capture
Minimize lighting information in the textures
Prevent strong direct light Ensure neutral color balance Ensure flat consistent lighting
Bright daylight
Pierre-Yves Donzallaz
Overcast
Image credits: Richard Yot, www.itchy-animation.co.uk
61
Diffuse Textures\Calibration
Shoot reference with color checker Automated or manual software correction
Vegetation
Mud
Rust
Metal
Rusty stone
Concrete
Bricks
Average
Mirror
Pierre-Yves Donzallaz
65
Pierre-Yves Donzallaz
67
Lighting calibration
Gamma chart and color gradient chart
Control lighting influence on the textures Control Post FX influence on the colors and white balance Prevent clipping of the blacks and whites
Pierre-Yves Donzallaz
69
Lighting calibration
Pierre-Yves Donzallaz
70
Monitors
Ensure all artists work with proper monitors (IPS, *VA or PLS panels)
Most televisions
- Terrible color settings with dynamic contrast & sharpening - Reduced output range (16-240 or 16-235) - HDMI mess in consoles settings (Standard, Extended, etc.) + Acceptable Cinema settings
Pierre-Yves Donzallaz
72
Real-Time lighting
Real-time, all the time
HDR Lighting, shadows & atmosphere HDR Image-based lighting Ambient occlusion Global illumination
Pierre-Yves Donzallaz
74
Rendering Techniques
Forward rendering
Every object shaded sequentially Multiple passes required for multiple light sources Issues
Waste of resources on pixels covered by multiple objects Waste of resources complex scenes (many objects and lights)
Deferred rendering
Geometry and lighting data extracted from the scene G-Buffer (geometry) and L-Buffer (lighting) Every pixel shaded in one pass Issues
Forward passes required for complex shaders and transparency Difficulty to exclude lights from certain objects or areas
Complexity
Amount of geometries * amount of lights
Complexity
Amount of pixels * amount lights
Typical usage
World with low light sources usage (sun) Older hardware (no MRTs support)
Typical usage
Lighting heavy scenes (interior)
Pierre-Yves Donzallaz
75
Deferred rendering
Hybrid deferred rendering in CryENGINE
Most of the shading processed in one single pass (opaque geometry) Forward pass still required for transparency & complex shaders (hair & skin)
Final frame
Pierre-Yves Donzallaz GDC Europe 2013
Deferred rendering\G-Buffer
Specular (B)
Depth
Normals (RG)
Pierre-Yves Donzallaz
Glossiness (B)
GDC Europe 2013
Translucency (A)
77
HDR Lighting
High precision
PC/ PS3 : FP16 Xbox 360: FP10
Large range
Many F-stops Nearly zero banding
Pierre-Yves Donzallaz
78
Pierre-Yves Donzallaz
79
Pierre-Yves Donzallaz
80
Pierre-Yves Donzallaz
81
Environment probe
Capture of the lighting in an HDR image
Reflections (specular component) Ambient (diffuse component)
Workflow
1. Placement of the probe in a key location
Center of rooms and outdoor areas Corners and edges of large areas Areas with strong light variations Area with sensitive materials (strong specular luminance & glossiness)
2. In-editor generation of an HDR cubemap texture (6 faces) 3. Rendering using a spherical or parallelepiped volume
Pierre-Yves Donzallaz
83
Environment Probes\Cubemap
Pierre-Yves Donzallaz
84
Sun Shadows
Cascades shadowmapping
6 sun cascades Closer cascades to the camera have higher resolutions Possible shadow map acne on higher cascades
Vegetation on
Pierre-Yves Donzallaz GDC Europe 2013
Vegetation off
87
Ambient Occlusion
Simulation of light accessibility Screen Space Ambient Occlusion
Compute the occlusion amount of random pixels on the screen Developed for Crysis 1 (2007) Improved for Crysis 2 (2011) Low performance cost (consoles)
Pierre-Yves Donzallaz
89
No Ambient Occlusion
No Ambient Occlusion
Ambient Occlusion
Screen space techniques
Dumb occlusion
Total ignorance about objects outside the screen or behind the camera
Pierre-Yves Donzallaz
97
Default Lighting
SSDO
Sun Light
Manual darkening
Global Illumination
Pros
Dynamic GI for outdoor environment Decent results in noisy environment
Cons
Unusable for interior lighting Low precision and highly inconsistent No automated occlusion (leaking)
Pierre-Yves Donzallaz
105
No global illumination
Global illumination
No global illumination
Global illumination
Time of Day
Outdoor lighting tool
Keyframe-based 24 hours cycle Moving sun ~100 parameters Sun & sky light Fog & HDR skybox Post-processing
Tone mapping & eye adaption Color balance Photo filter
Pierre-Yves Donzallaz
114
Sun position
Crysis 1
Mix of static and moving sun Ideal for semi-open world environment
Crysis 2 & 3
Scripted sun position
Up to 10 static sun positions per level Sun coordinates changed in streaming tunnels
Pierre-Yves Donzallaz
116
Photo-based hemispheres
+ Best visual result + Compatible with procedural skybox - Sun shading
Cloud billboards/decals
+ High flexibility for cloud placement + Compatible with procedural skybox - Alpha-blending overhead
Pierre-Yves Donzallaz
117
Sky System
Technologies
Procedural HDR skybox Alpha-blended HDR clouds hemispheres Tileable cloud shadows
Dynamism
Moving clouds Moving cloud shadows No more old gen static painted skyboxes!
Pierre-Yves Donzallaz
118
Sky Domes
Main sky dome
Detailed clouds Limited rotation angle
Preservation of sun shading
Pierre-Yves Donzallaz
119
Cloud Shadows
Revived technology from Crysis 1
Scrolling tileable texture High tiling to maximize shadows variation on the ground Black clamped to grey to prevent too dark shadows
Pros
Give more life to the environment Leading the player in the right direction
Cons
Inconsistent with the actual clouds hemispheres
Cons
Strong limitation for low end platforms
Amount of lights Radius Shadow casting Overlapping
Case study
Outdoor Lighting
Technique used
Light subtraction
Pierre-Yves Donzallaz
123
Flat lighting
SSDO
Height-based ambient
Darkening (helpers)
Final (PC)
Console
20 lights @ 6 ms
Pierre-Yves Donzallaz
141
Case study
Indoor Lighting
Pierre-Yves Donzallaz
143
Final
Flat Ambient
Darkening
Prefab creation
Prefab
Prefab editing
Prefab editing
Reference materials
Local probe
Final (PC)
Console
90 lights @ 10 ms
Pierre-Yves Donzallaz
158
Case study
Cinematics
Cinematic in Crysis
First person perspective only
Very limited player camera control
Pierre-Yves Donzallaz
160
Pierre-Yves Donzallaz
161
Psycho
Claire
Rash
No character lighting
Key light
Back light
Fill light 1
Fill light 2
No character lighting
Back light
Fill light
Key light
Fill light
Back light
Key light
Key light
Fill light
Conclusion
Lighting Statistics
8 levels
2043 prefabs
604 light clipping volumes
GDC Europe 2013 183
Special Thanks
Tiago Sousa, Principal Graphics Engineer Carsten Wenzel, Technical Director Magnus Larbrant, Senior Art Director Entire Crytek team
Pierre-Yves Donzallaz
185
We are hiring!
http://www.crytek.com/career
Questions?
Pierre-Yvez Donzallaz
Mail: pierre@crytek.com Twitter: @pydon