SlideShare a Scribd company logo
Crysis 2 &
CryENGINE 3
Key Rendering Features
Tiago Sousa, Principal R&D Graphics Engineer
1 Introduction ..................................................................................................................... 3
2 Gamma Correct HDR Rendering ...................................................................................... 4
3 Lighting............................................................................................................................. 6
4 Shadows........................................................................................................................... 8
5 Screen Space AO and GI................................................................................................. 10
6 Deferred Decals.............................................................................................................. 13
7 Characters Rendering..................................................................................................... 14
8 Water Rendering............................................................................................................ 15
9 Postprocessing............................................................................................................... 17
10 Anti-Aliasing................................................................................................................... 19
11 System Specs and Colors................................................................................................ 22
12 Sys Specs and Performance ........................................................................................... 24
13 PC vs. Consoles............................................................................................................... 28
14 Stereo Rendering ........................................................................................................... 29
15 Pushing the Limits.......................................................................................................... 30
16 Conclusion...................................................................................................................... 31
Introduction
3
1 Introduction
Crysis 2 posed one of the biggest challenges Crytek's R&D department has ever faced:
develop a multi-platform engine and ship a game simultaneously on PC, Xbox 360 and
PlayStation 3.
After developing a cutting edge PC engine, having to re-adjust the technology to run
efficiently on consoles, where memory is one of the biggest limitations, and maintaining
scalability for the next engine iteration, was an incredible achievement.
A huge engineering effort was required in order to run Crysis 2 on console hardware: a new
streaming system, refactoring of many modules (physics, animation and renderer), low level
CPU/GPU and multi-core optimizations, etc.
This article covers a small subset of this amazing team effort, which made CryENGINE 3 and
Crysis 2 run and look great on all main platforms. Hence, we will get into a couple of key
rendering features that have made the difference.
Gamma Correct HDR Rendering
4
2 Gamma Correct HDR Rendering
CryENGINE has supported High Dynamic Range since its first version. For CryENGINE 3, we
added gamma correct rendering, among other changes in order to efficiently support each
individual platform. The PC specs feature the best HDR quality available due to the general
and fast support of FP16 render target formats.
One of the main benefits of HDR rendering is a much bigger color range and precision, which
can easily prevent unattractive color clamping and banding visible in many current games.
Those visual artifacts are usually a major issue for art departments using LDR rendering.
Gamma Correct HDR Rendering
5
The following example illustrates an extreme situation with a dark foggy environment and a
strong sun light, in both LDR and HDR rendering:
Notice the limited color range and obvious clipping in LDR: the highlights are clipped and the
dark areas lack detail.
HDR rendering also opens the door to a multitude of physically-based post processing
effects, such as eye adaptation, bloom, flares/streaks, motion blur, depth of field, grain, etc.
Lighting
6
3 Lighting
In CryENGINE 3, all lights are dynamic and deferred. Therefore, we have a very slim G-Buffer,
composed of normals/depth, used later in the 3D pipeline for several purposes. The deferred
lighting accumulation is done in HDR on all platforms. Among several techniques, every
surface has reflection map applied to it through deferred specular HDR cube maps.
Lighting
7
Shadows
8
4 Shadows
Shadows are fully dynamic on all specs. A large view distance is used for the sun cascaded
shadowmap. Shadows are updated every frame on PC and are amortized over frames on
consoles.
On PC high specs, almost every single light projector or main light source casts shadows. On
consoles, the amount of lights casting shadows is limited for performance reasons.
Shadows
9
Screen Space AO and GI
10
5 Screen Space AO and GI
Crytek’s invention, the SSAO, is back and improved using temporal accumulation for
enhanced quality on consoles. On high specs, we also use full resolution target and a 2 layers
approach for capturing high frequency detail normals.
For the final lighting touch, we also use our own custom realtime global illumination solution
in addition to standard deferred lights.
Screen Space AO and GI
11
Screen Space AO and GI
12
Deferred Decals
13
6 Deferred Decals
The deferred decals are memory-friendly (memory being the most important resource on
consoles) and improve CPU/GPU performance. Another benefit is the superior projection
quality.
In essence, they work very similarly to light projectors and have comparable drawbacks,
since handling moving geometry is troublesome and requires additional work.
Characters Rendering
14
7 Characters Rendering
Character rendering techniques taking advantage of deferred lighting on all platforms were
researched and implemented, such as deferred skin rendering, hair and fur, eyes, cloth, etc.
We developed the skin rendering with screen space sub-surface scattering and self-
shadowing. The rendering cost is proportional to the amount of screen coverage from
geometry versus the usual approaches using UV space sub-surface scattering. The latter
adds an extra constant cost per-character and can be prohibitive for consoles, performance
and memory-wise.
Another improvement is the alpha tested smoothing for hair rendering with anisotropic
shading for all platforms. It avoids artifacts due to alpha blended approximation issues (for
instance shadows and volumetric fog artifacts).
Water Rendering
15
8 Water Rendering
This was primarily the same water rendering approach as in Crysis 1 (the different look is
mostly due to cityscape environments instead of tropical environments). We use FFT based
normal map using cheap parallax approximation for consoles, and vertex displacement
mapping for PC specs. Currently, FFT simulation is done on CPU on its own dedicated thread.
We developed dynamic interaction with wave propagation on all platforms, using vertex
displacement version for PC specs. It is worth mentioning that water wave propagation
simulation is done on GPU with a cost of just 0.2 ms on consoles and negligible cost on PC
specs.
Water Rendering
16
Deferred caustics rendering on all platforms, and panoply of other effects from Crysis 1, like
volumetric god rays, water droplets and foam, also made their way onto consoles.
Postprocessing
17
9 Postprocessing
The camera motion blur was greatly improved over Crysis 1. For example, we no longer use
the “sphere” around camera approach: we now do a proper re-projection. This allows for a
far more accurate motion blur result based on how much a pixel has moved. Object motion
blur is supported on all platforms as well as bokeh depth of field.
All post processes are done in HDR, before tone mapping. This allows us to retain bright
streaks, which are not commonly used in current-gen games, besides Crysis 1. This is
performed on every platform and implemented for optimal performance by batching all
Postprocessing
18
techniques in one, costing around 1ms on console platforms. For higher PC specs, we use
FP16 formats with additional taps for improved quality.
Anti-Aliasing
19
10 Anti-Aliasing
Although many multiplatform engines often do not use AA on certain platforms, CryENGINE
3 uses a form of amortized MSAA reminiscent of OpenGL accumulation buffer approaches,
called Post MSAA.
Such an approach works by accumulating sub-samples over frames and reprojecting them to
the current frame. It should not be confused with “temporal antialiasing” commonly used on
60 fps games that simply do a linear blending and hence have ghosting for every pixel.
The Post MSAA approach is very general and allows for a sub-pixel accuracy solution on all
platforms at a cost of just 1ms on consoles, and less than 0.2 ms on PCs at 1080p
resolutions.
Due to its sub-pixel accuracy, it minimizes moiré patterns and visible shimmering on surfaces
with high frequency characteristics (fences, grids, etc) commonly visible in EdgeAA/MLAA or
similar techniques. It works on alpha tested geometry, and performs shader anti-aliasing i.e.
on surfaces using Parallax Occlusion mapping, or similar aliasing prone techniques. It also
performs post-tone mapping without damaging HDR quality on high contrast areas like
regular hardware MSAA approaches (pre-dx11).
Such a technique is quite a novelty in the video game industry and it’s very likely Crytek will
release improved versions as it has potential to also be merged with different techniques -
for example, it’s currently also combined with Nvidia’s FXAA in “Extreme” spec, in order to
improve quality further with sub-pixel accuracy results from post MSAA.
Anti-Aliasing
20
Anti-Aliasing
21
System Specs and Colors
22
11 System Specs and Colors
Besides resolution differences and a couple of custom view distances variations across
platforms, we achieved an exact platform image color output on all platforms in the final
shipped version of Crysis 2.
Multiplatform games usually look “darker” on Xbox 360. This is due to the console hardware
performing an additional TV gamma correction step, besides other details, when using
gamma correction. Unfortunately this is not a standard; no other hardware does this, so we
decided on matching X360 output to PC and PS3 platforms instead.
System Specs and Colors
23
Any color/contrast/brightness differences are most likely due to an improper HDMI setup for
the user's display. To ensure a correct set-up, the user can follow these simple steps:
1. If the TV supports HDMI 1.3 or higher:
 360: pick “Expanded” in console dashboard display setup, in reference levels
 Ps3: enable “RGB full range” in console display setup
 If incorrect settings are used, the brightness calibration icon might be always
