SlideShare une entreprise Scribd logo
1  sur  43
A new Post-Processing Pipeline
Wolfgang Engel
Confetti
09/26/2013
Confetti
• Think-Tank for game and movie related industries
• Middleware Provider
– Aura – Dynamic Global Illumination System
– PixelPuzzle – PostFX pipeline
– Ephemeris – Dynamic Skydome system
-> License comes with full source-code
• Services:
– Hardware vendors
– many game developers (“Engine Tuner”)
• Provides software solutions for games, movies and
tools for GPU manufacturers
• http://www.conffx.com
Confetti
Tomb-Raider – TressFX / Hair Rendering
Confetti
Confetti
Confetti
Confetti
Confetti
Confetti
Dynamic Global Illumination system / Skydome System with volumetric Clouds
Agenda Post-Processing
• History
• Call for a new Post-Processing Pipeline
• Yxy Color Space
• Dynamic Local Gamma
• Depth of Field
History
• The first HDR rendering pipeline appeared in a
DirectX SDK in 2004
• From there on we called a collection of image
space effects at the end of the rendering
pipeline Post-Processing Pipeline
History
• The idea was to re-use resources == render
targets and data in the Post-Processing Pipeline
to apply effects like
– Tone-mapping + HDR rendering == dynamic contrast
operator
– Camera effects like Depth of Field, Motion Blur, lens
flare
– Color filters like contrast, saturation, color additions
and multiplications
• One of the first coverages of a collection of
effects in a Post-Processing Pipelines happened at
GDC 2007 [Engel2007]
History
• Since then
– Numerous new tone mapping operators were
introduced [Day2012]
– New more advanced Depth of Field algorithms
with shaped bokeh were introduced
• … but nothing changed fundamentally
Call for a new Post-Processing Pipeline
• RGB is not a color space for PostFX
-> we should use a color space that uses
luminance
• Global tone mapping operators didn’t work
out well in practice, only on paper
-> your artists probably limit the luminance values and
therefore the tone mapping operator because the textures
“blow out”
Call for a new Post-Processing Pipeline
• A fixed global gamma adjustment at the end
of the pipeline is a waste of cycles
– because it does a “similar thing” as the tone
mapper … why not just make it dynamic and part
of the tone mapper
– … we can also make it more local and not just
globally adjusting gamma
Call for a new Post-Processing Pipeline
• We can also add more stages to the Post-
Processing Pipeline
• Adding Screen-space
– Ambient occlusion by occupying the fourth channel of
the PostFX render targets or the luminance channel
– Skin
– Reflections by utilizing the “same” blur kernels
• Any new Post-Processing Pipeline needs to be
written in compute
-> substantial bandwidth savings and speed
increases
Simplified Pipeline Stages from 2007
Depth of Field
Tone Mapping
Color Filters
Gamma Control
Frame-Buffer
16x16 RT
Luminance
4x4 RT
Luminance
1x1 RT
Luminance
64x64 RT
Luminance
1x1 RT
Adapt Lum.
Measure Luminance
Adapt Luminance
Primary Render Target
Bright
Pass Filter
Z-Buffer
Downsample
½ Size
Downsample
¼ Size
Gauss Filter
Gauss Filter II
Yxy Color Space
• Instead of running the Post-Processing
Pipeline in RGB we can run it in Yxy
• Y holds then the luminance
Yxy Color Space
• To apply any tone mapping operation, we
have to convert RGB into a space that let’s us
easily separate luminance
-> tone mapping is applied to luminance*
* … don’t apply it to a RGB value … an artist will notice 
Yxy Color Space
• If we use Bloom, we have to apply tone
mapping twice in our pipeline
-> once in the Bright-Pass filter and once in
the final pass
-> that means we convert from RGB to
luminance and from luminance to RGB twice
Yxy Color Space
• If we run the whole pipeline in a color space
that holds luminance in a dedicated channel,
we only covert once into this color space and
at the end of the pipeline back
Yxy Color Space
• For Bloom we can run the bright-pass filter in
one channel
-> modern scalar GPU hardware
-> speed-up
Yxy Color Space
• To apply SSAO … just “mix” it into your Y
channel
• … and re-use a blur kernel you use anyway to
blur it
Yxy Color Space
• Why Yxy color space?
*based on Greg Wards LogLuv model
High-Dynamic Range
Rendering
Color Space # of cycles
(encoding)
Bilinear
Filtering
Blur Filter Alpha
Blending
RGB - Yes Yes Yes
HSV ~34 Yes No No
CIE Yxy ~19 Yes Yes No
L16uv* ~19 Yes Yes No
RGBE ~13 No No No
Dynamic Local Gamma
• From linear gamma to sRGB
float3 Color; Color = (Color <= 0.00304) ? Color * 12.92 : (1.055 * pow(Color, 1.0/2.4) - 0.055);
Dynamic Local Gamma
• It seems everyone is using a global Gamma
setting that is the same for every pixel on
screen
• Propose to change Gamma per-pixel
-> in fact Gamma correction is considered
different depending on brightness
-> we just didn’t implement it this way …
Dynamic Local Gamma
• The human eye’s visual gamma changes the
perceived luminance for various adaptation
conditions [Bartleson 1967] [Kwon 2011]
• If the eye’s adaptation level is low, the
exponent for Gamma increases
Dynamic Local Gamma
Changes in relative brightness contrast as a function of
adaptation of relative luminance and adaptation luminance
levels according to the result [Bartleson 1967]
Dynamic Local Gamma
• Local Gamma varies with luminance [Kwon
2011]*
𝛾 𝑣 = 0.444 + 0.045 ln 𝐿 𝑎𝑛 + 0.6034
𝑌 𝑌𝑥𝑦 = 𝐿 𝛾 𝑣
Dynamic Local Gamma
• 𝛾 𝑣 is changed based on the luminance value of
the current pixel
-> that means each pixels luminance value might be
gamma corrected with a different exponent
-> with the equation above, the exponent == gamma
value is in the range of 0.421 to 0.465
Dynamic Local Gamma
Applied Gamma Curve per-pixel based on luminance of pixel
• Eye’s adaptation == low -> blue curve
• Eye’s adaptation value == high -> green curve
Dynamic Local Gamma
• 𝐿 𝛾 𝑣 works with any tone mapping operator
• Example: [Reinhard]
• Artistically desirable to burn out bright areas
• Source art not always HDR
• Leaves 0..1
• 𝑌 𝑌𝑥𝑦 = 𝐿𝑢𝑚𝐶𝑜𝑚𝑝𝑟𝑒𝑠𝑠 𝛾 𝑣
• What is the visual difference?
• Dynamic light & shadow information is considered for
gamma
-> new information introduced in the pipeline is used to
modify the gamma correction
-> changes “naturally” depending on how bright or dark a
scene is
• Light looks better / shadows look better
Dynamic Local Gamma
Depth of Field
• When using cameras, this refers to the
distance in a scene that appears in focus
• To add artistic effect and/or focus attention
• Physically correct parameters and calculations
needed for a proper looking depth of field
– Tradeoff: parameters are not artist friendly
• Need a fast and efficient way to generate a
high quality Depth of Field effect
Depth of Field
• Circle of Confusion(CoC)
• When using a lens to produce an image, the size
of the resulting “spot” produced by a point in the
scene
• The Depth of Field is the region where the CoC is less than the
resolution of the human eye (or of the display medium)
Depth of Field
• Circle of Confusion(CoC)
– Affected by:
• F-stop - ratio of focal length to aperture size
• Focal length – distance from lens to image in focus
• Focus distance – distance to plane in focus
Depth of Field
• Calculating Circle of
Confusion(CoC)[Potmesil1981]
– 𝐶𝑜𝐶 =
𝑎𝑝𝑒𝑟𝑡𝑢𝑟𝑒 𝑠𝑖𝑧𝑒∗𝑓𝑜𝑐𝑎𝑙 𝑙𝑒𝑛𝑔𝑡ℎ ∗ 𝑓𝑜𝑐𝑢𝑠 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 −𝑑𝑒𝑝𝑡ℎ
𝑑𝑒𝑝𝑡ℎ ∗ 𝑓𝑜𝑐𝑢𝑠 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 −𝑓𝑜𝑐𝑎𝑙 𝑙𝑒𝑛𝑔𝑡ℎ
– 𝑓−𝑠𝑡𝑜𝑝 =
𝑓𝑜𝑐𝑎𝑙 𝑙𝑒𝑛𝑔𝑡ℎ
𝑎𝑝𝑒𝑟𝑡𝑢𝑟𝑒 𝑠𝑖𝑧𝑒
• CoC is negative for far field, positive for near field
• Convert CoC from meters to pixel units to find the
effective CoC on screen
Depth of Field
• Basic depth of field effect:
– Calculate CoC for each pixel
– Use CoC to generate separate results for near field
and far field
• Flat, shaped kernel useful for producing Bokeh effect
– Combine far field and focus field based on CoC
– Combine with the near field based on CoC and
near field coverage
Depth of Field
Red = max CoC (near field CoC)
Green = min CoC (far field CoC)
Depth of Field
Far field result in Yxy
Depth of Field
Near field result in Yxy
Depth of Field
References
• [Bartleson 1967] C. J. Bartleson and E. J. Breneman, “Brightness function: Effects of
adaptation,” J. Opt. Soc. Am., vol. 57, pp. 953-957, 1967.
• [Day2012] Mike Day, “An efficient and user-friendly tone mapping operator”,
http://www.insomniacgames.com/mike-day-an-efficient-and-user-friendly-tone-
mapping-operator/
• [Engel2007] Wolfgang Engel, “Post-Processing Pipeline”, GDC 2007
http://www.coretechniques.info/index_2007.html
• [Kwon 2011] Hyuk-Ju Kwon, Sung-Hak Lee, Seok-Min Chae, Kyu-Ik Sohng, “Tone
Mapping Algorithm for Luminance Separated HDR Rendering Based on Visual
Brightness Function”, online at http://world-comp.org/p2012/IPC3874.pdf
• [Reinhard] Erik Reinhard, Michael Stark, Peter Shirley, James Ferwerda,
"Photographic Tone Reproduction for Digital Images",
http://www.cs.utah.edu/~reinhard/cdrom/

