SlideShare a Scribd company logo
1 of 39
Game Developers Conference 2011



  Approximating Translucency
for a Fast, Cheap and Convincing
   Subsurface Scattering Look

       Colin Barré-Brisebois (speaker)
               Marc Bouchard
Agenda
•   Prelude – Real-Time Demo
•   1. Translucency in Computer Graphics
•   2. Technique Details
•   3. Implementation Details
•   Q&A




                                           Fig. 1 – Real-Time Translucency in Frostbite 2
Real-Time Translucency
Demo
Translucency in Computer
Graphics
Translucency
The quality of allowing light to pass partially and diffusely
inside media.




          Fig. 2 – Translucency in Athena Statue (left) [BarréBrisebois11], and child’s hand (right)
Translucency in Computer Graphics
• We rely heavily on BRDFs for describing local
   reflections
  – Simple and effective for opaque objects
• However, many objects in nature are (partly)
  translucent
  – Light transport also happens within the surface
  – BRDFs are not sufficient
• BSSRDFs allow for an even better simulation
  – But are usually more/too expensive
• In our case, we chose BSDFs (BRDF + BTDF),
   with some elements of BSSRDF
                                                      Fig. 3 – BRDF, BTDF and BSSRDF
The State of Translucency
Real-time translucency and derivatives come in different
flavors:
• The more complex, but (relatively) expensive
  – [Chang08] Texture-space Importance Sampling
  – [Hable09] Texture-space Diffusion blurs, for skin / SSS
  – [Ki09] Shadowmap-based Translucency / SSS




                                                                   Fig. 5 – Texture-space Diffusion [Hable09]


            Fig. 4 – Texture-space Importance Sampling [Chang08]
The State of Translucency (cont.)
Real-time translucency and derivatives come in different
flavors:
• The simpler, but faster
  – [Sousa08] double-sided lighting &
    attenuation for foliage
• We want: fast like [Sousa08], and
  nice / complex results like the
  others 



                                        Fig. 6 – Foliage Translucency from Crytek’s Crysis
And we got...




          Fig. 7 – Real-Time Translucency in EA DICE’s Frostbite 2 Engine
And we got... (cont.)




      Fig. 8 – Real-Time Translucency (Skin/Left, Hebe/Right) in EA DICE’s Frostbite 2 Engine
Technique Details
Overview
• We don’t want to rely on additional depth maps and texture-space blurs
  – Requires more memory (i.e. for depth maps)
  – Requires significant computation (i.e. for texture blurs)
  – The previous are still feasible, but what if we could do without...
• In essence, for convincing translucency, the light traveling inside the shape:
  – Has to be influenced by the varying thickness of the object
  – Has to show some view & light-dependent diffusion/attenuation
• We only really need a simple representation of inner surface diffusion
  – Most users will be convinced even if not fully accurate!
  – Also, if the effect is cheap, we are free to use it everywhere!*   
Overview (cont.)




            Fig. 9 – Direct and Translucency Lighting Vectors
Local Thickness




              Fig. 10 – Local Thickness on Hebe
Computing Local Thickness
• We rely on ambient occlusion for computing this info:
 1. Invert the surface normals
 2. Render ambient occlusion
 3. Invert the colors and store in texture
• Can also be stored in vertex color, if tesselation allows
• Similar to [Sousa08], but streamlined for meshes of varying
  shapes and sizes.
Computing Local Thickness (cont.)




             Fig. 11 – Local Thickness Texture for Hebe
What About Subsurface Scattering?
Even if not mathematically perfect,
our technique gives an impression
of SSS:
• Local thickness approximates light
  transport inside the shape
  – Different color for direct and indirect light
    gives convicing light color subsurface transfer
• View-oriented distortion and attenuation
  gives an organic result, breaking the
  uniformity
                                                      Fig. 13 – Our Technique,
                                                                combined with Skin Shading
Implementation Details
Code
half3
vLTLight
=
vLight
+
vNormal
*
fLTDistortion;
half
fLTDot
=
pow(saturate(dot(vEye,
‐vLTLight)),
iLTPower)
*
fLTScale;
half3
fLT
=
fLightAttenuation
*
(fLTDot
+
fLTAmbient)
*
fLTThickness;
outColor.rgb
+=
cDiffuseAlbedo
*
cLightDiffuse
*
fLT;

• Generates approx. 13 ALU
  instructions (based on platform)
  – More performance details in following
    slides
• Can precompute powers in order to
  get rid of the pow()

                                            Fig. 9 – Direct and Translucency Lighting Vectors
