SlideShare a Scribd company logo
1 of 49
Company of Heroes 2 Rendering Tech:
The cold facts of recreating the
hardest winter conditions of World
War 2
Daniel Barrero PhD
Senior Graphics Programmer
Relic Entertainment / SEGA
Korea Game Conference – KGC 2013 – September 25 2013
Introduction
Presentation Index
• Implementing winter tech, what was tried, what worked,
what didn't:
– Rendering realistic and stylized snow and ice
• Procedurally generated snow
• Automatic snow edge fading
• Ice cracking
– Generating terrain snow tracks and procedural snow
– Solution for fast volumetric outdoor ambient occlusion
– Blizzard FX optimization
• Seamlessly upgrading the COH1 rendering engine from forward to
deferred
COH2 Winter Tech Requirements
• Procedural Snow on world objects
• Fully dynamic terrain snow and persistent snow foot prints and
tracks
• Blizzards
• Fully dynamic Ice, can break and refreeze based on player
interaction
• Improved lighting:
• Ambient occlusion is key for snowy enviroments.
• Possibility to add many dynamic lights to the world
Rendering Snow on World Objects
• Mostly visual representation of snow accumulation on objects,
a.k.a snow caps:
Rendering Snow on World Objects
• Possible solutions:
– Snow prepainted on the texture by artists:
✔Just an art change no change to the shaders or engine
✗Every model has to have a new set of textures with snow
painted on ( lots of work for the artists)
• Can't change the amount of snow dynamically in a realistic
way
Procedural Snow on World Objects
Observation: Snow accumulates on surfaces that tend towards
horizontal
It means we can just filter faces whose normals are closer than
a given to the up world vector and apply snow to them!
✔Simple shader change to check up for vertical normals
✔Can use normal map information to get accurate snow
✔Can control the snow amount by checking how far the pixel
normal is from the vertical direction
✔Blending object material with snow material based on
normal up component is fast and looks good.
Procedural Snow on World Objects
Observation:
• Snow accumulates on surfaces that tend towards horizontal
• It means we can just filter faces whose normals are closer than
a given to the up world vector and apply snow to them!
Snow covered faces
Faces without snow
False positive for snow
covered faces
Procedural Snow on World Objects
Observation: Snow accumulates on surfaces that tend towards
horizontal
It means we can just filter faces whose normals are closer than
a given to the up world vector and apply snow to them!
More Observations:
• Only the topmost surfaces should get snow
• Snow accumulating on top of objects changes the visible shape of
the mesh.
• Snow is thinner and tends to melt towards the edges of surfaces
first.
Getting rid of snow inside objects
Problem: Only the topmost surfaces should get snow
Solution: Generate a “snow shadow” map (a.k.a. Top down map)
1. Set a camera above the world it looking down
2. Render a depth map of closest surfaces with it
3. In the normal render check that world height against
the current pixel world height if is less then don't
Put snow on it
Top Down Map
Snow Surface Selection
Top Down
Camera
View
Top Down MapTop Down Map
Generating snow caps geometry
Problem: Snow accumulating on top of objects changes the visible
shape of the mesh.
Possible solution: Extrude the geometry of the horizontal faces upward.
Extrude
Direction
Extruded Geometry
Original top faces
Generating snow caps: edge fading
Problem: Snow is thinner and tends to melt towards the edges of
surfaces first
Possible solution: If we are extruding the mesh to generate geometry,
then to make snow caps thinner just push the corners of the surface
back in the opposite direction of the edge surface normal.
Extrude
Direction
Push direction
Original top faces
Original non biased
extruded geometry
Extruded Geometry
Average Edge Normal
Generating snow caps
Problems with geometry extrusion:
✗ Need to know the edges of surfaces on a mesh and the normal on
the edge. E.g. edges between wall and ceilings
✔Can be solved by offline tool easily by processing the mesh and
looking for big changes in normal direction.
Surface 1
Surface 2
Surface 3
Surface Edge
Edge Normal
Triangle Normal
Generating snow caps
Problems with geometry extrusion:
✗ Need to know the edges of surfaces on a mesh and the normal on
the edge and pass it to the shaders. E.g. edges between wall and
ceilings
✔Can be solved by offline tool easily by processing the mesh and
looking for big changes in normal direction.
✗ Need to generate geometry in the GPU
✗ Performance issues on Dx10 hardware
✗How to pass the information to the shaders
•There are lots of special cases
Snow caps optimization: virtual
extrusion
Observation: From the standard game camera view just “painting” over
the snow and modifying the perpixel normals it looks almost the same
as with snow caps since we can't see the extruded geometry close by.
Problem: Still need to fade snow towards the edge of surfaces.
• Need to pass edge information to the shaders
Solution: Do a “virtual extrusion”in the shaders:
Vertex Shader:
1. Compute the vertex extruded point
2. Project point into the triangle surface
3. Compute distance to original vertex
4. Pass value into pixel shader
Pixel Shader:
4. Use interpolated “extruded”
Value as snow depth and fade
Snow out.
Snow caps optimization: virtual
extrusion
Observation: From the standard game camera view just “painting” over
the snow and modifying the per pixel normal it looks almost the same as
with snow caps since we can't see the extruded geometry close by.
Problem: Still need to fade snow towards the edge of surfaces.
• Need to pass edge information to the shaders
Solution: Do a “virtual extrusion” in the shaders
Improving Snow edge fading
Problem: Virtual extrusion produces some odd artifacts on many corner
cases due to different mesh topologies.
Snow edge fading on damaged
buildings
Problem: In COH it is possible to damage and destroy parts of a
builings in many ways.
• Buildings are composed of panels
• Panels get damaged by punching “holes” in the texture and
revealing underlying substance
• Shape of the hole is based on damaged neighbors
• Geometry is added on the edges of the damaged hole
Improving Snow edge fading
Problem: Virtual extrusion produces some odd artifacts on many corner
cases due to different mesh topologies and use cases
Solution: Take advantage of the “snow shadow” map using image
processing to improve snow edge fading, by finding the min/max
Top Down Map
(world height)
Apply min height
Filter (erode)
Apply top height
Filter (dilate)
Actual used top down map
Red
Channel
Green
Channel
Final snow
Use the two channels to
Determine edge fading.
Add noise to break the edge
Improving Snow edge fading
Problem: Virtual extrusion produces some odd artifacts on many corner
cases due to different mesh topologies and use cases
Solution: Take advantage of the “snow shadow” map using image
processing to improve snow edge fading, by finding the min/max
Sample of noise to break
the edge
Improving Snow edge fading
Problem: Virtual extrusion produces some odd artifacts on many corner
cases due to different mesh topologies and use cases
Solution: Take advantage of the “snow shadow” map using image
processing to improve snow edge fading, by finding the min/max
Pros:
✔Reuses “snow shadow” which is required anyway
✔ Solves the damaged buildings problem
✔ Mesh geometry doesn't matter
Cons:
✗ Needs a high resolution texture to look good
✗ Snow map costly to generate every frame
After all that: final look
Terrain Snow
• Artist driven
– Extra terrain layer
– Affects terrain height
Terrain Snow
• Artist driven
– Extra terrain layer
– Affects terrain height
– Snow edges procedurally
distorted to reproduce snow
behavior
Terrain Snow
• Artist driven
– Extra terrain layer
– Affects terrain height
– Snow edges procedurally
distorted to reproduce snow
behavior
– Use GPU tessellation in
D3D11
Terrain Snow affecting Objects
Problem: consistency between terrain snow and object
snow
Solution: Allow objects to “suck in” the terrain snow
material.
✔ It allows the snow to look consistent between terrain and objects
✔ Side effect that artists can tune edge fading more on objects
placed on a map by painting the snow under it
✔ Side effect that damaging terrain removes snow also removes
parts of snow from objects improving the melting snow caused
by damage effect.
Terrain Snow affecting Objects
Problem: consistency between terrain snow and object
snow
Solution: Allow objects to “suck in” the terrain snow
material.
Undamaged Terrain Snow Damaged Terrain Snow
Terrain Snow Tracks
Extra pass:
– Render objects that moved into a texture with a top down camera view
and clipped at max snow height using an additive shader
Track Map
Top Down
Camera
View
Clip Plane
Terrain Snow Tracks
● Extra pass:
– Render objects that moved into a texture with a top down
camera view and clipped at max snow height using an
additive shader
– Just visual, uses bump mapping in D3D10 HW and GPU
tessellation on D3D11
Terrain Snow Tracks
Extra pass:
– Render objects that moved into a texture with a top down camera view
and clipped at max snow height using an additive shader
– Pros:
✔Easy way to get precise snow tracks and foot prints
– Cons:
✗Requires a high texel density per terrain area to get accurate foot
prints.
✗Since it persists over multiple frames it is not very SLI/Crossfire
friendly.
✗Requires high frame rate to get smooth continuous vehicle tracks.
Muck map
- Material based on snow track depth to make the tracks stand
out more and reveal mud
Ice
Requirements:
- Fully dynamic
- Can break and refreeze
- Should look realistic
- Edge breaking should look
good
- Easy to tune by artists
Ice
- World has an Ice cell map that controls ice health
- The sim controls breaking and refreezing looking at
ice health of neighboring cells
Ice
- World has an Ice cell map that controls ice health
- The simulation controls breaking and refreezing looking at ice
health of neighboring cells
- Ice Shader takes the Ice health map as a texture and uses the
health information to determine how to blend between textures
that represent each ice state:
- Solid
- Broken
- Slush
- Water
Ice
Problem: Grid is very visible on the edges of broken ice
Solution: Use an artist defined texture to offset the uv sampling
to break the edges, use noise to break the edges even more:
Sample UV Offset TextureNormal UV
Use UVTexture Value
To sample Ice textures
Final look
Outdoor Volumetric Ambient Occlusion
- On snowy weather, ambient occlusion is what gives variety to
the environment and makes snow variation stand out and be
more visible.
- COH1 used fake splat based ambient occlusion.
✗ Not good enough to depict light occlusion on snowy
environments.
✗ Not accurate.
✗ Looks like sets of blobs
Outdoor Volumetric Ambient Occlusion
Solution: Take advantage of the top down map used for the
edge fading and “snow shadow” map to compute ambient
occlusion:
- use the height information from the topdown map as a height
map and do quick ray casting in the GPU to compute the
ambient occlusion
TopDownMap Computed Ambient Occlusion
Outdoor Volumetric Ambient Occlusion
Solution: Take advantage of the top down map used for the
edge fading and “snow shadow” map to compute ambient
occlusion:
- use the height information from the TopDown map as a height
map and do quick ray casting in the GPU to compute the
ambient occlusion
Pros:
✔ More accurate
Cons:
✗ Slow to compute
can be pre-computed for
static objects
Outdoors Volumetric Ambient Occlusion
Without ambient occlusion
Outdoors Volumetric Ambient Occlusion
With ambient occlusion
Snow Blizzard FX Optimization
Problem:
- Uses lots of big particles for the snow blizzard meaning huge
overdraw even using the special fast Weather FX path
[KGC2012 Relic FX talk: http://www.slideshare.net/proyZ/relics-fx-system]
Solution:
- Make the weather FX deferred:
– Render Weather FX in a 1/2 screen resolution texture
– Render that texture over the full screen as a post-process pass
Huge performance improvement, worst case went from a
frame rate drop of 30% to below 4%
COH1 Forward Rendering Engine
• Bleeding edge technology Circa
2006/2007:
• Fully destructible environments
• Dynamic Lighting & Shadows
• Spherical harmonics
• Normal mapping
• HDR
• Dynamic Weather
• D3D9 ( SM 1.1, 2.0, 3.0)
• D3D10 (SM 4.0)
• Etc.
COH1 Forward Rendering Engine
• Pros:
✔ Support for lots of old hardware by current
standards.
✔ Proven technology.
✔ Optimized for pre-DirectX11 hardware
• Cons:
✗ Limited number of dynamic lights
✗ Hugely complex ubershaders.
✗ Static branching for performance: lots of auto
generated shader permutations.
✗ Even with packed data used almost all available
pixel shader interpolators.
✗ Literally no space in the shaders to add the new
features needed for COH2 (snow, etc.).
Ambient Occlusion
Near Shadow
Far Shadow
Water View
World View
Water View
Post Processing
Why Deferred Rendering for COH2
Cons:
✔ Unable to handle transparent objects
✔ Antialiasing is harder to do properly
✔ Not very optimal for older generations of D3D9 Hardware
Pros:
✔ Unlimited number of lights
✔ Less shader permutations
✔ Hugely simplified and faster shader code
✔ Easier to add modern rendering techniques like (SSAO,etc)
✔ Ability to add the needed features for COH2 to represent winter
and still lots of room to spare to add more features in the future.
COH2 Rendering
Top Down Map
Sun Near Shadow
Sun Far Shadow
Render Sun Light
Compute Next Light
Shadow Map
Render Next Light
More
Visible
Lights?
Depth and Simplified
Gbuffer Pass
Light Pass
Combiner Pass
Water View
Light Pass
No
World View
Post Processing
Yes
Track Map
COH2 Rendering
Sun Near Shadow
Sun Far Shadow
Post-Processing
Depth Prepass
Gbuffer Pass
SSAO / LAO Pass
Light Pass
Render Sun Light
More
Visible
Lights?
Combine/Resolve Pass
Forward Pass
(Fx/Transparent Objects)
Depth and Simplified
Gbuffer Pass
Light Pass
Combiner Pass
Water View
World View
Light Pass
No
Top Down Map
Track Map
Compute Next Light
Shadow Map
Render Next Light
Yes
COH2 Rendering
Acknowledgements
• Thanks to Remy Saville, Ian Thompson, Bartek
Nowakowski, Stuart Maxwell, Alun Bjorskten and
James Harrison for their contributions to COH2
winter tech.
• Thanks to all the great Artists at Relic that keep
pushing the limit of what the engine can do and
keep us busy with more ideas of how to make it
better.
Thank you
• Questions?
• Contact Information:
• daniel.barrero@gmail.com
• http://danielbarrero.com

More Related Content

What's hot

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
 
V Ray For Sketch Up 2007 Manual
V Ray For Sketch Up 2007 ManualV Ray For Sketch Up 2007 Manual
V Ray For Sketch Up 2007 ManualPheo8x
 
Rendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb RaiderRendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb RaiderEidos-Montréal
 
Hable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr LightingHable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr Lightingozlael ozlael
 
Real-time Shadowing Techniques: Shadow Volumes
Real-time Shadowing Techniques: Shadow VolumesReal-time Shadowing Techniques: Shadow Volumes
Real-time Shadowing Techniques: Shadow VolumesMark Kilgard
 
Substanceshanghaippt repacked
Substanceshanghaippt repackedSubstanceshanghaippt repacked
Substanceshanghaippt repackedLee Jungpyo
 
Unite2015 probelight English version
Unite2015 probelight English versionUnite2015 probelight English version
Unite2015 probelight English versionSangYun Yi
 
Practical Occlusion Culling in Killzone 3
Practical Occlusion Culling in Killzone 3Practical Occlusion Culling in Killzone 3
Practical Occlusion Culling in Killzone 3Guerrilla
 
Clustered defered and forward shading
Clustered defered and forward shadingClustered defered and forward shading
Clustered defered and forward shadingWuBinbo
 
Graphics pipelining
Graphics pipeliningGraphics pipelining
Graphics pipeliningAreena Javed
 
HPG 2018 - Game Ray Tracing: State-of-the-Art and Open Problems
HPG 2018 - Game Ray Tracing: State-of-the-Art and Open ProblemsHPG 2018 - Game Ray Tracing: State-of-the-Art and Open Problems
HPG 2018 - Game Ray Tracing: State-of-the-Art and Open ProblemsElectronic Arts / DICE
 
Z Buffer Optimizations
Z Buffer OptimizationsZ Buffer Optimizations
Z Buffer Optimizationspjcozzi
 
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019Unity Technologies
 
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...Electronic Arts / DICE
 
Visibility Optimization for Games
Visibility Optimization for GamesVisibility Optimization for Games
Visibility Optimization for GamesUmbra
 
Hill Stephen Rendering Tools Splinter Cell Conviction
Hill Stephen Rendering Tools Splinter Cell ConvictionHill Stephen Rendering Tools Splinter Cell Conviction
Hill Stephen Rendering Tools Splinter Cell Convictionozlael ozlael
 
The technology behind_the_elemental_demo_16x9-1248544805
The technology behind_the_elemental_demo_16x9-1248544805The technology behind_the_elemental_demo_16x9-1248544805
The technology behind_the_elemental_demo_16x9-1248544805mistercteam
 
SIGGRAPH 2010 - Style and Gameplay in the Mirror's Edge
SIGGRAPH 2010 - Style and Gameplay in the Mirror's EdgeSIGGRAPH 2010 - Style and Gameplay in the Mirror's Edge
SIGGRAPH 2010 - Style and Gameplay in the Mirror's EdgeElectronic Arts / DICE
 

What's hot (20)

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...
 
V Ray For Sketch Up 2007 Manual
V Ray For Sketch Up 2007 ManualV Ray For Sketch Up 2007 Manual
V Ray For Sketch Up 2007 Manual
 
Rendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb RaiderRendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb Raider
 
Hable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr LightingHable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr Lighting
 
Real-time Shadowing Techniques: Shadow Volumes
Real-time Shadowing Techniques: Shadow VolumesReal-time Shadowing Techniques: Shadow Volumes
Real-time Shadowing Techniques: Shadow Volumes
 
Substanceshanghaippt repacked
Substanceshanghaippt repackedSubstanceshanghaippt repacked
Substanceshanghaippt repacked
 
Unite2015 probelight English version
Unite2015 probelight English versionUnite2015 probelight English version
Unite2015 probelight English version
 
Practical Occlusion Culling in Killzone 3
Practical Occlusion Culling in Killzone 3Practical Occlusion Culling in Killzone 3
Practical Occlusion Culling in Killzone 3
 
Clustered defered and forward shading
Clustered defered and forward shadingClustered defered and forward shading
Clustered defered and forward shading
 
Graphics pipelining
Graphics pipeliningGraphics pipelining
Graphics pipelining
 
HPG 2018 - Game Ray Tracing: State-of-the-Art and Open Problems
HPG 2018 - Game Ray Tracing: State-of-the-Art and Open ProblemsHPG 2018 - Game Ray Tracing: State-of-the-Art and Open Problems
HPG 2018 - Game Ray Tracing: State-of-the-Art and Open Problems
 
Z Buffer Optimizations
Z Buffer OptimizationsZ Buffer Optimizations
Z Buffer Optimizations
 
Datt 2500 week 11
Datt 2500 week 11Datt 2500 week 11
Datt 2500 week 11
 
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019
 
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
 
Visibility Optimization for Games
Visibility Optimization for GamesVisibility Optimization for Games
Visibility Optimization for Games
 
Hill Stephen Rendering Tools Splinter Cell Conviction
Hill Stephen Rendering Tools Splinter Cell ConvictionHill Stephen Rendering Tools Splinter Cell Conviction
Hill Stephen Rendering Tools Splinter Cell Conviction
 
Basic vray tutorial
Basic vray tutorialBasic vray tutorial
Basic vray tutorial
 
The technology behind_the_elemental_demo_16x9-1248544805
The technology behind_the_elemental_demo_16x9-1248544805The technology behind_the_elemental_demo_16x9-1248544805
The technology behind_the_elemental_demo_16x9-1248544805
 
SIGGRAPH 2010 - Style and Gameplay in the Mirror's Edge
SIGGRAPH 2010 - Style and Gameplay in the Mirror's EdgeSIGGRAPH 2010 - Style and Gameplay in the Mirror's Edge
SIGGRAPH 2010 - Style and Gameplay in the Mirror's Edge
 

Viewers also liked

아티스트에게 사랑받는 3DS Max 우버쉐이더
아티스트에게 사랑받는 3DS Max 우버쉐이더아티스트에게 사랑받는 3DS Max 우버쉐이더
아티스트에게 사랑받는 3DS Max 우버쉐이더포프 김
 
스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)
스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)
스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)포프 김
 