Contenu connexe

Tendances

Around the World in 80 Shaders
Around the World in 80 ShadersAround the World in 80 Shaders
Around the World in 80 Shadersstevemcauley
 
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
 
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
 
Triangle Visibility buffer
Triangle Visibility bufferTriangle Visibility buffer
Triangle Visibility bufferWolfgang Engel
 
Volumetric Lighting for Many Lights in Lords of the Fallen
Volumetric Lighting for Many Lights in Lords of the FallenVolumetric Lighting for Many Lights in Lords of the Fallen
Volumetric Lighting for Many Lights in Lords of the FallenBenjamin Glatzel
 
Destruction Masking in Frostbite 2 using Volume Distance Fields
Destruction Masking in Frostbite 2 using Volume Distance FieldsDestruction Masking in Frostbite 2 using Volume Distance Fields
Destruction Masking in Frostbite 2 using Volume Distance FieldsElectronic Arts / DICE
 
Star Ocean 4 - Flexible Shader Managment and Post-processing
Star Ocean 4 - Flexible Shader Managment and Post-processingStar Ocean 4 - Flexible Shader Managment and Post-processing
Star Ocean 4 - Flexible Shader Managment and Post-processingumsl snfrzb
 
GTC 2014 - DirectX 11 Rendering and NVIDIA GameWorks in Batman: Arkham Origins
GTC 2014 - DirectX 11 Rendering and NVIDIA GameWorks in Batman: Arkham OriginsGTC 2014 - DirectX 11 Rendering and NVIDIA GameWorks in Batman: Arkham Origins
GTC 2014 - DirectX 11 Rendering and NVIDIA GameWorks in Batman: Arkham OriginsColin Barré-Brisebois
 