Managing the Data at Runtime
At runtime, we have several parameters to manage, some per-
light, some per-material:
• Per-light parameters are used during the deferred light pass
• Per-material parameters are stored in the g-buffer
 – Can also be stored in a separate buffer, if space-limited
 – Some parameters make more sense per-light, some per-material
 – This is very specific to your g-buffer setup
 – Might require some clever packing/unpacking
   • For packing more parameters on a per-material basis, instead of per-light
 – Using this technique with deferred shading definitely brings-the-thunder!
Managing the Data at Runtime (cont.)
half3
vLTLight
=
vLight
+
vNormal
*
fLTDistortion;
half
fLTDot
=
pow(saturate(dot(vEye,
‐vLTLight)),
iLTPower)
*
fLTScale;
half3
fLT
=
fLightAttenuation
*
(fLTDot
+
fLTAmbient)
*
fLTThickness;
outColor.rgb
+=
cDiffuseAlbedo
*
cLightDiffuse
*
fLT;


fLTAmbient
• Ambient value
• Visible from all angles
• Representing both front and back
  translucency that is always present
• Optimally, per-material
                                              Fig. 14 – Ambient Term
Managing the Data at Runtime (cont.)
half3
vLTLight
=
vLight
+
vNormal
*
fLTDistortion;
half
fLTDot
=
pow(saturate(dot(vEye,
‐vLTLight)),
iLTPower)
*
fLTScale;
half3
fLT
=
fLightAttenuation
*
(fLTDot
+
fLTAmbient)
*
fLTThickness;
outColor.rgb
+=
cDiffuseAlbedo
*
cLightDiffuse
*
fLT;


iLTPower
• Power value for direct translucency
• Breaks continuity, view-dependent
• Can be optimized with pre-computed
  powers
• Optimally, per-material
                                          Fig. 16 – Power (4/Left, 12/Right) Term
Managing the Data at Runtime (cont.)
half3
vLTLight
=
vLight
+
vNormal
*
fLTDistortion;
half
fLTDot
=
pow(saturate(dot(vEye,
‐vLTLight)),
iLTPower)
*
fLTScale;
half3
fLT
=
fLightAttenuation
*
(fLTDot
+
fLTAmbient)
*
fLTThickness;
outColor.rgb
+=
cDiffuseAlbedo
*
cLightDiffuse
*
fLT;


fLTDistortion
• Subsurface Distortion
• Shifts the surface normal
• Breaks continuity, view-dependent
  Allows for more organic, Fresnel-like
• Optimally, per-material
                                          Fig. 17 – Distortion (None/Left, 0.2/Right) Term
Managing the Data at Runtime (cont.)
half3
vLTLight
=
vLight
+
vNormal
*
fLTDistortion;
half
fLTDot
=
pow(saturate(dot(vEye,
‐vLTLight)),
iLTPower)
*
fLTScale;
half3
fLT
=
fLightAttenuation
*
(fLTDot
+
fLTAmbient)
*
fLTThickness;
outColor.rgb
+=
cDiffuseAlbedo
*
cLightDiffuse
*
fLT;


fLTThickness
• Pre-computed Local Thickness Map
• Used for both direct and indirect
  translucency
• Attenuates the computation where
  surface thickness varies
• Defined per-material
                                              Fig. 18 – Local Thickness
Managing the Data at Runtime (cont.)
half3
vLTLight
=
vLight
+
vNormal
*
fLTDistortion;
half
fLTDot
=
pow(saturate(dot(vEye,
‐vLTLight)),
iLTPower)
*
fLTScale;
half3
fLT
=
fLightAttenuation
*
(fLTDot
+
fLTAmbient)
*
fLTThickness;
outColor.rgb
+=
cDiffuseAlbedo
*
cLightDiffuse
*
fLT;


fLTScale
• Scale value
• Direct / Back translucency
• View-oriented
• Should be defined per-light. This
  makes it the central control point
                                          Fig. 15 – Scale (1/Left, 5/Right) Term
All-Together




               Fig. 19 – The Final Result on Hebe
Deferred Shading G-Buffer Setup
Minimally, translucency can be stored in the g-buffer as a
single greyscale value:




                       Fig. 20 – Our G-Buffer, with greyscale Translucency

Based on your game, this can be enough. The color will then only originate
from the light sources (and also diffuse albedo).
Deferred Shading G-Buffer Setup (cont.)


All objects here are
relying on a
greyscale value
for translucency 




                       Fig. 1 – Real-Time Translucency in Frostbite 2