[2012 대학특강] 아티스트 + 프로그래머
[2012 대학특강] 아티스트 + 프로그래머[2012 대학특강] 아티스트 + 프로그래머
[2012 대학특강] 아티스트 + 프로그래머포프 김
 
[Kgc2013] 모바일 엔진 개발기
[Kgc2013] 모바일 엔진 개발기[Kgc2013] 모바일 엔진 개발기
[Kgc2013] 모바일 엔진 개발기changehee lee
 
[Ndc11 박민근] deferred shading
[Ndc11 박민근] deferred shading[Ndc11 박민근] deferred shading
[Ndc11 박민근] deferred shadingMinGeun Park
 

Viewers also liked (6)

The Producer
The ProducerThe Producer
The Producer
 
아티스트에게 사랑받는 3DS Max 우버쉐이더
아티스트에게 사랑받는 3DS Max 우버쉐이더아티스트에게 사랑받는 3DS Max 우버쉐이더
아티스트에게 사랑받는 3DS Max 우버쉐이더
 
스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)
스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)
스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)
 
[2012 대학특강] 아티스트 + 프로그래머
[2012 대학특강] 아티스트 + 프로그래머[2012 대학특강] 아티스트 + 프로그래머
[2012 대학특강] 아티스트 + 프로그래머
 