visible (too bright), resulting in a lack of contrast (insufficient darks) and
visible (color) banding. This very likely also means the TV does NOT support
HDMI 1.3 and higher, or is not properly detected by hardware.
2. If the TV does not support HDMI 1.3 or higher:
a. 360: pick “Standard” on console dashboard display setup, in reference levels
b. Ps3: disable “RGB Full range” in console display setup
c. If the user has the wrong setting, the brightness calibration icon will always
not be visible, or almost invisible, resulting in crushed darks.
3. Another common mistake from users is not picking the correct resolution to match
the display's native resolution, resulting in an additional image upsample from the
TV. If the display monitor's native resolution is 1080p, the user should pick it as
default on either XBox 360 or PS3.
Sys Specs and Performance
24
12 Sys Specs and Performance
Although it is common practice for multiplatform engines to disable certain rendering
features depending on hardware strengths or weaknesses, in CryENGINE3 most rendering
code is designed to be general, shared and optimal for consoles. For example, all post
processes use exactly the same code path. We also scale the quality up for higher PC specs.
Due to a lot of hard work and heavy optimization on GPU/CPU side since Crysis 1, every spec
on PC should mostly play at 60 fps at 1080p assuming the user selects the right sys spec for
his machine and has a fast enough CPU.
In Crysis 1, a relatively brute force approach was used, where all features on lowest settings
would be completely turned off, including HDR rendering, shadows and all post processes.
Users were also forced to use lower resolutions for improving performance, which meant a
lot of our low end hardware owners would not be able to achieve a decent visual experience
of our game at good frame rates. Running Crysis 1 at HD resolutions on highest end
hardware in 2007 was simply not possible.
Sys Specs and Performance
25
This time around, throughout the entire project, we dedicated a lot of effort to optimization.
All features are present across all system specs, including HDR rendering, shadows, motion
blur, SSAO, Depth of field and post MSAA. Anisotropic filtering is also used on every system
spec, and users can now experience a great gaming experience at 60 fps on PC at HD
resolutions, including stereo mode. It should be noted that most other games rely on having
completely pre-baked lighting, no HDR rendering and dynamic shadows limited to a few
items such as characters, in order to offer a 60 fps experience.
This effort made our lowest specification equal in many aspects and even superior to
CryENGINE 2 High specs. The biggest differences from Crysis 1 to Crysis 2 are the vastly
improved dynamic lighting and shadowing and highly improved image quality. For this
reason, the lowest available spec on PC in Crysis 2 is “High Spec” and the highest spec is
“Extreme”.
Sys Specs and Performance
26
Sys Specs and Performance
27
With higher system specs, more samples or high resolutions are used on certain effects like
shadows/post processes/MSAA. Certain features get enabled such as rigid body water
simulation or vertex displacement for water. On higher PC specs, we naturally find much
more lights casting shadows, more particles and higher view distances for all geometries,
lights and shadows.
PC vs. Consoles
28
13 PC vs. Consoles
The lowest PC spec, “High”, is almost the same as the spec used on consoles, besides per-
platform differences, such as different texture formats for render targets and different
normal map formats on PS3 due to lack of 3Dc support. PC specs also feature improved
texture quality, since we do not use streaming for PC due to the vast memory resources
available. Anisotropic filtering is enabled for all specs, while on PS3 it is dynamically adjusted
and goes up to 16x anisotropic, and on Xbox 360 it is limited to 4x anisotropic in order to
reduce the performance cost.
Stereo Rendering
29
14 Stereo Rendering
On consoles, CryENGINE 3 supports a performance-optimal approach for Stereo, based on
depth reconstruction, which allows us to maintain visual quality without having to
dramatically decrease the resolution and the rendering view distances, as seen in many
other recent console games.
Due to such increased quality on consoles, and with a careful setup of the 3d HUD and a
wide range of stereo settings, we provide one of the most comfortable stereo experiences
available on the market. Most players will be able to play continuously without eye straining,
compared to other techniques which rely on drastically decreasing the image quality.
Additionally, the engine supports real dual stereo (also anaglyph mode for debugging), which
is likely to be exposed for Crysis 2 in later patches for PC specs.
Pushing the Limits
30
15 Pushing the Limits
It should be noted that many of these key features are novelties for all platforms and were
invented and iterated already by the end of Crysis 1's development (2007): screen space
scattering and self-shadowing, PostMSAA (every marketing screenshot features it), deferred
caustics/rain approximation, realtime GI, Stereo Rendering, alpha test smoothing, batched
HDR post processing and of course our famous SSAO which gave birth to a multitude of
screen space algorithms like SSGI/SS Reflections and similar. More in depth technical details
will very likely be revealed in the upcoming months.
There are obviously many other important features that contributed to Crysis2 from a
performance perspective. Our GPU based occlusion buffer and conditional rendering allow
us to significantly reduce the amount of drawcalls on consoles, thanks to a lower GPU and
CPU overhead. Crysis 2 also includes all the other well known features from CryENGINE 2,
such as our Time of Day system combined with our volumetric fog. New visual features like
the HDR flares/streaks, the color grading, the multiple shading models support or the post-
processed HUD also helped improve the look of our graphically acclaimed Crysis 2 title.
Conclusion
31
16 Conclusion
The key rendering features showcased in this article are the result of almost three years of
extremely hard multiplatform development, involving a lot of nights and weekends spent at
the office for many of the Crytek team members. We hope that literally everyone, on any
console platform or any PC spec, will appreciate the end result of our efforts as much as we
enjoyed working on our latest game and engine iteration. All of these features are about to
be made available to our engine licensees in CryENGINE 3.3.
A big thanks to the entire Crytek team, especially our great R&D graphics programming
team, and everyone that contributed to this short but hopefully insightful article; to Michael
Endres, Martin Lancaster, and in particular to our Lighting Artist Pierre-Yves Donzallaz for his
helpful article review, awesome screenshots, and for always showing our technology in the
best possible light.
Tiago Sousa
Principal R&D Graphics Engineer