Photogrammetry and Star Wars Battlefront
Photogrammetry and Star Wars BattlefrontPhotogrammetry and Star Wars Battlefront
Photogrammetry and Star Wars BattlefrontElectronic Arts / DICE
 
High Dynamic Range color grading and display in Frostbite
High Dynamic Range color grading and display in FrostbiteHigh Dynamic Range color grading and display in Frostbite
High Dynamic Range color grading and display in FrostbiteElectronic Arts / DICE
 
A Bit More Deferred Cry Engine3
A Bit More Deferred   Cry Engine3A Bit More Deferred   Cry Engine3
A Bit More Deferred Cry Engine3guest11b095
 
More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...
More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...
More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...Colin Barré-Brisebois
 
Paris Master Class 2011 - 02 Screen Space Material System
Paris Master Class 2011 - 02 Screen Space Material SystemParis Master Class 2011 - 02 Screen Space Material System
Paris Master Class 2011 - 02 Screen Space Material SystemWolfgang Engel
 
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
 
Stable SSAO in Battlefield 3 with Selective Temporal Filtering
Stable SSAO in Battlefield 3 with Selective Temporal FilteringStable SSAO in Battlefield 3 with Selective Temporal Filtering
Stable SSAO in Battlefield 3 with Selective Temporal FilteringElectronic Arts / DICE
 
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
 

Tendances (20)

Around the World in 80 Shaders
Around the World in 80 ShadersAround the World in 80 Shaders
Around the World in 80 Shaders
 
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...
 
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 you up in Battlefield 3
Lighting you up in Battlefield 3Lighting you up in Battlefield 3
Lighting you up in Battlefield 3
 
Triangle Visibility buffer
Triangle Visibility bufferTriangle Visibility buffer
Triangle Visibility buffer
 
Volumetric Lighting for Many Lights in Lords of the Fallen
Volumetric Lighting for Many Lights in Lords of the FallenVolumetric Lighting for Many Lights in Lords of the Fallen
Volumetric Lighting for Many Lights in Lords of the Fallen
 