Deferred Shading G-Buffer Setup (cont.)
Better results will be achieved if translucency is a color (here,
with some packing):




                   Fig. 21 – Our G-Buffer, with coloured Translucency (packed/offset)
This translucency color, representing our inner surface color diffusion, will
be combined to the light color and the material’s diffuse albedo.
Deferred Shading G-Buffer Setup (cont.)

Green Light
White Albedo
Red Translucency ->
# #          #     #     #
   #     #     #     #                                                         <- Blue Light
     #     #     #     #
       #                                                                          White Albedo &
                                                                                  Translucency



                             Fig. 22 – Real-Time Translucency in Frostbite 2
Performance
                         XBOX
360     PLAYSTATION
3      PC
(DX11)
Full‐Screen

Coverage
   0.6
ms       1.0
ms             0.03
ms

Instruc9ons
             13           17                 12



• PS3: Takes advantage of our light-tile rendering on SPUs
   – See Christina Coffin’s ”SPU Deferred Shading for BF3 on PS3”
• DX11: Supported in our Compute Shader solution
   – See Johan Andersson’s “DX11 rendering in Battlefield 3” talk for more
     DX11-related details
• PC: AMD Radeon 6970
Caveats
• Doesn’t take all concavities into account
• Technique is optimal for convex hulls
• Doesn’t work with morphing/animated
  objects
  – Alternative: Though camera dependent, several
    cases could work with a real-time thickness approximation
    [Oat08]
  – Alternative: Could also use an hybrid dynamic AO            Fig. 23 – Concave Hull
    computation, with inverted normals
Summary and Q&A
• We presented an artist-friendly, fast and scalable real-time
  approximation of light transport in translucent homogenous
  media:
 – Improves games visuals by adding a new dimension, with light traveling
   inside shapes
 – Has a scalable and reasonable impact on runtime
 – Provides convincing results even if not mathematically
   perfect
• This technique is also published in GPU Pro 2,
  released this week at GDC. Check out the book!
Special Thanks
•   Sergei Savchenko
•   Johan Andersson (@repi)
•   Christina Coffin (@christinacoffin)
•   Halldor Fannar
•   Joakim Svärling
•   Stephen Hill (@self_shadow)
•   Frederic O’Reilly
•   John White
•   Wessam Bahnassi
•   Carsten Dachsbacher
•   Daniel Collin (@daniel_collin)
•   Torbjörn Malmer
•   Kenny Magnusson                       • Mohannad Al-Khatib (@psychodesigns)
•   Dominik Bauset                        • Colin Boswell (@bozz)
•   Sandra Jensen
References
[BarréBrisebois11] Barré-Brisebois, Colin and Bouchard, Marc.”Real-Time Approximation of Light Transport
                         in Translucent Homogenous Media”, GPU Pro 2, Wolfgang Engel, Ed. Charles River
                         Media, 2011.
[Chang08]                Chang, Chih-Wen, Lin, Wen-Chieh, Ho, Tan-Chi, Huang, Tsung-Shian and Chuang,
                         Jung-Hong. “Real-Time Translucent Rendering Using GPU-based Texture Space
                         Importance Sampling,” Computer Graphics Forum (Eurographics 2008), Vol. 27,
                         No. 2, 2008, pp 517-526.
[Hable09]                Hable, John, Borshukov, George and Hejl, Jim. “Fast Skin Shading,” ShaderX7: Advanced
                         Rendering Techniques, Wolfgang Engel, Ed., Charles River Media, 2009: pp. 161-173.
[Ki09]                   Ki, Hyunwoo. “Real-time Subsurface Scattering Using Shadow Maps,” ShaderX7:
                         Advanced Rendering Techniques, Wolfgang Engel, Ed., Charles River Media, 2009:
                         pp. 467-478.
[Oat08]                  Oat, Christopher and Scheuermann, Thorsten. “Computing Per-Pixel Object Thickness in
                         a Single Render Pass,” ShaderX6: Advanced Rendering Techniques, Wolfgang Engel,
                         Ed., Charles River Media, 2008: pp. 57-62.
[Sousa08]                Sousa, Tiago. “Vegetation Procedural Animation and Shading in Crysis,” GPU Gems 3,
                         Hubert Nguyen, Ed., Addison-Wesley, 2008: pp. 373-385.
Colin Barre-Brisebois - GDC 2011 - Approximating Translucency for a Fast, Cheap and Convincing Subsurface-Scattering Look

More Related Content