[Kgc2013] 모바일 엔진 개발기
[Kgc2013] 모바일 엔진 개발기[Kgc2013] 모바일 엔진 개발기
[Kgc2013] 모바일 엔진 개발기
 
[Ndc11 박민근] deferred shading
[Ndc11 박민근] deferred shading[Ndc11 박민근] deferred shading
[Ndc11 박민근] deferred shading
 

Similar to Company of Heroes 2 (COH2) Rendering Technology: The cold facts of recreating the hardest winter conditions of World War 2

GDC 2014 - Deformable Snow Rendering in Batman: Arkham Origins
GDC 2014 - Deformable Snow Rendering in Batman: Arkham OriginsGDC 2014 - Deformable Snow Rendering in Batman: Arkham Origins
GDC 2014 - Deformable Snow Rendering in Batman: Arkham OriginsColin Barré-Brisebois
 
Authoring of procedural rocks in The Blacksmith realtime short
Authoring of procedural rocks in The Blacksmith realtime shortAuthoring of procedural rocks in The Blacksmith realtime short
Authoring of procedural rocks in The Blacksmith realtime shortVesselin Efremov
 
Crysis Next-Gen Effects (GDC 2008)
Crysis Next-Gen Effects (GDC 2008)Crysis Next-Gen Effects (GDC 2008)
Crysis Next-Gen Effects (GDC 2008)Tiago Sousa
 