More Related Content

What's hot

Rendering AAA-Quality Characters of Project A1
Rendering AAA-Quality Characters of Project A1Rendering AAA-Quality Characters of Project A1
Rendering AAA-Quality Characters of Project A1
Ki Hyunwoo
 
Lighting the City of Glass
Lighting the City of GlassLighting the City of Glass
Lighting the City of Glass
Electronic Arts / DICE
 
Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)
Tiago Sousa
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics Technology
Tiago Sousa
 
CryENGINE 3 Rendering Techniques
CryENGINE 3 Rendering TechniquesCryENGINE 3 Rendering Techniques
CryENGINE 3 Rendering Techniques
Tiago Sousa
 
Rendering Tech of Space Marine
Rendering Tech of Space MarineRendering Tech of Space Marine
Rendering Tech of Space Marine
Pope Kim
 
Moving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based RenderingMoving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based Rendering
Electronic Arts / DICE
 
Hable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr LightingHable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr Lighting
ozlael ozlael
 
Lighting of Killzone: Shadow Fall
Lighting of Killzone: Shadow FallLighting of Killzone: Shadow Fall
Lighting of Killzone: Shadow Fall
Guerrilla
 
Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Physically Based Sky, Atmosphere and Cloud Rendering in FrostbitePhysically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Electronic Arts / DICE
 
Calibrating Lighting and Materials in Far Cry 3
Calibrating Lighting and Materials in Far Cry 3Calibrating Lighting and Materials in Far Cry 3
Calibrating Lighting and Materials in Far Cry 3
stevemcauley
 
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)Johan Andersson
 
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
Electronic Arts / DICE
 