What's hot

Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...Johan Andersson
 
Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Physically Based Sky, Atmosphere and Cloud Rendering in FrostbitePhysically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Physically Based Sky, Atmosphere and Cloud Rendering in FrostbiteElectronic Arts / DICE
 
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14AMD Developer Central
 
A Bizarre Way to do Real-Time Lighting
A Bizarre Way to do Real-Time LightingA Bizarre Way to do Real-Time Lighting
A Bizarre Way to do Real-Time LightingSteven Tovey
 
Triangle Visibility buffer
Triangle Visibility bufferTriangle Visibility buffer
Triangle Visibility bufferWolfgang Engel
 
Moving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based RenderingMoving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based RenderingElectronic Arts / DICE
 
Physically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in FrostbitePhysically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in FrostbiteElectronic Arts / DICE
 
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
 
Hable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr LightingHable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr Lightingozlael ozlael
 
Checkerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOCCheckerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOCQLOC
 
Bindless Deferred Decals in The Surge 2
Bindless Deferred Decals in The Surge 2Bindless Deferred Decals in The Surge 2
Bindless Deferred Decals in The Surge 2Philip Hammer
 
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
 
CEDEC 2018 - Towards Effortless Photorealism Through Real-Time Raytracing
CEDEC 2018 - Towards Effortless Photorealism Through Real-Time RaytracingCEDEC 2018 - Towards Effortless Photorealism Through Real-Time Raytracing
CEDEC 2018 - Towards Effortless Photorealism Through Real-Time RaytracingElectronic Arts / DICE
 
Graphics Gems from CryENGINE 3 (Siggraph 2013)
Graphics Gems from CryENGINE 3 (Siggraph 2013)Graphics Gems from CryENGINE 3 (Siggraph 2013)
Graphics Gems from CryENGINE 3 (Siggraph 2013)Tiago Sousa
 
Siggraph2016 - The Devil is in the Details: idTech 666
Siggraph2016 - The Devil is in the Details: idTech 666Siggraph2016 - The Devil is in the Details: idTech 666
Siggraph2016 - The Devil is in the Details: idTech 666Tiago Sousa
 
Advancements in-tiled-rendering
Advancements in-tiled-renderingAdvancements in-tiled-rendering
Advancements in-tiled-renderingmistercteam
 
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
 
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)Philip Hammer
 
The Rendering Technology of Killzone 2
The Rendering Technology of Killzone 2The Rendering Technology of Killzone 2
The Rendering Technology of Killzone 2Guerrilla
 

What's hot (20)

Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
 
Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Physically Based Sky, Atmosphere and Cloud Rendering in FrostbitePhysically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite
 
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
 
A Bizarre Way to do Real-Time Lighting
A Bizarre Way to do Real-Time LightingA Bizarre Way to do Real-Time Lighting
A Bizarre Way to do Real-Time Lighting
 
Triangle Visibility buffer
Triangle Visibility bufferTriangle Visibility buffer
Triangle Visibility buffer
 
Moving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based RenderingMoving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based Rendering
 
Physically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in FrostbitePhysically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in Frostbite
 
Crysis Next-Gen Effects (GDC 2008)
Crysis Next-Gen Effects (GDC 2008)Crysis Next-Gen Effects (GDC 2008)
Crysis Next-Gen Effects (GDC 2008)
 
Hable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr LightingHable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr Lighting
 
Checkerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOCCheckerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOC
 
Bindless Deferred Decals in The Surge 2
Bindless Deferred Decals in The Surge 2Bindless Deferred Decals in The Surge 2
Bindless Deferred Decals in The Surge 2
 
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
 
CEDEC 2018 - Towards Effortless Photorealism Through Real-Time Raytracing
CEDEC 2018 - Towards Effortless Photorealism Through Real-Time RaytracingCEDEC 2018 - Towards Effortless Photorealism Through Real-Time Raytracing
CEDEC 2018 - Towards Effortless Photorealism Through Real-Time Raytracing
 
Light prepass
Light prepassLight prepass
Light prepass
 
Graphics Gems from CryENGINE 3 (Siggraph 2013)
Graphics Gems from CryENGINE 3 (Siggraph 2013)Graphics Gems from CryENGINE 3 (Siggraph 2013)
Graphics Gems from CryENGINE 3 (Siggraph 2013)
 
Siggraph2016 - The Devil is in the Details: idTech 666
Siggraph2016 - The Devil is in the Details: idTech 666Siggraph2016 - The Devil is in the Details: idTech 666
Siggraph2016 - The Devil is in the Details: idTech 666
 