Screen space reflections on Epsilon Engine
Screen space reflections on Epsilon EngineScreen space reflections on Epsilon Engine
Screen space reflections on Epsilon EngineImanol Fotia
 
From Experimentation to Production: The Future of WebGL
From Experimentation to Production: The Future of WebGLFrom Experimentation to Production: The Future of WebGL
From Experimentation to Production: The Future of WebGLFITC
 
IDC 2010 Conference Presentation
IDC 2010 Conference PresentationIDC 2010 Conference Presentation
IDC 2010 Conference PresentationGonçalo Amador
 
The 'Rubble of the North' -a solution for modelling the irregular architectur...
The 'Rubble of the North' -a solution for modelling the irregular architectur...The 'Rubble of the North' -a solution for modelling the irregular architectur...
The 'Rubble of the North' -a solution for modelling the irregular architectur...3D ICONS Project
 
2D art for real time 3D web game
2D art for real time 3D web game2D art for real time 3D web game
2D art for real time 3D web gameaction.vn
 
OGDC2012 2D Art For Realtime 3D Web Game_Mr. Khanh, Pham Ngoc Vu
OGDC2012 2D Art For Realtime 3D Web Game_Mr. Khanh, Pham Ngoc VuOGDC2012 2D Art For Realtime 3D Web Game_Mr. Khanh, Pham Ngoc Vu
OGDC2012 2D Art For Realtime 3D Web Game_Mr. Khanh, Pham Ngoc VuBuff Nguyen
 