Penner pre-integrated skin rendering (siggraph 2011 advances in real-time r...
Penner   pre-integrated skin rendering (siggraph 2011 advances in real-time r...Penner   pre-integrated skin rendering (siggraph 2011 advances in real-time r...
Penner pre-integrated skin rendering (siggraph 2011 advances in real-time r...JP Lee
 
Frostbite on Mobile
Frostbite on MobileFrostbite on Mobile
Frostbite on Mobile
Electronic Arts / DICE
 
Siggraph2016 - The Devil is in the Details: idTech 666
Siggraph2016 - The Devil is in the Details: idTech 666Siggraph2016 - The Devil is in the Details: idTech 666
Siggraph2016 - The Devil is in the Details: idTech 666
Tiago Sousa
 
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...Johan Andersson
 
DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering in Battlefield 3DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering in Battlefield 3
Electronic Arts / DICE
 
An introduction to Realistic Ocean Rendering through FFT - Fabio Suriano - Co...
An introduction to Realistic Ocean Rendering through FFT - Fabio Suriano - Co...An introduction to Realistic Ocean Rendering through FFT - Fabio Suriano - Co...
An introduction to Realistic Ocean Rendering through FFT - Fabio Suriano - Co...
Codemotion
 
Colin Barre-Brisebois - GDC 2011 - Approximating Translucency for a Fast, Che...
Colin Barre-Brisebois - GDC 2011 - Approximating Translucency for a Fast, Che...Colin Barre-Brisebois - GDC 2011 - Approximating Translucency for a Fast, Che...
Colin Barre-Brisebois - GDC 2011 - Approximating Translucency for a Fast, Che...
Colin Barré-Brisebois
 

What's hot (20)

Rendering AAA-Quality Characters of Project A1
Rendering AAA-Quality Characters of Project A1Rendering AAA-Quality Characters of Project A1
Rendering AAA-Quality Characters of Project A1
 
Lighting the City of Glass
Lighting the City of GlassLighting the City of Glass
Lighting the City of Glass
 
Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics Technology
 
CryENGINE 3 Rendering Techniques
CryENGINE 3 Rendering TechniquesCryENGINE 3 Rendering Techniques
CryENGINE 3 Rendering Techniques
 
Rendering Tech of Space Marine
Rendering Tech of Space MarineRendering Tech of Space Marine
Rendering Tech of Space Marine
 
Moving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based RenderingMoving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based Rendering
 
Hable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr LightingHable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr Lighting
 
Lighting of Killzone: Shadow Fall
Lighting of Killzone: Shadow FallLighting of Killzone: Shadow Fall
Lighting of Killzone: Shadow Fall
 
Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Physically Based Sky, Atmosphere and Cloud Rendering in FrostbitePhysically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite
 
Calibrating Lighting and Materials in Far Cry 3
Calibrating Lighting and Materials in Far Cry 3Calibrating Lighting and Materials in Far Cry 3
Calibrating Lighting and Materials in Far Cry 3
 
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
 
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
 
Penner pre-integrated skin rendering (siggraph 2011 advances in real-time r...
Penner   pre-integrated skin rendering (siggraph 2011 advances in real-time r...Penner   pre-integrated skin rendering (siggraph 2011 advances in real-time r...
Penner pre-integrated skin rendering (siggraph 2011 advances in real-time r...
 
Frostbite on Mobile
Frostbite on MobileFrostbite on Mobile
Frostbite on Mobile
 
Siggraph2016 - The Devil is in the Details: idTech 666
Siggraph2016 - The Devil is in the Details: idTech 666Siggraph2016 - The Devil is in the Details: idTech 666
Siggraph2016 - The Devil is in the Details: idTech 666
 
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...
 
DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering in Battlefield 3DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering in Battlefield 3
 
An introduction to Realistic Ocean Rendering through FFT - Fabio Suriano - Co...
An introduction to Realistic Ocean Rendering through FFT - Fabio Suriano - Co...An introduction to Realistic Ocean Rendering through FFT - Fabio Suriano - Co...
An introduction to Realistic Ocean Rendering through FFT - Fabio Suriano - Co...
 
Colin Barre-Brisebois - GDC 2011 - Approximating Translucency for a Fast, Che...
Colin Barre-Brisebois - GDC 2011 - Approximating Translucency for a Fast, Che...Colin Barre-Brisebois - GDC 2011 - Approximating Translucency for a Fast, Che...
Colin Barre-Brisebois - GDC 2011 - Approximating Translucency for a Fast, Che...
 

Similar to Crysis 2-key-rendering-features

Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]
ozlael ozlael
 
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...Johan Andersson
 
Cloud Graphical Rendering: A New Paradigm
Cloud Graphical Rendering:  A New ParadigmCloud Graphical Rendering:  A New Paradigm
Cloud Graphical Rendering: A New Paradigm
Joel Isaacson
 
Killzone Shadow Fall Demo Postmortem
Killzone Shadow Fall Demo PostmortemKillzone Shadow Fall Demo Postmortem
Killzone Shadow Fall Demo Postmortem
Guerrilla
 
NVIDIA Graphics, Cg, and Transparency
NVIDIA Graphics, Cg, and TransparencyNVIDIA Graphics, Cg, and Transparency
NVIDIA Graphics, Cg, and Transparency
Mark Kilgard
 
The Rendering Pipeline - Challenges & Next Steps
The Rendering Pipeline - Challenges & Next StepsThe Rendering Pipeline - Challenges & Next Steps
The Rendering Pipeline - Challenges & Next Steps
Johan Andersson
 
OpenGL ES and Mobile GPU
OpenGL ES and Mobile GPUOpenGL ES and Mobile GPU
OpenGL ES and Mobile GPU
Jiansong Chen
 
new_age_graphics_android_x86
new_age_graphics_android_x86new_age_graphics_android_x86
new_age_graphics_android_x86Droidcon Berlin
 
UHK-430 White paper
UHK-430 White paperUHK-430 White paper
UHK-430 White paperKris Hill
 
Lightspeed Preprint
Lightspeed PreprintLightspeed Preprint
Lightspeed Preprintjustanimate
 
Gpu presentation
Gpu presentationGpu presentation
Gpu presentation
spartasoft
 
XLcloud 3-d remote rendering
XLcloud 3-d remote renderingXLcloud 3-d remote rendering
XLcloud 3-d remote rendering
Marius Preda PhD
 
thu-blake-gdc-2014-final
thu-blake-gdc-2014-finalthu-blake-gdc-2014-final
thu-blake-gdc-2014-finalRobert Taylor
 
Graphics pipelining
Graphics pipeliningGraphics pipelining
Graphics pipelining
Areena Javed
 
Amd future of gp us - campus party
Amd   future of gp us - campus partyAmd   future of gp us - campus party
Amd future of gp us - campus partyCampus Party Brasil
 
GS-4152, AMD’s Radeon R9-290X, One Big dGPU, by Michael Mantor
GS-4152, AMD’s Radeon R9-290X, One Big dGPU, by Michael MantorGS-4152, AMD’s Radeon R9-290X, One Big dGPU, by Michael Mantor
GS-4152, AMD’s Radeon R9-290X, One Big dGPU, by Michael Mantor
AMD Developer Central
 
Anti-Aliasing Methods in CryENGINE 3
Anti-Aliasing Methods in CryENGINE 3Anti-Aliasing Methods in CryENGINE 3
Anti-Aliasing Methods in CryENGINE 3Tiago Sousa
 
How to Choose Mobile Workstation? VR Ready
How to Choose Mobile Workstation? VR ReadyHow to Choose Mobile Workstation? VR Ready
How to Choose Mobile Workstation? VR Ready
NVIDIA Taiwan
 
Technologies Used In Graphics Rendering
Technologies Used In Graphics RenderingTechnologies Used In Graphics Rendering
Technologies Used In Graphics Rendering
Bhupinder Singh
 

Similar to Crysis 2-key-rendering-features (20)

Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]
 
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
 
Cloud Graphical Rendering: A New Paradigm
Cloud Graphical Rendering:  A New ParadigmCloud Graphical Rendering:  A New Paradigm
Cloud Graphical Rendering: A New Paradigm
 
Killzone Shadow Fall Demo Postmortem
Killzone Shadow Fall Demo PostmortemKillzone Shadow Fall Demo Postmortem
Killzone Shadow Fall Demo Postmortem
 
NVIDIA Graphics, Cg, and Transparency
NVIDIA Graphics, Cg, and TransparencyNVIDIA Graphics, Cg, and Transparency
NVIDIA Graphics, Cg, and Transparency
 
The Rendering Pipeline - Challenges & Next Steps
The Rendering Pipeline - Challenges & Next StepsThe Rendering Pipeline - Challenges & Next Steps
The Rendering Pipeline - Challenges & Next Steps
 
OpenGL ES and Mobile GPU
OpenGL ES and Mobile GPUOpenGL ES and Mobile GPU
OpenGL ES and Mobile GPU
 
new_age_graphics_android_x86
new_age_graphics_android_x86new_age_graphics_android_x86
new_age_graphics_android_x86
 
UHK-430 White paper
UHK-430 White paperUHK-430 White paper
UHK-430 White paper
 
Lightspeed Preprint
Lightspeed PreprintLightspeed Preprint
Lightspeed Preprint
 
Gpu presentation
Gpu presentationGpu presentation
Gpu presentation
 
XLcloud 3-d remote rendering
XLcloud 3-d remote renderingXLcloud 3-d remote rendering
XLcloud 3-d remote rendering
 
thu-blake-gdc-2014-final
thu-blake-gdc-2014-finalthu-blake-gdc-2014-final
thu-blake-gdc-2014-final
 
Graphics pipelining
Graphics pipeliningGraphics pipelining
Graphics pipelining
 
Amd future of gp us - campus party
Amd   future of gp us - campus partyAmd   future of gp us - campus party
Amd future of gp us - campus party
 
GS-4152, AMD’s Radeon R9-290X, One Big dGPU, by Michael Mantor
GS-4152, AMD’s Radeon R9-290X, One Big dGPU, by Michael MantorGS-4152, AMD’s Radeon R9-290X, One Big dGPU, by Michael Mantor
GS-4152, AMD’s Radeon R9-290X, One Big dGPU, by Michael Mantor
 
Anti-Aliasing Methods in CryENGINE 3
Anti-Aliasing Methods in CryENGINE 3Anti-Aliasing Methods in CryENGINE 3
Anti-Aliasing Methods in CryENGINE 3
 
Ha4 constraints
Ha4   constraintsHa4   constraints
Ha4 constraints
 
How to Choose Mobile Workstation? VR Ready
How to Choose Mobile Workstation? VR ReadyHow to Choose Mobile Workstation? VR Ready
How to Choose Mobile Workstation? VR Ready
 
Technologies Used In Graphics Rendering
Technologies Used In Graphics RenderingTechnologies Used In Graphics Rendering
Technologies Used In Graphics Rendering
 

More from Raimundo Renato

Apostila geo gebra
Apostila geo gebraApostila geo gebra
Apostila geo gebra
Raimundo Renato
 
Inventario ambiental do acude curral velho
Inventario ambiental do acude curral velhoInventario ambiental do acude curral velho
Inventario ambiental do acude curral velho
Raimundo Renato
 
315 desenho tecnico_cad
315 desenho tecnico_cad315 desenho tecnico_cad
315 desenho tecnico_cad
Raimundo Renato
 
A integral definida
A integral definidaA integral definida
A integral definida
Raimundo Renato
 
Aula 1-orientações-gerais-eng
Aula 1-orientações-gerais-engAula 1-orientações-gerais-eng
Aula 1-orientações-gerais-eng
Raimundo Renato
 
Detonado crysis por sha wnner - gamevicio
Detonado   crysis por sha wnner - gamevicioDetonado   crysis por sha wnner - gamevicio
Detonado crysis por sha wnner - gamevicio
Raimundo Renato
 
Memorial descritivo-instalacoes-eletricas
Memorial descritivo-instalacoes-eletricasMemorial descritivo-instalacoes-eletricas
Memorial descritivo-instalacoes-eletricas
Raimundo Renato
 
Topografia terreno dnocs1
Topografia terreno dnocs1Topografia terreno dnocs1
Topografia terreno dnocs1
Raimundo Renato
 
Memorial descritivo do_creas (1)
Memorial descritivo do_creas (1)Memorial descritivo do_creas (1)
Memorial descritivo do_creas (1)
Raimundo Renato
 

More from Raimundo Renato (9)

Apostila geo gebra
Apostila geo gebraApostila geo gebra
Apostila geo gebra
 
Inventario ambiental do acude curral velho
Inventario ambiental do acude curral velhoInventario ambiental do acude curral velho
Inventario ambiental do acude curral velho
 
315 desenho tecnico_cad
315 desenho tecnico_cad315 desenho tecnico_cad
315 desenho tecnico_cad
 
A integral definida
A integral definidaA integral definida
A integral definida
 
Aula 1-orientações-gerais-eng
Aula 1-orientações-gerais-engAula 1-orientações-gerais-eng
Aula 1-orientações-gerais-eng
 
Detonado crysis por sha wnner - gamevicio
Detonado   crysis por sha wnner - gamevicioDetonado   crysis por sha wnner - gamevicio
Detonado crysis por sha wnner - gamevicio
 
Memorial descritivo-instalacoes-eletricas
Memorial descritivo-instalacoes-eletricasMemorial descritivo-instalacoes-eletricas
Memorial descritivo-instalacoes-eletricas
 
Topografia terreno dnocs1
Topografia terreno dnocs1Topografia terreno dnocs1
Topografia terreno dnocs1
 
Memorial descritivo do_creas (1)
Memorial descritivo do_creas (1)Memorial descritivo do_creas (1)
Memorial descritivo do_creas (1)
 

Crysis 2-key-rendering-features

  • 1. Crysis 2 & CryENGINE 3 Key Rendering Features Tiago Sousa, Principal R&D Graphics Engineer
  • 2. 1 Introduction ..................................................................................................................... 3 2 Gamma Correct HDR Rendering ...................................................................................... 4 3 Lighting............................................................................................................................. 6 4 Shadows........................................................................................................................... 8 5 Screen Space AO and GI................................................................................................. 10 6 Deferred Decals.............................................................................................................. 13 7 Characters Rendering..................................................................................................... 14 8 Water Rendering............................................................................................................ 15 9 Postprocessing............................................................................................................... 17 10 Anti-Aliasing................................................................................................................... 19 11 System Specs and Colors................................................................................................ 22 12 Sys Specs and Performance ........................................................................................... 24 13 PC vs. Consoles............................................................................................................... 28 14 Stereo Rendering ........................................................................................................... 29 15 Pushing the Limits.......................................................................................................... 30 16 Conclusion...................................................................................................................... 31
  • 3. Introduction 3 1 Introduction Crysis 2 posed one of the biggest challenges Crytek's R&D department has ever faced: develop a multi-platform engine and ship a game simultaneously on PC, Xbox 360 and PlayStation 3. After developing a cutting edge PC engine, having to re-adjust the technology to run efficiently on consoles, where memory is one of the biggest limitations, and maintaining scalability for the next engine iteration, was an incredible achievement. A huge engineering effort was required in order to run Crysis 2 on console hardware: a new streaming system, refactoring of many modules (physics, animation and renderer), low level CPU/GPU and multi-core optimizations, etc. This article covers a small subset of this amazing team effort, which made CryENGINE 3 and Crysis 2 run and look great on all main platforms. Hence, we will get into a couple of key rendering features that have made the difference.
  • 4. Gamma Correct HDR Rendering 4 2 Gamma Correct HDR Rendering CryENGINE has supported High Dynamic Range since its first version. For CryENGINE 3, we added gamma correct rendering, among other changes in order to efficiently support each individual platform. The PC specs feature the best HDR quality available due to the general and fast support of FP16 render target formats. One of the main benefits of HDR rendering is a much bigger color range and precision, which can easily prevent unattractive color clamping and banding visible in many current games. Those visual artifacts are usually a major issue for art departments using LDR rendering.
  • 5. Gamma Correct HDR Rendering 5 The following example illustrates an extreme situation with a dark foggy environment and a strong sun light, in both LDR and HDR rendering: Notice the limited color range and obvious clipping in LDR: the highlights are clipped and the dark areas lack detail. HDR rendering also opens the door to a multitude of physically-based post processing effects, such as eye adaptation, bloom, flares/streaks, motion blur, depth of field, grain, etc.
  • 6. Lighting 6 3 Lighting In CryENGINE 3, all lights are dynamic and deferred. Therefore, we have a very slim G-Buffer, composed of normals/depth, used later in the 3D pipeline for several purposes. The deferred lighting accumulation is done in HDR on all platforms. Among several techniques, every surface has reflection map applied to it through deferred specular HDR cube maps.
  • 8. Shadows 8 4 Shadows Shadows are fully dynamic on all specs. A large view distance is used for the sun cascaded shadowmap. Shadows are updated every frame on PC and are amortized over frames on consoles. On PC high specs, almost every single light projector or main light source casts shadows. On consoles, the amount of lights casting shadows is limited for performance reasons.
  • 10. Screen Space AO and GI 10 5 Screen Space AO and GI Crytek’s invention, the SSAO, is back and improved using temporal accumulation for enhanced quality on consoles. On high specs, we also use full resolution target and a 2 layers approach for capturing high frequency detail normals. For the final lighting touch, we also use our own custom realtime global illumination solution in addition to standard deferred lights.
  • 11. Screen Space AO and GI 11
  • 12. Screen Space AO and GI 12
  • 13. Deferred Decals 13 6 Deferred Decals The deferred decals are memory-friendly (memory being the most important resource on consoles) and improve CPU/GPU performance. Another benefit is the superior projection quality. In essence, they work very similarly to light projectors and have comparable drawbacks, since handling moving geometry is troublesome and requires additional work.
  • 14. Characters Rendering 14 7 Characters Rendering Character rendering techniques taking advantage of deferred lighting on all platforms were researched and implemented, such as deferred skin rendering, hair and fur, eyes, cloth, etc. We developed the skin rendering with screen space sub-surface scattering and self- shadowing. The rendering cost is proportional to the amount of screen coverage from geometry versus the usual approaches using UV space sub-surface scattering. The latter adds an extra constant cost per-character and can be prohibitive for consoles, performance and memory-wise. Another improvement is the alpha tested smoothing for hair rendering with anisotropic shading for all platforms. It avoids artifacts due to alpha blended approximation issues (for instance shadows and volumetric fog artifacts).
  • 15. Water Rendering 15 8 Water Rendering This was primarily the same water rendering approach as in Crysis 1 (the different look is mostly due to cityscape environments instead of tropical environments). We use FFT based normal map using cheap parallax approximation for consoles, and vertex displacement mapping for PC specs. Currently, FFT simulation is done on CPU on its own dedicated thread. We developed dynamic interaction with wave propagation on all platforms, using vertex displacement version for PC specs. It is worth mentioning that water wave propagation simulation is done on GPU with a cost of just 0.2 ms on consoles and negligible cost on PC specs.
  • 16. Water Rendering 16 Deferred caustics rendering on all platforms, and panoply of other effects from Crysis 1, like volumetric god rays, water droplets and foam, also made their way onto consoles.
  • 17. Postprocessing 17 9 Postprocessing The camera motion blur was greatly improved over Crysis 1. For example, we no longer use the “sphere” around camera approach: we now do a proper re-projection. This allows for a far more accurate motion blur result based on how much a pixel has moved. Object motion blur is supported on all platforms as well as bokeh depth of field. All post processes are done in HDR, before tone mapping. This allows us to retain bright streaks, which are not commonly used in current-gen games, besides Crysis 1. This is performed on every platform and implemented for optimal performance by batching all
  • 18. Postprocessing 18 techniques in one, costing around 1ms on console platforms. For higher PC specs, we use FP16 formats with additional taps for improved quality.
  • 19. Anti-Aliasing 19 10 Anti-Aliasing Although many multiplatform engines often do not use AA on certain platforms, CryENGINE 3 uses a form of amortized MSAA reminiscent of OpenGL accumulation buffer approaches, called Post MSAA. Such an approach works by accumulating sub-samples over frames and reprojecting them to the current frame. It should not be confused with “temporal antialiasing” commonly used on 60 fps games that simply do a linear blending and hence have ghosting for every pixel. The Post MSAA approach is very general and allows for a sub-pixel accuracy solution on all platforms at a cost of just 1ms on consoles, and less than 0.2 ms on PCs at 1080p resolutions. Due to its sub-pixel accuracy, it minimizes moiré patterns and visible shimmering on surfaces with high frequency characteristics (fences, grids, etc) commonly visible in EdgeAA/MLAA or similar techniques. It works on alpha tested geometry, and performs shader anti-aliasing i.e. on surfaces using Parallax Occlusion mapping, or similar aliasing prone techniques. It also performs post-tone mapping without damaging HDR quality on high contrast areas like regular hardware MSAA approaches (pre-dx11). Such a technique is quite a novelty in the video game industry and it’s very likely Crytek will release improved versions as it has potential to also be merged with different techniques - for example, it’s currently also combined with Nvidia’s FXAA in “Extreme” spec, in order to improve quality further with sub-pixel accuracy results from post MSAA.
  • 22. System Specs and Colors 22 11 System Specs and Colors Besides resolution differences and a couple of custom view distances variations across platforms, we achieved an exact platform image color output on all platforms in the final shipped version of Crysis 2. Multiplatform games usually look “darker” on Xbox 360. This is due to the console hardware performing an additional TV gamma correction step, besides other details, when using gamma correction. Unfortunately this is not a standard; no other hardware does this, so we decided on matching X360 output to PC and PS3 platforms instead.
  • 23. System Specs and Colors 23 Any color/contrast/brightness differences are most likely due to an improper HDMI setup for the user's display. To ensure a correct set-up, the user can follow these simple steps: 1. If the TV supports HDMI 1.3 or higher:  360: pick “Expanded” in console dashboard display setup, in reference levels  Ps3: enable “RGB full range” in console display setup  If incorrect settings are used, the brightness calibration icon might be always visible (too bright), resulting in a lack of contrast (insufficient darks) and visible (color) banding. This very likely also means the TV does NOT support HDMI 1.3 and higher, or is not properly detected by hardware. 2. If the TV does not support HDMI 1.3 or higher: a. 360: pick “Standard” on console dashboard display setup, in reference levels b. Ps3: disable “RGB Full range” in console display setup c. If the user has the wrong setting, the brightness calibration icon will always not be visible, or almost invisible, resulting in crushed darks. 3. Another common mistake from users is not picking the correct resolution to match the display's native resolution, resulting in an additional image upsample from the TV. If the display monitor's native resolution is 1080p, the user should pick it as default on either XBox 360 or PS3.
  • 24. Sys Specs and Performance 24 12 Sys Specs and Performance Although it is common practice for multiplatform engines to disable certain rendering features depending on hardware strengths or weaknesses, in CryENGINE3 most rendering code is designed to be general, shared and optimal for consoles. For example, all post processes use exactly the same code path. We also scale the quality up for higher PC specs. Due to a lot of hard work and heavy optimization on GPU/CPU side since Crysis 1, every spec on PC should mostly play at 60 fps at 1080p assuming the user selects the right sys spec for his machine and has a fast enough CPU. In Crysis 1, a relatively brute force approach was used, where all features on lowest settings would be completely turned off, including HDR rendering, shadows and all post processes. Users were also forced to use lower resolutions for improving performance, which meant a lot of our low end hardware owners would not be able to achieve a decent visual experience of our game at good frame rates. Running Crysis 1 at HD resolutions on highest end hardware in 2007 was simply not possible.
  • 25. Sys Specs and Performance 25 This time around, throughout the entire project, we dedicated a lot of effort to optimization. All features are present across all system specs, including HDR rendering, shadows, motion blur, SSAO, Depth of field and post MSAA. Anisotropic filtering is also used on every system spec, and users can now experience a great gaming experience at 60 fps on PC at HD resolutions, including stereo mode. It should be noted that most other games rely on having completely pre-baked lighting, no HDR rendering and dynamic shadows limited to a few items such as characters, in order to offer a 60 fps experience. This effort made our lowest specification equal in many aspects and even superior to CryENGINE 2 High specs. The biggest differences from Crysis 1 to Crysis 2 are the vastly improved dynamic lighting and shadowing and highly improved image quality. For this reason, the lowest available spec on PC in Crysis 2 is “High Spec” and the highest spec is “Extreme”.
  • 26. Sys Specs and Performance 26
  • 27. Sys Specs and Performance 27 With higher system specs, more samples or high resolutions are used on certain effects like shadows/post processes/MSAA. Certain features get enabled such as rigid body water simulation or vertex displacement for water. On higher PC specs, we naturally find much more lights casting shadows, more particles and higher view distances for all geometries, lights and shadows.
  • 28. PC vs. Consoles 28 13 PC vs. Consoles The lowest PC spec, “High”, is almost the same as the spec used on consoles, besides per- platform differences, such as different texture formats for render targets and different normal map formats on PS3 due to lack of 3Dc support. PC specs also feature improved texture quality, since we do not use streaming for PC due to the vast memory resources available. Anisotropic filtering is enabled for all specs, while on PS3 it is dynamically adjusted and goes up to 16x anisotropic, and on Xbox 360 it is limited to 4x anisotropic in order to reduce the performance cost.
  • 29. Stereo Rendering 29 14 Stereo Rendering On consoles, CryENGINE 3 supports a performance-optimal approach for Stereo, based on depth reconstruction, which allows us to maintain visual quality without having to dramatically decrease the resolution and the rendering view distances, as seen in many other recent console games. Due to such increased quality on consoles, and with a careful setup of the 3d HUD and a wide range of stereo settings, we provide one of the most comfortable stereo experiences available on the market. Most players will be able to play continuously without eye straining, compared to other techniques which rely on drastically decreasing the image quality. Additionally, the engine supports real dual stereo (also anaglyph mode for debugging), which is likely to be exposed for Crysis 2 in later patches for PC specs.
  • 30. Pushing the Limits 30 15 Pushing the Limits It should be noted that many of these key features are novelties for all platforms and were invented and iterated already by the end of Crysis 1's development (2007): screen space scattering and self-shadowing, PostMSAA (every marketing screenshot features it), deferred caustics/rain approximation, realtime GI, Stereo Rendering, alpha test smoothing, batched HDR post processing and of course our famous SSAO which gave birth to a multitude of screen space algorithms like SSGI/SS Reflections and similar. More in depth technical details will very likely be revealed in the upcoming months. There are obviously many other important features that contributed to Crysis2 from a performance perspective. Our GPU based occlusion buffer and conditional rendering allow us to significantly reduce the amount of drawcalls on consoles, thanks to a lower GPU and CPU overhead. Crysis 2 also includes all the other well known features from CryENGINE 2, such as our Time of Day system combined with our volumetric fog. New visual features like the HDR flares/streaks, the color grading, the multiple shading models support or the post- processed HUD also helped improve the look of our graphically acclaimed Crysis 2 title.
  • 31. Conclusion 31 16 Conclusion The key rendering features showcased in this article are the result of almost three years of extremely hard multiplatform development, involving a lot of nights and weekends spent at the office for many of the Crytek team members. We hope that literally everyone, on any console platform or any PC spec, will appreciate the end result of our efforts as much as we enjoyed working on our latest game and engine iteration. All of these features are about to be made available to our engine licensees in CryENGINE 3.3. A big thanks to the entire Crytek team, especially our great R&D graphics programming team, and everyone that contributed to this short but hopefully insightful article; to Michael Endres, Martin Lancaster, and in particular to our Lighting Artist Pierre-Yves Donzallaz for his helpful article review, awesome screenshots, and for always showing our technology in the best possible light. Tiago Sousa Principal R&D Graphics Engineer