Destruction Masking in Frostbite 2 using Volume Distance Fields
Destruction Masking in Frostbite 2 using Volume Distance FieldsDestruction Masking in Frostbite 2 using Volume Distance Fields
Destruction Masking in Frostbite 2 using Volume Distance Fields
 
Star Ocean 4 - Flexible Shader Managment and Post-processing
Star Ocean 4 - Flexible Shader Managment and Post-processingStar Ocean 4 - Flexible Shader Managment and Post-processing
Star Ocean 4 - Flexible Shader Managment and Post-processing
 
GTC 2014 - DirectX 11 Rendering and NVIDIA GameWorks in Batman: Arkham Origins
GTC 2014 - DirectX 11 Rendering and NVIDIA GameWorks in Batman: Arkham OriginsGTC 2014 - DirectX 11 Rendering and NVIDIA GameWorks in Batman: Arkham Origins
GTC 2014 - DirectX 11 Rendering and NVIDIA GameWorks in Batman: Arkham Origins
 
Photogrammetry and Star Wars Battlefront
Photogrammetry and Star Wars BattlefrontPhotogrammetry and Star Wars Battlefront
Photogrammetry and Star Wars Battlefront
 
High Dynamic Range color grading and display in Frostbite
High Dynamic Range color grading and display in FrostbiteHigh Dynamic Range color grading and display in Frostbite
High Dynamic Range color grading and display in Frostbite
 
A Bit More Deferred Cry Engine3
A Bit More Deferred   Cry Engine3A Bit More Deferred   Cry Engine3
A Bit More Deferred Cry Engine3
 
DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering in Battlefield 3DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering in Battlefield 3
 
More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...
More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...
More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...
 
Shiny PC Graphics in Battlefield 3
Shiny PC Graphics in Battlefield 3Shiny PC Graphics in Battlefield 3
Shiny PC Graphics in Battlefield 3
 
Paris Master Class 2011 - 02 Screen Space Material System
Paris Master Class 2011 - 02 Screen Space Material SystemParis Master Class 2011 - 02 Screen Space Material System
Paris Master Class 2011 - 02 Screen Space Material System
 
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
 
Stable SSAO in Battlefield 3 with Selective Temporal Filtering
Stable SSAO in Battlefield 3 with Selective Temporal FilteringStable SSAO in Battlefield 3 with Selective Temporal Filtering
Stable SSAO in Battlefield 3 with Selective Temporal Filtering
 
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)
 
Light prepass
Light prepassLight prepass
Light prepass
 

Similaire à A new Post-Processing Pipeline

Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...
Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...
Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...Unity Technologies
 
Color me intrigued: A jaunt through color technology in video
Color me intrigued: A jaunt through color technology in videoColor me intrigued: A jaunt through color technology in video
Color me intrigued: A jaunt through color technology in videoVittorio Giovara
 
unit_5 ppt DIRECT BROADCAST SATELLITE.pptx
unit_5 ppt DIRECT BROADCAST SATELLITE.pptxunit_5 ppt DIRECT BROADCAST SATELLITE.pptx
unit_5 ppt DIRECT BROADCAST SATELLITE.pptxrubini Rubini
 
12-Image enhancement and filtering.ppt
12-Image enhancement and filtering.ppt12-Image enhancement and filtering.ppt
12-Image enhancement and filtering.pptAJAYMALIK97
 
HiPEAC 2019 Workshop - Use Cases
HiPEAC 2019 Workshop - Use CasesHiPEAC 2019 Workshop - Use Cases
HiPEAC 2019 Workshop - Use CasesTulipp. Eu
 
「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発Unity Technologies Japan K.K.
 
Broadcast Camera Technology, Part 3
Broadcast Camera Technology, Part 3Broadcast Camera Technology, Part 3
Broadcast Camera Technology, Part 3Dr. Mohieddin Moradi
 
UHK-430 White paper
UHK-430 White paperUHK-430 White paper
UHK-430 White paperKris Hill
 
Unity: Next Level Rendering Quality
Unity: Next Level Rendering QualityUnity: Next Level Rendering Quality
Unity: Next Level Rendering QualityUnity Technologies
 
Advanced Lighting for Interactive Applications
Advanced Lighting for Interactive ApplicationsAdvanced Lighting for Interactive Applications
Advanced Lighting for Interactive Applicationsstefan_b
 
DLP Projection systems
DLP Projection systemsDLP Projection systems
DLP Projection systemsVarun Kambrath
 
HEVC VIDEO CODEC By Vinayagam Mariappan
HEVC VIDEO CODEC By Vinayagam MariappanHEVC VIDEO CODEC By Vinayagam Mariappan
HEVC VIDEO CODEC By Vinayagam MariappanVinayagam Mariappan
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologyTiago Sousa
 
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
 
Extended Light Maps
Extended Light MapsExtended Light Maps
Extended Light Mapsstefan_b
 