FV_IGARSS11.ppt
FV_IGARSS11.pptFV_IGARSS11.ppt
FV_IGARSS11.pptgrssieee
 
FV_IGARSS11.ppt
FV_IGARSS11.pptFV_IGARSS11.ppt
FV_IGARSS11.pptgrssieee
 
FV_IGARSS11.ppt
FV_IGARSS11.pptFV_IGARSS11.ppt
FV_IGARSS11.pptgrssieee
 
FV_IGARSS11.ppt
FV_IGARSS11.pptFV_IGARSS11.ppt
FV_IGARSS11.pptgrssieee
 
2D Art For Realtime 3D Web Game
2D Art For Realtime 3D Web Game 2D Art For Realtime 3D Web Game
2D Art For Realtime 3D Web Game we20
 
2d art for realtime 3d web game
2d art for realtime 3d web game2d art for realtime 3d web game
2d art for realtime 3d web gameSon Aris
 
Color and 3D Semantic Reconstruction of Indoor Scenes from RGB-D stream
Color and 3D Semantic Reconstruction of Indoor Scenes from RGB-D streamColor and 3D Semantic Reconstruction of Indoor Scenes from RGB-D stream
Color and 3D Semantic Reconstruction of Indoor Scenes from RGB-D streamNAVER Engineering
 
Report On 3D Max
Report On 3D MaxReport On 3D Max
Report On 3D MaxTongXu520
 
Benoit fouletier guillaume martin unity day- modern 2 d techniques-gce2014
Benoit fouletier guillaume martin   unity day- modern 2 d techniques-gce2014Benoit fouletier guillaume martin   unity day- modern 2 d techniques-gce2014
Benoit fouletier guillaume martin unity day- modern 2 d techniques-gce2014Mary Chan
 

Similar to Company of Heroes 2 (COH2) Rendering Technology: The cold facts of recreating the hardest winter conditions of World War 2 (20)

GDC 2014 - Deformable Snow Rendering in Batman: Arkham Origins
GDC 2014 - Deformable Snow Rendering in Batman: Arkham OriginsGDC 2014 - Deformable Snow Rendering in Batman: Arkham Origins
GDC 2014 - Deformable Snow Rendering in Batman: Arkham Origins
 
Authoring of procedural rocks in The Blacksmith realtime short
Authoring of procedural rocks in The Blacksmith realtime shortAuthoring of procedural rocks in The Blacksmith realtime short
Authoring of procedural rocks in The Blacksmith realtime short
 
Crysis Next-Gen Effects (GDC 2008)
Crysis Next-Gen Effects (GDC 2008)Crysis Next-Gen Effects (GDC 2008)
Crysis Next-Gen Effects (GDC 2008)
 
Lighting the City of Glass
Lighting the City of GlassLighting the City of Glass
Lighting the City of Glass
 
Screen space reflections on Epsilon Engine
Screen space reflections on Epsilon EngineScreen space reflections on Epsilon Engine
Screen space reflections on Epsilon Engine
 
From Experimentation to Production: The Future of WebGL
From Experimentation to Production: The Future of WebGLFrom Experimentation to Production: The Future of WebGL
From Experimentation to Production: The Future of WebGL
 
Deferred shading
Deferred shadingDeferred shading
Deferred shading
 
IDC 2010 Conference Presentation
IDC 2010 Conference PresentationIDC 2010 Conference Presentation
IDC 2010 Conference Presentation
 
The 'Rubble of the North' -a solution for modelling the irregular architectur...
The 'Rubble of the North' -a solution for modelling the irregular architectur...The 'Rubble of the North' -a solution for modelling the irregular architectur...
The 'Rubble of the North' -a solution for modelling the irregular architectur...
 
2D art for real time 3D web game
2D art for real time 3D web game2D art for real time 3D web game
2D art for real time 3D web game
 