Advancements in-tiled-rendering
Advancements in-tiled-renderingAdvancements in-tiled-rendering
Advancements in-tiled-rendering
 
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)
 
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
 
The Rendering Technology of Killzone 2
The Rendering Technology of Killzone 2The Rendering Technology of Killzone 2
The Rendering Technology of Killzone 2
 

Similar to Colin Barre-Brisebois - GDC 2011 - Approximating Translucency for a Fast, Cheap and Convincing Subsurface-Scattering Look

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
 
Advanced Lighting Techniques Dan Baker (Meltdown 2005)
Advanced Lighting Techniques   Dan Baker (Meltdown 2005)Advanced Lighting Techniques   Dan Baker (Meltdown 2005)
Advanced Lighting Techniques Dan Baker (Meltdown 2005)mobius.cn
 
SPU-based Deferred Shading for Battlefield 3 on Playstation 3
SPU-based Deferred Shading for Battlefield 3 on Playstation 3SPU-based Deferred Shading for Battlefield 3 on Playstation 3
SPU-based Deferred Shading for Battlefield 3 on Playstation 3Slide_N
 
Rendering basics
Rendering basicsRendering basics
Rendering basicsicedmaster
 
Penn graphics
Penn graphicsPenn graphics
Penn graphicsfloored
 
Rendering AAA-Quality Characters of Project A1
Rendering AAA-Quality Characters of Project A1Rendering AAA-Quality Characters of Project A1
Rendering AAA-Quality Characters of Project A1Ki Hyunwoo
 
Practical Spherical Harmonics Based PRT Methods
Practical Spherical Harmonics Based PRT MethodsPractical Spherical Harmonics Based PRT Methods
Practical Spherical Harmonics Based PRT MethodsNaughty Dog
 
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)Johan Andersson
 
Practical spherical harmonics based PRT methods.ppsx
Practical spherical harmonics based PRT methods.ppsxPractical spherical harmonics based PRT methods.ppsx
Practical spherical harmonics based PRT methods.ppsxMannyK4
 
Gdc2011 direct x 11 rendering in battlefield 3
Gdc2011 direct x 11 rendering in battlefield 3Gdc2011 direct x 11 rendering in battlefield 3
Gdc2011 direct x 11 rendering in battlefield 3drandom
 
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdf
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdfPapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdf
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdfAdam Hill
 
Optimizing the graphics pipeline with compute
Optimizing the graphics pipeline with computeOptimizing the graphics pipeline with compute
Optimizing the graphics pipeline with computeWuBinbo
 
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
 
Deferred Pixel Shading on the PLAYSTATION®3
Deferred Pixel Shading on the PLAYSTATION®3Deferred Pixel Shading on the PLAYSTATION®3
Deferred Pixel Shading on the PLAYSTATION®3Slide_N
 
03 image transformations_i
03 image transformations_i03 image transformations_i
03 image transformations_iankit_ppt
 
Shader X³: Image Space - Color Grading
Shader X³: Image Space - Color GradingShader X³: Image Space - Color Grading
Shader X³: Image Space - Color GradingRonny Burkersroda
 
Order Independent Transparency
Order Independent TransparencyOrder Independent Transparency
Order Independent Transparencyacbess
 
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
 

Similar to Colin Barre-Brisebois - GDC 2011 - Approximating Translucency for a Fast, Cheap and Convincing Subsurface-Scattering Look (20)

DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering in Battlefield 3DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering in Battlefield 3
 
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
 
Advanced Lighting Techniques Dan Baker (Meltdown 2005)
Advanced Lighting Techniques   Dan Baker (Meltdown 2005)Advanced Lighting Techniques   Dan Baker (Meltdown 2005)
Advanced Lighting Techniques Dan Baker (Meltdown 2005)
 
SPU-based Deferred Shading for Battlefield 3 on Playstation 3
SPU-based Deferred Shading for Battlefield 3 on Playstation 3SPU-based Deferred Shading for Battlefield 3 on Playstation 3
SPU-based Deferred Shading for Battlefield 3 on Playstation 3
 
Rendering basics
Rendering basicsRendering basics
Rendering basics
 
Penn graphics
Penn graphicsPenn graphics
Penn graphics
 
Rendering AAA-Quality Characters of Project A1
Rendering AAA-Quality Characters of Project A1Rendering AAA-Quality Characters of Project A1
Rendering AAA-Quality Characters of Project A1
 