Image enhancement
Image enhancementImage enhancement
Image enhancementAyaelshiwi
 
Deferred Lighting and Post Processing on PLAYSTATION®3
Deferred Lighting and Post Processing on PLAYSTATION®3Deferred Lighting and Post Processing on PLAYSTATION®3
Deferred Lighting and Post Processing on PLAYSTATION®3Slide_N
 
Edge detection-based post-processing in Warlords of Draenor
Edge detection-based post-processing in Warlords of DraenorEdge detection-based post-processing in Warlords of Draenor
Edge detection-based post-processing in Warlords of DraenorGael Hofemeier
 
The Next Generation of PhyreEngine
The Next Generation of PhyreEngineThe Next Generation of PhyreEngine
The Next Generation of PhyreEngineSlide_N
 

Similaire à A new Post-Processing Pipeline (20)

Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...
Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...
Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...
 
Color me intrigued: A jaunt through color technology in video
Color me intrigued: A jaunt through color technology in videoColor me intrigued: A jaunt through color technology in video
Color me intrigued: A jaunt through color technology in video
 
unit_5 ppt DIRECT BROADCAST SATELLITE.pptx
unit_5 ppt DIRECT BROADCAST SATELLITE.pptxunit_5 ppt DIRECT BROADCAST SATELLITE.pptx
unit_5 ppt DIRECT BROADCAST SATELLITE.pptx
 
12-Image enhancement and filtering.ppt
12-Image enhancement and filtering.ppt12-Image enhancement and filtering.ppt
12-Image enhancement and filtering.ppt
 
HiPEAC 2019 Workshop - Use Cases
HiPEAC 2019 Workshop - Use CasesHiPEAC 2019 Workshop - Use Cases
HiPEAC 2019 Workshop - Use Cases
 
「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発
 
Deferred shading
Deferred shadingDeferred shading
Deferred shading
 
Broadcast Camera Technology, Part 3
Broadcast Camera Technology, Part 3Broadcast Camera Technology, Part 3
Broadcast Camera Technology, Part 3
 
UHK-430 White paper
UHK-430 White paperUHK-430 White paper
UHK-430 White paper
 
Unity: Next Level Rendering Quality
Unity: Next Level Rendering QualityUnity: Next Level Rendering Quality
Unity: Next Level Rendering Quality
 
Advanced Lighting for Interactive Applications
Advanced Lighting for Interactive ApplicationsAdvanced Lighting for Interactive Applications
Advanced Lighting for Interactive Applications
 
DLP Projection systems
DLP Projection systemsDLP Projection systems
DLP Projection systems
 
HEVC VIDEO CODEC By Vinayagam Mariappan
HEVC VIDEO CODEC By Vinayagam MariappanHEVC VIDEO CODEC By Vinayagam Mariappan
HEVC VIDEO CODEC By Vinayagam Mariappan
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics Technology
 
Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]
 
Extended Light Maps
Extended Light MapsExtended Light Maps
Extended Light Maps
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Deferred Lighting and Post Processing on PLAYSTATION®3
Deferred Lighting and Post Processing on PLAYSTATION®3Deferred Lighting and Post Processing on PLAYSTATION®3
Deferred Lighting and Post Processing on PLAYSTATION®3
 
Edge detection-based post-processing in Warlords of Draenor
Edge detection-based post-processing in Warlords of DraenorEdge detection-based post-processing in Warlords of Draenor
Edge detection-based post-processing in Warlords of Draenor
 
The Next Generation of PhyreEngine
The Next Generation of PhyreEngineThe Next Generation of PhyreEngine
The Next Generation of PhyreEngine
 

Plus de Wolfgang Engel

A modern Post-Processing Pipeline
A modern Post-Processing PipelineA modern Post-Processing Pipeline
A modern Post-Processing PipelineWolfgang Engel
 
Paris Master Class 2011 - 06 Gpu Particle System
Paris Master Class 2011 - 06 Gpu Particle SystemParis Master Class 2011 - 06 Gpu Particle System
Paris Master Class 2011 - 06 Gpu Particle SystemWolfgang Engel
 
Paris Master Class 2011 - 03 Order Independent Transparency
Paris Master Class 2011 - 03 Order Independent TransparencyParis Master Class 2011 - 03 Order Independent Transparency
Paris Master Class 2011 - 03 Order Independent TransparencyWolfgang Engel
 
Paris Master Class 2011 - 00 Paris Master Class
Paris Master Class 2011 - 00 Paris Master ClassParis Master Class 2011 - 00 Paris Master Class
Paris Master Class 2011 - 00 Paris Master ClassWolfgang Engel
 

Plus de Wolfgang Engel (6)