OGDC2012 2D Art For Realtime 3D Web Game_Mr. Khanh, Pham Ngoc Vu
OGDC2012 2D Art For Realtime 3D Web Game_Mr. Khanh, Pham Ngoc VuOGDC2012 2D Art For Realtime 3D Web Game_Mr. Khanh, Pham Ngoc Vu
OGDC2012 2D Art For Realtime 3D Web Game_Mr. Khanh, Pham Ngoc Vu
 
FV_IGARSS11.ppt
FV_IGARSS11.pptFV_IGARSS11.ppt
FV_IGARSS11.ppt
 
FV_IGARSS11.ppt
FV_IGARSS11.pptFV_IGARSS11.ppt
FV_IGARSS11.ppt
 
FV_IGARSS11.ppt
FV_IGARSS11.pptFV_IGARSS11.ppt
FV_IGARSS11.ppt
 
FV_IGARSS11.ppt
FV_IGARSS11.pptFV_IGARSS11.ppt
FV_IGARSS11.ppt
 
2D Art For Realtime 3D Web Game
2D Art For Realtime 3D Web Game 2D Art For Realtime 3D Web Game
2D Art For Realtime 3D Web Game
 
2d art for realtime 3d web game
2d art for realtime 3d web game2d art for realtime 3d web game
2d art for realtime 3d web game
 
Color and 3D Semantic Reconstruction of Indoor Scenes from RGB-D stream
Color and 3D Semantic Reconstruction of Indoor Scenes from RGB-D streamColor and 3D Semantic Reconstruction of Indoor Scenes from RGB-D stream
Color and 3D Semantic Reconstruction of Indoor Scenes from RGB-D stream
 
Report On 3D Max
Report On 3D MaxReport On 3D Max
Report On 3D Max
 
Benoit fouletier guillaume martin unity day- modern 2 d techniques-gce2014
Benoit fouletier guillaume martin   unity day- modern 2 d techniques-gce2014Benoit fouletier guillaume martin   unity day- modern 2 d techniques-gce2014
Benoit fouletier guillaume martin unity day- modern 2 d techniques-gce2014
 

Recently uploaded

Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfFIDO Alliance
 
Buy Epson EcoTank L3210 Colour Printer Online.pdf
Buy Epson EcoTank L3210 Colour Printer Online.pdfBuy Epson EcoTank L3210 Colour Printer Online.pdf
Buy Epson EcoTank L3210 Colour Printer Online.pdfEasyPrinterHelp
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1DianaGray10
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsUXDXConf
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024Stephanie Beckett
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Julian Hyde
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?Mark Billinghurst
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationZilliz
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 
Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024TopCSSGallery
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfFIDO Alliance
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfChristopherTHyatt
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoTAnalytics
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxAbida Shariff
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2DianaGray10
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
Buy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptxBuy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptxEasyPrinterHelp
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfFIDO Alliance
 

Recently uploaded (20)

Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Buy Epson EcoTank L3210 Colour Printer Online.pdf
Buy Epson EcoTank L3210 Colour Printer Online.pdfBuy Epson EcoTank L3210 Colour Printer Online.pdf
Buy Epson EcoTank L3210 Colour Printer Online.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering Teams
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdf
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Buy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptxBuy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptx
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 