Practical Spherical Harmonics Based PRT Methods
Practical Spherical Harmonics Based PRT MethodsPractical Spherical Harmonics Based PRT Methods
Practical Spherical Harmonics Based PRT Methods
 
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
 
Practical spherical harmonics based PRT methods.ppsx
Practical spherical harmonics based PRT methods.ppsxPractical spherical harmonics based PRT methods.ppsx
Practical spherical harmonics based PRT methods.ppsx
 
Gdc2011 direct x 11 rendering in battlefield 3
Gdc2011 direct x 11 rendering in battlefield 3Gdc2011 direct x 11 rendering in battlefield 3
Gdc2011 direct x 11 rendering in battlefield 3
 
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdf
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdfPapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdf
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdf
 
Broadcaster Notes
Broadcaster NotesBroadcaster Notes
Broadcaster Notes
 
Optimizing the graphics pipeline with compute
Optimizing the graphics pipeline with computeOptimizing the graphics pipeline with compute
Optimizing the graphics pipeline with compute
 
Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]
 
Deferred Pixel Shading on the PLAYSTATION®3
Deferred Pixel Shading on the PLAYSTATION®3Deferred Pixel Shading on the PLAYSTATION®3
Deferred Pixel Shading on the PLAYSTATION®3
 
03 image transformations_i
03 image transformations_i03 image transformations_i
03 image transformations_i
 
Shader X³: Image Space - Color Grading
Shader X³: Image Space - Color GradingShader X³: Image Space - Color Grading
Shader X³: Image Space - Color Grading
 
Order Independent Transparency
Order Independent TransparencyOrder Independent Transparency
Order Independent Transparency
 
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
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 

Recently uploaded (20)

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 

Colin Barre-Brisebois - GDC 2011 - Approximating Translucency for a Fast, Cheap and Convincing Subsurface-Scattering Look

  • 1. Game Developers Conference 2011 Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look Colin Barré-Brisebois (speaker) Marc Bouchard
  • 2. Agenda • Prelude – Real-Time Demo • 1. Translucency in Computer Graphics • 2. Technique Details • 3. Implementation Details • Q&A Fig. 1 – Real-Time Translucency in Frostbite 2
  • 4.
  • 5.
  • 7. Translucency The quality of allowing light to pass partially and diffusely inside media. Fig. 2 – Translucency in Athena Statue (left) [BarréBrisebois11], and child’s hand (right)
  • 8. Translucency in Computer Graphics • We rely heavily on BRDFs for describing local reflections – Simple and effective for opaque objects • However, many objects in nature are (partly) translucent – Light transport also happens within the surface – BRDFs are not sufficient • BSSRDFs allow for an even better simulation – But are usually more/too expensive • In our case, we chose BSDFs (BRDF + BTDF), with some elements of BSSRDF Fig. 3 – BRDF, BTDF and BSSRDF
  • 9. The State of Translucency Real-time translucency and derivatives come in different flavors: • The more complex, but (relatively) expensive – [Chang08] Texture-space Importance Sampling – [Hable09] Texture-space Diffusion blurs, for skin / SSS – [Ki09] Shadowmap-based Translucency / SSS Fig. 5 – Texture-space Diffusion [Hable09] Fig. 4 – Texture-space Importance Sampling [Chang08]
  • 10. The State of Translucency (cont.) Real-time translucency and derivatives come in different flavors: • The simpler, but faster – [Sousa08] double-sided lighting & attenuation for foliage • We want: fast like [Sousa08], and nice / complex results like the others  Fig. 6 – Foliage Translucency from Crytek’s Crysis
  • 11. And we got... Fig. 7 – Real-Time Translucency in EA DICE’s Frostbite 2 Engine
  • 12. And we got... (cont.) Fig. 8 – Real-Time Translucency (Skin/Left, Hebe/Right) in EA DICE’s Frostbite 2 Engine
  • 14. Overview • We don’t want to rely on additional depth maps and texture-space blurs – Requires more memory (i.e. for depth maps) – Requires significant computation (i.e. for texture blurs) – The previous are still feasible, but what if we could do without... • In essence, for convincing translucency, the light traveling inside the shape: – Has to be influenced by the varying thickness of the object – Has to show some view & light-dependent diffusion/attenuation • We only really need a simple representation of inner surface diffusion – Most users will be convinced even if not fully accurate! – Also, if the effect is cheap, we are free to use it everywhere!* 
  • 15. Overview (cont.) Fig. 9 – Direct and Translucency Lighting Vectors
  • 16. Local Thickness Fig. 10 – Local Thickness on Hebe
  • 17. Computing Local Thickness • We rely on ambient occlusion for computing this info: 1. Invert the surface normals 2. Render ambient occlusion 3. Invert the colors and store in texture • Can also be stored in vertex color, if tesselation allows • Similar to [Sousa08], but streamlined for meshes of varying shapes and sizes.
  • 18. Computing Local Thickness (cont.) Fig. 11 – Local Thickness Texture for Hebe
  • 19. What About Subsurface Scattering? Even if not mathematically perfect, our technique gives an impression of SSS: • Local thickness approximates light transport inside the shape – Different color for direct and indirect light gives convicing light color subsurface transfer • View-oriented distortion and attenuation gives an organic result, breaking the uniformity Fig. 13 – Our Technique, combined with Skin Shading
  • 22. Managing the Data at Runtime At runtime, we have several parameters to manage, some per- light, some per-material: • Per-light parameters are used during the deferred light pass • Per-material parameters are stored in the g-buffer – Can also be stored in a separate buffer, if space-limited – Some parameters make more sense per-light, some per-material – This is very specific to your g-buffer setup – Might require some clever packing/unpacking • For packing more parameters on a per-material basis, instead of per-light – Using this technique with deferred shading definitely brings-the-thunder!
  • 23. Managing the Data at Runtime (cont.) half3