A modern Post-Processing Pipeline
A modern Post-Processing PipelineA modern Post-Processing Pipeline
A modern Post-Processing Pipeline
 
Light and Shadows
Light and ShadowsLight and Shadows
Light and Shadows
 
Paris Master Class 2011 - 06 Gpu Particle System
Paris Master Class 2011 - 06 Gpu Particle SystemParis Master Class 2011 - 06 Gpu Particle System
Paris Master Class 2011 - 06 Gpu Particle System
 
Paris Master Class 2011 - 03 Order Independent Transparency
Paris Master Class 2011 - 03 Order Independent TransparencyParis Master Class 2011 - 03 Order Independent Transparency
Paris Master Class 2011 - 03 Order Independent Transparency
 
Paris Master Class 2011 - 00 Paris Master Class
Paris Master Class 2011 - 00 Paris Master ClassParis Master Class 2011 - 00 Paris Master Class
Paris Master Class 2011 - 00 Paris Master Class
 
Hair in Tomb Raider
Hair in Tomb RaiderHair in Tomb Raider
Hair in Tomb Raider
 

Dernier

Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Engineering Drawing section of solid
Engineering Drawing     section of solidEngineering Drawing     section of solid
Engineering Drawing section of solidnamansinghjarodiya
 
Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxVelmuruganTECE
 
Autonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.pptAutonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.pptbibisarnayak0
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxsiddharthjain2303
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
Risk Management in Engineering Construction Project
Risk Management in Engineering Construction ProjectRisk Management in Engineering Construction Project
Risk Management in Engineering Construction ProjectErbil Polytechnic University
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdfHafizMudaserAhmad
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgsaravananr517913
 
DM Pillar Training Manual.ppt will be useful in deploying TPM in project
DM Pillar Training Manual.ppt will be useful in deploying TPM in projectDM Pillar Training Manual.ppt will be useful in deploying TPM in project
DM Pillar Training Manual.ppt will be useful in deploying TPM in projectssuserb6619e
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - GuideGOPINATHS437943
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdfCaalaaAbdulkerim
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Erbil Polytechnic University
 
Industrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptIndustrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptNarmatha D
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 

Dernier (20)

Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Engineering Drawing section of solid
Engineering Drawing     section of solidEngineering Drawing     section of solid
Engineering Drawing section of solid
 
Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptx
 
Autonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.pptAutonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.ppt
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptx
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
Risk Management in Engineering Construction Project
Risk Management in Engineering Construction ProjectRisk Management in Engineering Construction Project
Risk Management in Engineering Construction Project
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
 
DM Pillar Training Manual.ppt will be useful in deploying TPM in project
DM Pillar Training Manual.ppt will be useful in deploying TPM in projectDM Pillar Training Manual.ppt will be useful in deploying TPM in project
DM Pillar Training Manual.ppt will be useful in deploying TPM in project
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - Guide
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdf
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
 
Industrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptIndustrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.ppt
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 