Company of Heroes 2 (COH2) Rendering Technology: The cold facts of recreating the hardest winter conditions of World War 2

  • 1. Company of Heroes 2 Rendering Tech: The cold facts of recreating the hardest winter conditions of World War 2 Daniel Barrero PhD Senior Graphics Programmer Relic Entertainment / SEGA Korea Game Conference – KGC 2013 – September 25 2013
  • 3. Presentation Index • Implementing winter tech, what was tried, what worked, what didn't: – Rendering realistic and stylized snow and ice • Procedurally generated snow • Automatic snow edge fading • Ice cracking – Generating terrain snow tracks and procedural snow – Solution for fast volumetric outdoor ambient occlusion – Blizzard FX optimization • Seamlessly upgrading the COH1 rendering engine from forward to deferred
  • 4. COH2 Winter Tech Requirements • Procedural Snow on world objects • Fully dynamic terrain snow and persistent snow foot prints and tracks • Blizzards • Fully dynamic Ice, can break and refreeze based on player interaction • Improved lighting: • Ambient occlusion is key for snowy enviroments. • Possibility to add many dynamic lights to the world
  • 5. Rendering Snow on World Objects • Mostly visual representation of snow accumulation on objects, a.k.a snow caps:
  • 6. Rendering Snow on World Objects • Possible solutions: – Snow prepainted on the texture by artists: ✔Just an art change no change to the shaders or engine ✗Every model has to have a new set of textures with snow painted on ( lots of work for the artists) • Can't change the amount of snow dynamically in a realistic way
  • 7. Procedural Snow on World Objects Observation: Snow accumulates on surfaces that tend towards horizontal It means we can just filter faces whose normals are closer than a given to the up world vector and apply snow to them! ✔Simple shader change to check up for vertical normals ✔Can use normal map information to get accurate snow ✔Can control the snow amount by checking how far the pixel normal is from the vertical direction ✔Blending object material with snow material based on normal up component is fast and looks good.
  • 8. Procedural Snow on World Objects Observation: • Snow accumulates on surfaces that tend towards horizontal • It means we can just filter faces whose normals are closer than a given to the up world vector and apply snow to them! Snow covered faces Faces without snow False positive for snow covered faces
  • 9. Procedural Snow on World Objects Observation: Snow accumulates on surfaces that tend towards horizontal It means we can just filter faces whose normals are closer than a given to the up world vector and apply snow to them! More Observations: • Only the topmost surfaces should get snow • Snow accumulating on top of objects changes the visible shape of the mesh. • Snow is thinner and tends to melt towards the edges of surfaces first.
  • 10. Getting rid of snow inside objects Problem: Only the topmost surfaces should get snow Solution: Generate a “snow shadow” map (a.k.a. Top down map) 1. Set a camera above the world it looking down 2. Render a depth map of closest surfaces with it 3. In the normal render check that world height against the current pixel world height if is less then don't Put snow on it Top Down Map Snow Surface Selection Top Down Camera View Top Down MapTop Down Map
  • 11. Generating snow caps geometry Problem: Snow accumulating on top of objects changes the visible shape of the mesh. Possible solution: Extrude the geometry of the horizontal faces upward. Extrude Direction Extruded Geometry Original top faces
  • 12. Generating snow caps: edge fading Problem: Snow is thinner and tends to melt towards the edges of surfaces first Possible solution: If we are extruding the mesh to generate geometry, then to make snow caps thinner just push the corners of the surface back in the opposite direction of the edge surface normal. Extrude Direction Push direction Original top faces Original non biased extruded geometry Extruded Geometry Average Edge Normal
  • 13. Generating snow caps Problems with geometry extrusion: ✗ Need to know the edges of surfaces on a mesh and the normal on the edge. E.g. edges between wall and ceilings ✔Can be solved by offline tool easily by processing the mesh and looking for big changes in normal direction. Surface 1 Surface 2 Surface 3 Surface Edge Edge Normal Triangle Normal
  • 14. Generating snow caps Problems with geometry extrusion: ✗ Need to know the edges of surfaces on a mesh and the normal on the edge and pass it to the shaders. E.g. edges between wall and ceilings ✔Can be solved by offline tool easily by processing the mesh and looking for big changes in normal direction. ✗ Need to generate geometry in the GPU ✗ Performance issues on Dx10 hardware ✗How to pass the information to the shaders •There are lots of special cases
  • 15. Snow caps optimization: virtual extrusion Observation: From the standard game camera view just “painting” over the snow and modifying the perpixel normals it looks almost the same as with snow caps since we can't see the extruded geometry close by. Problem: Still need to fade snow towards the edge of surfaces. • Need to pass edge information to the shaders Solution: Do a “virtual extrusion”in the shaders: Vertex Shader: 1. Compute the vertex extruded point 2. Project point into the triangle surface 3. Compute distance to original vertex 4. Pass value into pixel shader Pixel Shader: 4. Use interpolated “extruded” Value as snow depth and fade Snow out.
  • 16. Snow caps optimization: virtual extrusion Observation: From the standard game camera view just “painting” over the snow and modifying the per pixel normal it looks almost the same as with snow caps since we can't see the extruded geometry close by. Problem: Still need to fade snow towards the edge of surfaces. • Need to pass edge information to the shaders Solution: Do a “virtual extrusion” in the shaders
  • 17. Improving Snow edge fading Problem: Virtual extrusion produces some odd artifacts on many corner cases due to different mesh topologies.
  • 18. Snow edge fading on damaged buildings Problem: In COH it is possible to damage and destroy parts of a builings in many ways. • Buildings are composed of panels • Panels get damaged by punching “holes” in the texture and revealing underlying substance • Shape of the hole is based on damaged neighbors • Geometry is added on the edges of the damaged hole
  • 19. Improving Snow edge fading Problem: Virtual extrusion produces some odd artifacts on many corner cases due to different mesh topologies and use cases Solution: Take advantage of the “snow shadow” map using image processing to improve snow edge fading, by finding the min/max Top Down Map (world height) Apply min height Filter (erode) Apply top height Filter (dilate) Actual used top down map Red Channel Green Channel Final snow Use the two channels to Determine edge fading. Add noise to break the edge
  • 20. Improving Snow edge fading Problem: Virtual extrusion produces some odd artifacts on many corner cases due to different mesh topologies and use cases Solution: Take advantage of the “snow shadow” map using image processing to improve snow edge fading, by finding the min/max Sample of noise to break the edge
  • 21. Improving Snow edge fading Problem: Virtual extrusion produces some odd artifacts on many corner cases due to different mesh topologies and use cases Solution: Take advantage of the “snow shadow” map using image processing to improve snow edge fading, by finding the min/max Pros: ✔Reuses “snow shadow” which is required anyway ✔ Solves the damaged buildings problem ✔ Mesh geometry doesn't matter Cons: ✗ Needs a high resolution texture to look good ✗ Snow map costly to generate every frame
  • 22. After all that: final look
  • 23. Terrain Snow • Artist driven – Extra terrain layer – Affects terrain height
  • 24. Terrain Snow • Artist driven – Extra terrain layer – Affects terrain height – Snow edges procedurally distorted to reproduce snow behavior
  • 25. Terrain Snow • Artist driven – Extra terrain layer – Affects terrain height – Snow edges procedurally distorted to reproduce snow behavior – Use GPU tessellation in D3D11
  • 26. Terrain Snow affecting Objects Problem: consistency between terrain snow and object snow Solution: Allow objects to “suck in” the terrain snow material. ✔ It allows the snow to look consistent between terrain and objects ✔ Side effect that artists can tune edge fading more on objects placed on a map by painting the snow under it ✔ Side effect that damaging terrain removes snow also removes parts of snow from objects improving the melting snow caused by damage effect.
  • 27. Terrain Snow affecting Objects Problem: consistency between terrain snow and object snow Solution: Allow objects to “suck in” the terrain snow material. Undamaged Terrain Snow Damaged Terrain Snow
  • 28. Terrain Snow Tracks Extra pass: – Render objects that moved into a texture with a top down camera view and clipped at max snow height using an additive shader Track Map Top Down Camera View Clip Plane
  • 29. Terrain Snow Tracks ● Extra pass: – Render objects that moved into a texture with a top down camera view and clipped at max snow height using an additive shader – Just visual, uses bump mapping in D3D10 HW and GPU tessellation on D3D11
  • 30. Terrain Snow Tracks Extra pass: – Render objects that moved into a texture with a top down camera view and clipped at max snow height using an additive shader – Pros: ✔Easy way to get precise snow tracks and foot prints – Cons: ✗Requires a high texel density per terrain area to get accurate foot prints. ✗Since it persists over multiple frames it is not very SLI/Crossfire friendly. ✗Requires high frame rate to get smooth continuous vehicle tracks.
  • 31. Muck map - Material based on snow track depth to make the tracks stand out more and reveal mud
  • 32. Ice Requirements: - Fully dynamic - Can break and refreeze - Should look realistic - Edge breaking should look good - Easy to tune by artists
  • 33. Ice - World has an Ice cell map that controls ice health - The sim controls breaking and refreezing looking at ice health of neighboring cells
  • 34. Ice - World has an Ice cell map that controls ice health - The simulation controls breaking and refreezing looking at ice health of neighboring cells - Ice Shader takes the Ice health map as a texture and uses the health information to determine how to blend between textures that represent each ice state: - Solid - Broken - Slush - Water
  • 35. Ice Problem: Grid is very visible on the edges of broken ice Solution: Use an artist defined texture to offset the uv sampling to break the edges, use noise to break the edges even more: Sample UV Offset TextureNormal UV Use UVTexture Value To sample Ice textures Final look
  • 36. Outdoor Volumetric Ambient Occlusion - On snowy weather, ambient occlusion is what gives variety to the environment and makes snow variation stand out and be more visible. - COH1 used fake splat based ambient occlusion. ✗ Not good enough to depict light occlusion on snowy environments. ✗ Not accurate. ✗ Looks like sets of blobs
  • 37. Outdoor Volumetric Ambient Occlusion Solution: Take advantage of the top down map used for the edge fading and “snow shadow” map to compute ambient occlusion: - use the height information from the topdown map as a height map and do quick ray casting in the GPU to compute the ambient occlusion TopDownMap Computed Ambient Occlusion
  • 38. Outdoor Volumetric Ambient Occlusion Solution: Take advantage of the top down map used for the edge fading and “snow shadow” map to compute ambient occlusion: - use the height information from the TopDown map as a height map and do quick ray casting in the GPU to compute the ambient occlusion Pros: ✔ More accurate Cons: ✗ Slow to compute can be pre-computed for static objects
  • 39. Outdoors Volumetric Ambient Occlusion Without ambient occlusion
  • 40. Outdoors Volumetric Ambient Occlusion With ambient occlusion
  • 41. Snow Blizzard FX Optimization Problem: - Uses lots of big particles for the snow blizzard meaning huge overdraw even using the special fast Weather FX path [KGC2012 Relic FX talk: http://www.slideshare.net/proyZ/relics-fx-system] Solution: - Make the weather FX deferred: – Render Weather FX in a 1/2 screen resolution texture – Render that texture over the full screen as a post-process pass Huge performance improvement, worst case went from a frame rate drop of 30% to below 4%
  • 42. COH1 Forward Rendering Engine • Bleeding edge technology Circa 2006/2007: • Fully destructible environments • Dynamic Lighting & Shadows • Spherical harmonics • Normal mapping • HDR • Dynamic Weather • D3D9 ( SM 1.1, 2.0, 3.0) • D3D10 (SM 4.0) • Etc.
  • 43. COH1 Forward Rendering Engine • Pros: ✔ Support for lots of old hardware by current standards. ✔ Proven technology. ✔ Optimized for pre-DirectX11 hardware • Cons: ✗ Limited number of dynamic lights ✗ Hugely complex ubershaders. ✗ Static branching for performance: lots of auto generated shader permutations. ✗ Even with packed data used almost all available pixel shader interpolators. ✗ Literally no space in the shaders to add the new features needed for COH2 (snow, etc.). Ambient Occlusion Near Shadow Far Shadow Water View World View Water View Post Processing
  • 44. Why Deferred Rendering for COH2 Cons: ✔ Unable to handle transparent objects ✔ Antialiasing is harder to do properly ✔ Not very optimal for older generations of D3D9 Hardware Pros: ✔ Unlimited number of lights ✔ Less shader permutations ✔ Hugely simplified and faster shader code ✔ Easier to add modern rendering techniques like (SSAO,etc) ✔ Ability to add the needed features for COH2 to represent winter and still lots of room to spare to add more features in the future.
  • 45. COH2 Rendering Top Down Map Sun Near Shadow Sun Far Shadow Render Sun Light Compute Next Light Shadow Map Render Next Light More Visible Lights? Depth and Simplified Gbuffer Pass Light Pass Combiner Pass Water View Light Pass No World View Post Processing Yes Track Map
  • 46. COH2 Rendering Sun Near Shadow Sun Far Shadow Post-Processing Depth Prepass Gbuffer Pass SSAO / LAO Pass Light Pass Render Sun Light More Visible Lights? Combine/Resolve Pass Forward Pass (Fx/Transparent Objects) Depth and Simplified Gbuffer Pass Light Pass Combiner Pass Water View World View Light Pass No Top Down Map Track Map Compute Next Light Shadow Map Render Next Light Yes
  • 48. Acknowledgements • Thanks to Remy Saville, Ian Thompson, Bartek Nowakowski, Stuart Maxwell, Alun Bjorskten and James Harrison for their contributions to COH2 winter tech. • Thanks to all the great Artists at Relic that keep pushing the limit of what the engine can do and keep us busy with more ideas of how to make it better.
  • 49. Thank you • Questions? • Contact Information: • daniel.barrero@gmail.com • http://danielbarrero.com