vLTLight
=
vLight
+
vNormal
*
fLTDistortion; half
fLTDot
=
pow(saturate(dot(vEye,
‐vLTLight)),
iLTPower)
*
fLTScale; half3
fLT
=
fLightAttenuation
*
(fLTDot
+
fLTAmbient)
*
fLTThickness; outColor.rgb
+=
cDiffuseAlbedo
*
cLightDiffuse
*
fLT; fLTAmbient • Ambient value • Visible from all angles • Representing both front and back translucency that is always present • Optimally, per-material Fig. 14 – Ambient Term
  • 24. Managing the Data at Runtime (cont.) half3
vLTLight
=
vLight
+
vNormal
*
fLTDistortion; half
fLTDot
=
pow(saturate(dot(vEye,
‐vLTLight)),
iLTPower)
*
fLTScale; half3
fLT
=
fLightAttenuation
*
(fLTDot
+
fLTAmbient)
*
fLTThickness; outColor.rgb
+=
cDiffuseAlbedo
*
cLightDiffuse
*
fLT; iLTPower • Power value for direct translucency • Breaks continuity, view-dependent • Can be optimized with pre-computed powers • Optimally, per-material Fig. 16 – Power (4/Left, 12/Right) Term
  • 25. Managing the Data at Runtime (cont.) half3
vLTLight
=
vLight
+
vNormal
*
fLTDistortion; half
fLTDot
=
pow(saturate(dot(vEye,
‐vLTLight)),
iLTPower)
*
fLTScale; half3
fLT
=
fLightAttenuation
*
(fLTDot
+
fLTAmbient)
*
fLTThickness; outColor.rgb
+=
cDiffuseAlbedo
*
cLightDiffuse
*
fLT; fLTDistortion • Subsurface Distortion • Shifts the surface normal • Breaks continuity, view-dependent Allows for more organic, Fresnel-like • Optimally, per-material Fig. 17 – Distortion (None/Left, 0.2/Right) Term
  • 26. Managing the Data at Runtime (cont.) half3
vLTLight
=
vLight
+
vNormal
*
fLTDistortion; half
fLTDot
=
pow(saturate(dot(vEye,
‐vLTLight)),
iLTPower)
*
fLTScale; half3
fLT
=
fLightAttenuation
*
(fLTDot
+
fLTAmbient)
*
fLTThickness; outColor.rgb
+=
cDiffuseAlbedo
*
cLightDiffuse
*
fLT; fLTThickness • Pre-computed Local Thickness Map • Used for both direct and indirect translucency • Attenuates the computation where surface thickness varies • Defined per-material Fig. 18 – Local Thickness
  • 27. Managing the Data at Runtime (cont.) half3