A new Post-Processing Pipeline

  • 1. A new Post-Processing Pipeline Wolfgang Engel Confetti 09/26/2013
  • 2. Confetti • Think-Tank for game and movie related industries • Middleware Provider – Aura – Dynamic Global Illumination System – PixelPuzzle – PostFX pipeline – Ephemeris – Dynamic Skydome system -> License comes with full source-code • Services: – Hardware vendors – many game developers (“Engine Tuner”) • Provides software solutions for games, movies and tools for GPU manufacturers • http://www.conffx.com
  • 9. Confetti Dynamic Global Illumination system / Skydome System with volumetric Clouds
  • 10. Agenda Post-Processing • History • Call for a new Post-Processing Pipeline • Yxy Color Space • Dynamic Local Gamma • Depth of Field
  • 11. History • The first HDR rendering pipeline appeared in a DirectX SDK in 2004 • From there on we called a collection of image space effects at the end of the rendering pipeline Post-Processing Pipeline
  • 12. History • The idea was to re-use resources == render targets and data in the Post-Processing Pipeline to apply effects like – Tone-mapping + HDR rendering == dynamic contrast operator – Camera effects like Depth of Field, Motion Blur, lens flare – Color filters like contrast, saturation, color additions and multiplications • One of the first coverages of a collection of effects in a Post-Processing Pipelines happened at GDC 2007 [Engel2007]
  • 13. History • Since then – Numerous new tone mapping operators were introduced [Day2012] – New more advanced Depth of Field algorithms with shaped bokeh were introduced • … but nothing changed fundamentally
  • 14. Call for a new Post-Processing Pipeline • RGB is not a color space for PostFX -> we should use a color space that uses luminance • Global tone mapping operators didn’t work out well in practice, only on paper -> your artists probably limit the luminance values and therefore the tone mapping operator because the textures “blow out”
  • 15. Call for a new Post-Processing Pipeline • A fixed global gamma adjustment at the end of the pipeline is a waste of cycles – because it does a “similar thing” as the tone mapper … why not just make it dynamic and part of the tone mapper – … we can also make it more local and not just globally adjusting gamma
  • 16. Call for a new Post-Processing Pipeline • We can also add more stages to the Post- Processing Pipeline • Adding Screen-space – Ambient occlusion by occupying the fourth channel of the PostFX render targets or the luminance channel – Skin – Reflections by utilizing the “same” blur kernels • Any new Post-Processing Pipeline needs to be written in compute -> substantial bandwidth savings and speed increases
  • 17. Simplified Pipeline Stages from 2007 Depth of Field Tone Mapping Color Filters Gamma Control Frame-Buffer 16x16 RT Luminance 4x4 RT Luminance 1x1 RT Luminance 64x64 RT Luminance 1x1 RT Adapt Lum. Measure Luminance Adapt Luminance Primary Render Target Bright Pass Filter Z-Buffer Downsample ½ Size Downsample ¼ Size Gauss Filter Gauss Filter II
  • 18. Yxy Color Space • Instead of running the Post-Processing Pipeline in RGB we can run it in Yxy • Y holds then the luminance
  • 19. Yxy Color Space • To apply any tone mapping operation, we have to convert RGB into a space that let’s us easily separate luminance -> tone mapping is applied to luminance* * … don’t apply it to a RGB value … an artist will notice 
  • 20. Yxy Color Space • If we use Bloom, we have to apply tone mapping twice in our pipeline -> once in the Bright-Pass filter and once in the final pass -> that means we convert from RGB to luminance and from luminance to RGB twice
  • 21. Yxy Color Space • If we run the whole pipeline in a color space that holds luminance in a dedicated channel, we only covert once into this color space and at the end of the pipeline back
  • 22. Yxy Color Space • For Bloom we can run the bright-pass filter in one channel -> modern scalar GPU hardware -> speed-up
  • 23. Yxy Color Space • To apply SSAO … just “mix” it into your Y channel • … and re-use a blur kernel you use anyway to blur it
  • 24. Yxy Color Space • Why Yxy color space? *based on Greg Wards LogLuv model High-Dynamic Range Rendering Color Space # of cycles (encoding) Bilinear Filtering Blur Filter Alpha Blending RGB - Yes Yes Yes HSV ~34 Yes No No CIE Yxy ~19 Yes Yes No L16uv* ~19 Yes Yes No RGBE ~13 No No No
  • 25. Dynamic Local Gamma • From linear gamma to sRGB float3 Color; Color = (Color <= 0.00304) ? Color * 12.92 : (1.055 * pow(Color, 1.0/2.4) - 0.055);
  • 26. Dynamic Local Gamma • It seems everyone is using a global Gamma setting that is the same for every pixel on screen • Propose to change Gamma per-pixel -> in fact Gamma correction is considered different depending on brightness -> we just didn’t implement it this way …
  • 27. Dynamic Local Gamma • The human eye’s visual gamma changes the perceived luminance for various adaptation conditions [Bartleson 1967] [Kwon 2011] • If the eye’s adaptation level is low, the exponent for Gamma increases
  • 28. Dynamic Local Gamma Changes in relative brightness contrast as a function of adaptation of relative luminance and adaptation luminance levels according to the result [Bartleson 1967]
  • 29. Dynamic Local Gamma • Local Gamma varies with luminance [Kwon 2011]* 𝛾 𝑣 = 0.444 + 0.045 ln 𝐿 𝑎𝑛 + 0.6034 𝑌 𝑌𝑥𝑦 = 𝐿 𝛾 𝑣
  • 30. Dynamic Local Gamma • 𝛾 𝑣 is changed based on the luminance value of the current pixel -> that means each pixels luminance value might be gamma corrected with a different exponent -> with the equation above, the exponent == gamma value is in the range of 0.421 to 0.465
  • 31. Dynamic Local Gamma Applied Gamma Curve per-pixel based on luminance of pixel • Eye’s adaptation == low -> blue curve • Eye’s adaptation value == high -> green curve
  • 32. Dynamic Local Gamma • 𝐿 𝛾 𝑣 works with any tone mapping operator • Example: [Reinhard] • Artistically desirable to burn out bright areas • Source art not always HDR • Leaves 0..1 • 𝑌 𝑌𝑥𝑦 = 𝐿𝑢𝑚𝐶𝑜𝑚𝑝𝑟𝑒𝑠𝑠 𝛾 𝑣
  • 33. • What is the visual difference? • Dynamic light & shadow information is considered for gamma -> new information introduced in the pipeline is used to modify the gamma correction -> changes “naturally” depending on how bright or dark a scene is • Light looks better / shadows look better Dynamic Local Gamma
  • 34. Depth of Field • When using cameras, this refers to the distance in a scene that appears in focus • To add artistic effect and/or focus attention • Physically correct parameters and calculations needed for a proper looking depth of field – Tradeoff: parameters are not artist friendly • Need a fast and efficient way to generate a high quality Depth of Field effect
  • 35. Depth of Field • Circle of Confusion(CoC) • When using a lens to produce an image, the size of the resulting “spot” produced by a point in the scene • The Depth of Field is the region where the CoC is less than the resolution of the human eye (or of the display medium)
  • 36. Depth of Field • Circle of Confusion(CoC) – Affected by: • F-stop - ratio of focal length to aperture size • Focal length – distance from lens to image in focus • Focus distance – distance to plane in focus
  • 37. Depth of Field • Calculating Circle of Confusion(CoC)[Potmesil1981] – 𝐶𝑜𝐶 = 𝑎𝑝𝑒𝑟𝑡𝑢𝑟𝑒 𝑠𝑖𝑧𝑒∗𝑓𝑜𝑐𝑎𝑙 𝑙𝑒𝑛𝑔𝑡ℎ ∗ 𝑓𝑜𝑐𝑢𝑠 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 −𝑑𝑒𝑝𝑡ℎ 𝑑𝑒𝑝𝑡ℎ ∗ 𝑓𝑜𝑐𝑢𝑠 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 −𝑓𝑜𝑐𝑎𝑙 𝑙𝑒𝑛𝑔𝑡ℎ – 𝑓−𝑠𝑡𝑜𝑝 = 𝑓𝑜𝑐𝑎𝑙 𝑙𝑒𝑛𝑔𝑡ℎ 𝑎𝑝𝑒𝑟𝑡𝑢𝑟𝑒 𝑠𝑖𝑧𝑒 • CoC is negative for far field, positive for near field • Convert CoC from meters to pixel units to find the effective CoC on screen
  • 38. Depth of Field • Basic depth of field effect: – Calculate CoC for each pixel – Use CoC to generate separate results for near field and far field • Flat, shaped kernel useful for producing Bokeh effect – Combine far field and focus field based on CoC – Combine with the near field based on CoC and near field coverage
  • 39. Depth of Field Red = max CoC (near field CoC) Green = min CoC (far field CoC)
  • 40. Depth of Field Far field result in Yxy
  • 41. Depth of Field Near field result in Yxy
  • 43. References • [Bartleson 1967] C. J. Bartleson and E. J. Breneman, “Brightness function: Effects of adaptation,” J. Opt. Soc. Am., vol. 57, pp. 953-957, 1967. • [Day2012] Mike Day, “An efficient and user-friendly tone mapping operator”, http://www.insomniacgames.com/mike-day-an-efficient-and-user-friendly-tone- mapping-operator/ • [Engel2007] Wolfgang Engel, “Post-Processing Pipeline”, GDC 2007 http://www.coretechniques.info/index_2007.html • [Kwon 2011] Hyuk-Ju Kwon, Sung-Hak Lee, Seok-Min Chae, Kyu-Ik Sohng, “Tone Mapping Algorithm for Luminance Separated HDR Rendering Based on Visual Brightness Function”, online at http://world-comp.org/p2012/IPC3874.pdf • [Reinhard] Erik Reinhard, Michael Stark, Peter Shirley, James Ferwerda, "Photographic Tone Reproduction for Digital Images", http://www.cs.utah.edu/~reinhard/cdrom/

Notes de l'éditeur

  1. When the eye is adapted to a dark light conditions, the curve is rounder -> darker colors get more precision if the eye is adapted to bright light conditions, the curve is more flat … -> precision is more distributed
  2. 𝛾𝑣 changes based on the luminance value of the current pixel -> that means the current luminance value is gamma corrected with a different exponent -> the gamma correction value is in the range of 0.421 to 0.465
  3. Important Overview Points about DOF Depth of field effect: what “depth of field” actually refers to when using cameras Depth of field is useful for adding artistic effect and/or focusing the attention in a scene or during active gameplay To get a proper, high quality depth of field, you need to use physically correct parameters and calculations, which requires understanding how a camera works. The tradeoff is parameters are not as artist friendly, because you need to understand a camera to adjust depth of field properly. Need a fast an efficient way to generate a high quality depth of field
  4. Overview of Basic DOF knowledge Circle of confusion calculation peformed for each pixel of the downsampled PostFX buffers All distances are in meters, including the CoC size Convert CoC from meters to pixel units to determine size of CoC blur Calculate circle of confusion for each pixel, reconstructing the depth in meters
  5. Far field result in Yxy
  6. Near field result in Yxy
  7. Final result