vLTLight
=
vLight
+
vNormal
*
fLTDistortion; half
fLTDot
=
pow(saturate(dot(vEye,
‐vLTLight)),
iLTPower)
*
fLTScale; half3
fLT
=
fLightAttenuation
*
(fLTDot
+
fLTAmbient)
*
fLTThickness; outColor.rgb
+=
cDiffuseAlbedo
*
cLightDiffuse
*
fLT; fLTScale • Scale value • Direct / Back translucency • View-oriented • Should be defined per-light. This makes it the central control point Fig. 15 – Scale (1/Left, 5/Right) Term
  • 28. All-Together Fig. 19 – The Final Result on Hebe
  • 29. Deferred Shading G-Buffer Setup Minimally, translucency can be stored in the g-buffer as a single greyscale value: Fig. 20 – Our G-Buffer, with greyscale Translucency Based on your game, this can be enough. The color will then only originate from the light sources (and also diffuse albedo).
  • 30. Deferred Shading G-Buffer Setup (cont.) All objects here are relying on a greyscale value for translucency  Fig. 1 – Real-Time Translucency in Frostbite 2
  • 31. Deferred Shading G-Buffer Setup (cont.) Better results will be achieved if translucency is a color (here, with some packing): Fig. 21 – Our G-Buffer, with coloured Translucency (packed/offset) This translucency color, representing our inner surface color diffusion, will be combined to the light color and the material’s diffuse albedo.
  • 32. Deferred Shading G-Buffer Setup (cont.) Green Light White Albedo Red Translucency -> # # # # # # # # # <- Blue Light # # # # # White Albedo & Translucency Fig. 22 – Real-Time Translucency in Frostbite 2
  • 33. Performance XBOX
360 PLAYSTATION
3 PC
(DX11) Full‐Screen

Coverage
 0.6
ms 1.0
ms 0.03
ms Instruc9ons
 13 17 12
 • PS3: Takes advantage of our light-tile rendering on SPUs – See Christina Coffin’s ”SPU Deferred Shading for BF3 on PS3” • DX11: Supported in our Compute Shader solution – See Johan Andersson’s “DX11 rendering in Battlefield 3” talk for more DX11-related details • PC: AMD Radeon 6970
  • 34. Caveats • Doesn’t take all concavities into account • Technique is optimal for convex hulls • Doesn’t work with morphing/animated objects – Alternative: Though camera dependent, several cases could work with a real-time thickness approximation [Oat08] – Alternative: Could also use an hybrid dynamic AO Fig. 23 – Concave Hull computation, with inverted normals
  • 35. Summary and Q&A • We presented an artist-friendly, fast and scalable real-time approximation of light transport in translucent homogenous media: – Improves games visuals by adding a new dimension, with light traveling inside shapes – Has a scalable and reasonable impact on runtime – Provides convincing results even if not mathematically perfect • This technique is also published in GPU Pro 2, released this week at GDC. Check out the book!
  • 36.
  • 37. Special Thanks • Sergei Savchenko • Johan Andersson (@repi) • Christina Coffin (@christinacoffin) • Halldor Fannar • Joakim Svärling • Stephen Hill (@self_shadow) • Frederic O’Reilly • John White • Wessam Bahnassi • Carsten Dachsbacher • Daniel Collin (@daniel_collin) • Torbjörn Malmer • Kenny Magnusson • Mohannad Al-Khatib (@psychodesigns) • Dominik Bauset • Colin Boswell (@bozz) • Sandra Jensen
  • 38. References [BarréBrisebois11] Barré-Brisebois, Colin and Bouchard, Marc.”Real-Time Approximation of Light Transport in Translucent Homogenous Media”, GPU Pro 2, Wolfgang Engel, Ed. Charles River Media, 2011. [Chang08] Chang, Chih-Wen, Lin, Wen-Chieh, Ho, Tan-Chi, Huang, Tsung-Shian and Chuang, Jung-Hong. “Real-Time Translucent Rendering Using GPU-based Texture Space Importance Sampling,” Computer Graphics Forum (Eurographics 2008), Vol. 27, No. 2, 2008, pp 517-526. [Hable09] Hable, John, Borshukov, George and Hejl, Jim. “Fast Skin Shading,” ShaderX7: Advanced Rendering Techniques, Wolfgang Engel, Ed., Charles River Media, 2009: pp. 161-173. [Ki09] Ki, Hyunwoo. “Real-time Subsurface Scattering Using Shadow Maps,” ShaderX7: Advanced Rendering Techniques, Wolfgang Engel, Ed., Charles River Media, 2009: pp. 467-478. [Oat08] Oat, Christopher and Scheuermann, Thorsten. “Computing Per-Pixel Object Thickness in a Single Render Pass,” ShaderX6: Advanced Rendering Techniques, Wolfgang Engel, Ed., Charles River Media, 2008: pp. 57-62. [Sousa08] Sousa, Tiago. “Vegetation Procedural Animation and Shading in Crysis,” GPU Gems 3, Hubert Nguyen, Ed., Addison-Wesley, 2008: pp. 373-385.