SlideShare una empresa de Scribd logo
1 de 92
Descargar para leer sin conexión
Advances in Real-Time Rendering in Games
Pre-integrated Skin Shading
            Eric Penner



       Advances in Real-Time Rendering in Games
Advances in Real-Time Rendering in Games
Overview
 Intro to SSS
 TSD Approaches to SSS
 Our Approach - Pre-Integrated Skin Shading
 Extra time? Two Tricks for character shadows
    Masked Variance Shadow Maps
    PCF2 using Pixel Quad Messages (16x depth samples)


                    Advances in Real-Time Rendering in Games
Subsurface Scattering - TSD
 Texture Space Diffusion (Borshukov et al.)




                     Advances in Real-Time Rendering in Games
Subsurface Scattering - TSD
 Texture Space Diffusion (Borshukov et al.)
 Gaussian Blur / Wrap lighting(Gosselin/Green)




                    Advances in Real-Time Rendering in Games
Subsurface Scattering - TSD
 Texture Space Diffusion (Borshukov et al.)
 Gaussian Blur / Wrap lighting(Gosselin/Green)
 Efficient Rendering of Human Skin (d’Eon et al.)




                    Advances in Real-Time Rendering in Games
Subsurface Scattering - TSD

 NVIDIA Human Head
   Gold standard for quality in real-time
   Helps to have high quality head scan




                      Advances in Real-Time Rendering in Games
Subsurface Scattering - TSD

 GPU Gems 3 - Diffusion Profile




                   Advances in Real-Time Rendering in Games
Subsurface Scattering - TSD

 GPU Gems 3 - Diffusion Profile




                   Advances in Real-Time Rendering in Games
Subsurface Scattering - TSD

 NVIDIA Human Head
   Gold standard for quality in real-time
   Lots of 10242 or 20482 maps
   Many Gaussian blur passes
 Take Home Messages
   Linear Lighting! Needs Good Spec! (multiple lobes)
   Skin diffusion is not Gaussian (two pass blur isn’t enough)
                      Advances in Real-Time Rendering in Games
Fast Subsurface Scattering

 Fast Subsurface Scattering                           float2 blurJitteredSamples[13] = {
                                                               { 0.000000, 0.000000 },
    ShaderX7 (Hable et al.)                                   { 1.633992, 0.036795 },
                                                               { 0.177801, 1.717593 },
    Make a custom jittered kernel                     ....
                                                               { -0.194906, 0.091094 },

                                                       };
    Unique weights for r/g/b
                                                       float3 blurJitteredWeights[13] = {
                                                               { 0.220441, 0.437000, 0.635000 },
                                                               { 0.076356, 0.064487, 0.039097 },
                                                               { 0.116515, 0.103222, 0.064912 },
                                                               { 0.064844, 0.086388, 0.062272 },
                                                       ....
                                                       };

                          Advances in Real-Time Rendering in Games
Fast Subsurface Scattering

 Fast Subsurface Scattering
    ShaderX7 (Hable et al.)
    Make a custom jittered kernel
    Unique weights for r/g/b




                                                                     Uncharted 2
                          Advances in Real-Time Rendering in Games
Fast Subsurface Scattering

 Remaining Problems
   Much better performance, but still expensive
   Doesn’t scale (10 heads/body-parts = 20 light-maps)
   Seams in UV space
   Light-map resolution
   Banding due to inadequate samples


                     Advances in Real-Time Rendering in Games
Screen Space SSS

 Screen-Space Subsurface Scattering(Jiminez et al.)
    Do the blur in screen-space
    More scalable, but high fixed cost
    Requires deferred renderer
    Adds many G-buffer channels
    Too many ‘S’s?


                      Advances in Real-Time Rendering in Games
Pre-Integrated Skin Shading

 Goal: A simple pixel shader
    All inputs stored locally in texture/bump maps (no blur passes)
 Key Observation:
    Scattering isn’t visible everywhere
    Occurs near changes in incident light (light gradients)
 Strategy:
    Find light gradients and pre-integrate scattering
                       Advances in Real-Time Rendering in Games
Constant incident light: Do nothing!




               Advances in Real-Time Rendering in Games
Small Surface Bumps




             Advances in Real-Time Rendering in Games
Small Surface Bumps




             Advances in Real-Time Rendering in Games
Shadows




          Advances in Real-Time Rendering in Games
Three Problems to Solve




              Advances in Real-Time Rendering in Games
Three Problems to Solve

       1.) Surface Curvature



       2.) Small Surface Bumps



       3.) Shadows

               Advances in Real-Time Rendering in Games
Three Problems to Solve

       1.) Surface Curvature




               Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDFs

 Diffuse Lambertian fall-off (dot(N,L))
    Causes incident light gradient
 Why not bake scattering in modified dot(N,L)?
    Wrap lighting (GPU Gems 1)
    ATI Skin Fall-Off
    Half-Life Fall-Off


                          Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDFs

 Problems with wrap lighting?
    Not based on real skin diffusion profiles
    Biggest problem: doesn’t account for curvature/thickness!




                       Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDFs

 Problem: Not based on real skin diffusion profile
 Solution: Pre-blur diffuse BRDF with skin profile




                    Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDFs

 Problem: Not based on real skin diffusion profile
 Solution: Pre-blur diffuse BRDF with skin profile

 Problem: Doesn’t account for surface curvature
 Solution: Parameterize BRDF with curvature




                    Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDFs

  How do we pre-integrate the diffuse BRDF?


Profile




                   Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDFs

  Integrate all incoming light on a sphere(or a ring, it’s easier)


Profile




                         Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDFs

 Let see look at some results!




                    Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDFs

   Wrap Lighting
   GPU Gems 1
   Gamma space lighting
   No tone-mapping




                      Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDF

   Wrap Lighting
   More recent (used today)
   Linear lighting
   Filming Tone-mapping




                      Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDF

   Wrap Lighting
   More recent (used today)
   Linear lighting
   Filming Tone-mapping

             B/G/R Cutoffs
           are clearly visible


                         Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDF

 Pre-integrated scattering
 Linear lighting
 Filmic tone-mapping




                    Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDF

 How does curvature help?




                  Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDF

 How does curvature help?
 Look at nose vs. forehead




                  Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDF

 Let’s decrease the size




                   Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDF

 Let’s decrease the size




                   Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDF

 Light scatters right through.
 Now let’s increase size




                    Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDF




              Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDF




              Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDF

 Flatter surfaces have less
  visible scattering




                       Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDF

 Now bake everything!




                  Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDF

 So where do we get curvature (1/radius)




                   Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDF

 So where do we get curvature (1/radius)
    Similar triangles and derivatives.




                       Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDF

 So where do we get curvature (1/radius)
    Similar triangles and derivatives.



                            c = length(fwidth(N)) /
                                   length(fwidth(pmm))




                       Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDF

 So where do we get curvature (1/radius)
    Similar triangles and derivatives.
 Derivatives are constant within a triangle
    Sometimes this is fine
    If edges appear, store curvature in vertices or texture




                       Advances in Real-Time Rendering in Games
Three Problems to Solve

       1.) Surface Curvature
              Pre-integrated curvature-based BRDF

       2.) Small Surface Bumps




               Advances in Real-Time Rendering in Games
Per-Channel Bent Normals

 BRDF works for smooth curvy surfaces
 What about small bumps in normal maps?
    Light should scatter past several surface bumps
    Using curvature breaks down at small sizes
 Let’s focus only on normals now



                      Advances in Real-Time Rendering in Games
Per-Channel Bent Normals

 With a normal map we can sample neighbourhood
    We could take many samples, light, weight and accumulate


 Or, can we pre-filter the normal map?
    Pre-filtering dot(N,L) is correct
    Pre-filtering max(0,dot(N,L)) isn’t strictly correct (but it’s close)
    LEAN/CLEAN mapping does this for specular
                          Advances in Real-Time Rendering in Games
Per-Channel Bent Normals

 Tangent:
   Normal maps can be acquired (Ma et al. 2007)
   One technique applies light gradients to capture normals
   Different light colours produced different captured normals




                      Advances in Real-Time Rendering in Games
Per-Channel Bent Normals




         Ma et al. 2007 - Rapid Acquisition of Specular and Diffuse Normal Maps

                     Advances in Real-Time Rendering in Games
Per-Channel Bent Normals




         Ma et al. 2007 - Rapid Acquisition of Specular and Diffuse Normal Maps

                     Advances in Real-Time Rendering in Games
Per-Channel Bent Normals




         Ma et al. 2007 - Rapid Acquisition of Specular and Diffuse Normal Maps

                     Advances in Real-Time Rendering in Games
Per-Channel Bent Normals




         Ma et al. 2007 - Rapid Acquisition of Specular and Diffuse Normal Maps

                     Advances in Real-Time Rendering in Games
Per-Channel Bent Normals

   We don’t need captured normals to use this technique
   Start with ‘true’ normal map (spec)
   Pre-filter new normal maps with R/G/B skin profiles
   Optimally we need 4 normals now
     R/G/B and Spec
     Looks great! Lots of memory!


                       Advances in Real-Time Rendering in Games
Bent Normals (Optimized)
A.) Use geometry and spec normals (blend the rest)
    Only works for certain art!
    Normal map must contain only details (wrinkles/pores)
B.) Use two normal samples (blend the rest)
    Works for all art!
    One normal-map, two samplers
    Clamp one sampler at blurred mip threshold

                          Advances in Real-Time Rendering in Games
Bent Normals - Results

  Without bent normals                        With bent normals




                  Advances in Real-Time Rendering in Games
Bent Normals - Results

 Now we have pretty good solutions for:
    Curvy but smooth surfaces (pre-integrated BRDF)
    Flat but bumpy surfaces (pre-integrated normal maps)
 These complement each other
 BRDF chosen from prevailing curvature (geometry)
    Broad scattering from dominant surface
 Bent normals fill in the gaps
    Fine-grained scattering of local details
                        Advances in Real-Time Rendering in Games
Three Problems to Solve

       1.) Surface Curvature
              Pre-integrated curvature-based BRDF

       2.) ‘Small’ Surface Bumps
              Pre-integrated bent normals

       3.) Shadows
              Pre-integrated shadow penumbrae
               Advances in Real-Time Rendering in Games
Shadows

 What about shadows?
 Shadows also give skin a characteristic look
 Seems more difficult:
    Shadows depend on arbitrary occluders
    Can fall anywhere on the surface




                      Advances in Real-Time Rendering in Games
Shadows

 Turns out we can apply a very similar technique
 Other approaches have used a texture lookup to mimic
  the look of skin(GDC 2005, Tatarchuk)
 In our work we apply the diffusion profiles




                       Advances in Real-Time Rendering in Games
Shadows

 Turns out we can apply a very similar technique
 This is the shadow from a box filter
S(x)




                   Advances in Real-Time Rendering in Games
Shadows

 Turns out we can apply a very similar technique
 This is the shadow from a box filter
S(x)
                                 Given the shadow value




                   Advances in Real-Time Rendering in Games
Shadows

 Turns out we can apply a very similar technique
 This is the shadow from a box filter
S(x)
                                     Given the shadow value
                                     Invert the penumbra blur function
              S-1(x)




                       Advances in Real-Time Rendering in Games
Shadows

 Turns out we can apply a very similar technique
 This is the shadow from a box filter
S(x)
                                     Given the shadow value
                                     Invert the penumbra blur function
              S-1(x)
                                     Find the position within the shadow



                       Advances in Real-Time Rendering in Games
Shadows

 Map to a smaller shadow with room for scattering




                   Advances in Real-Time Rendering in Games
Shadows

 Apply similar integration as our diffuse




                    Advances in Real-Time Rendering in Games
Shadows

 Pre-integrate for different penumbra size (eg. due to slope)




                      Advances in Real-Time Rendering in Games
Shadows

 Let’s look at some results compared to TSD




                   Advances in Real-Time Rendering in Games
Pre-
TSD
                      Integrated
      Advances in Real-Time Rendering in Games
Results




TSD        Advances in Real-Time Rendering in Games
Results




   Pre-
Integrated   Advances in Real-Time Rendering in Games
Results                                              Diffuse




          Advances in Real-Time Rendering in Games
Results                                              TSD




          Advances in Real-Time Rendering in Games
Results                                              Pre-Integrated




          Advances in Real-Time Rendering in Games
Shadows

 We need a wide penumbra to get lots of scattering
 We used two different shadow techniques

 In both cases it really helps to use extra shadow maps
    We can cheat: only render the head, not the whole scene
    Can be as low as 642 for one head (preferably 1282)



                       Advances in Real-Time Rendering in Games
Shadows - PCF

 1.) Pixel Quad Amortization (16 shadow map texels per sample!)
      Pixels are rendered in quads – quad pixels can share work!
      8x8 PCF in 4 samples!
      Requires Nvidia card (but DX11 ‘fine’ ddx/ddy might fix that)
      Tell me if you try it with DX11 hardware!!
      See GPU Pro 2 for details




                          Advances in Real-Time Rendering in Games
Shadows - VSMs

 2.) Masked Variance Shadow maps
     Render only the head into it’s own small variance shadow map
     ‘Background’ causes bad variance artifacts!
     Include an extra channel as background mask (eg. A2B10G10R10)
     Blur the variance shadow map and mask
     Correct variance sample to remove the background percentage
     Correct the shadow calculation accordingly
        Background percentage = not shadowed

                        Advances in Real-Time Rendering in Games
Filmic Tone-mapping

 All the images today use filmic tone-mapping
 Certain shots (eg. sunlight) need a lot of light
 Scattering occurs at the dark end of dynamic range
    If we try capture the bright light
    We invariably crush the darks into a small dynamic range
 In summary, we need high dynamic range!
 And a way to map it nicely to a LDR display

                       Advances in Real-Time Rendering in Games
Filmic Tone-mapping

 Kodak film
   response curves
 This is a nice
   approximation: (Hejl 2009)

x = max(0, LinearColor-0.004);
GammaColor = (x*(6.2*x+0.5))/
                      (x*(6.2*x+1.7)+0.06);



                                 Advances in Real-Time Rendering in Games
Filmic Tone-mapping

   Without filmic tonemap
   1x intensity
   Larger size
   Boring!




                     Advances in Real-Time Rendering in Games
Filmic Tone-mapping

 Without filmic tonemap
 4x intensity
 More interesting, but!

             Saturated
         (clamped to 1.0)


                                                               Less saturated
                    Advances in Real-Time Rendering in Games      blacks
Filmic Tone-mapping

 With filmic tonemap
 4x intensity




                                                              Saturated
                   Advances in Real-Time Rendering in Games    blacks
Filmic Tone-mapping

 Without filmic tonemap




                   Advances in Real-Time Rendering in Games
Filmic Tone-mapping

 With filmic tonemap




                   Advances in Real-Time Rendering in Games
Filmic Tone-mapping

 Digital cameras also have
  this problem!


 Left side is desired look
 Right side is blown out

 Film is much better
                    Advances in Real-Time Rendering in Games
Filmic Tone-mapping

 Varying size
  and intensity
  by powers of two




                                                                Still 251/255
                     Advances in Real-Time Rendering in Games
Pre-Integrated Skin Shading

 Future work:
      Approximate lookup textures with curve fitting
      Use additional axis of curvature in diffuse fall-off
      Include transmittance techniques
      When the detailed normal map gets blurred, we lose the small
       scattering effects from our normal map technique. Possibly we
       should bias the curvature lookup to account for this in the BRDF.




                           Advances in Real-Time Rendering in Games
Pre-Integrated Skin Shading

 Thanks to:
      George Borshukov
      Natalya Tatarchuk
      Google (where I work now)
      Everyone at Electronic Arts (where I used to work)




                           Advances in Real-Time Rendering in Games
Advances in Real-Time Rendering in Games
Curvature: Pre-Integrated BRDFs

  Integrate all incoming light on a sphere(or a ring, it’s easier)


Profile                  Oops! saturate(cos())!




                         Advances in Real-Time Rendering in Games

Más contenido relacionado

La actualidad más candente

Forward+ (EUROGRAPHICS 2012)
Forward+ (EUROGRAPHICS 2012)Forward+ (EUROGRAPHICS 2012)
Forward+ (EUROGRAPHICS 2012)
Takahiro Harada
 

La actualidad más candente (20)

Taking Killzone Shadow Fall Image Quality Into The Next Generation
Taking Killzone Shadow Fall Image Quality Into The Next GenerationTaking Killzone Shadow Fall Image Quality Into The Next Generation
Taking Killzone Shadow Fall Image Quality Into The Next Generation
 
Lighting the City of Glass
Lighting the City of GlassLighting the City of Glass
Lighting the City of Glass
 
The Rendering Technology of Killzone 2
The Rendering Technology of Killzone 2The Rendering Technology of Killzone 2
The Rendering Technology of Killzone 2
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics Technology
 
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
 
Lighting of Killzone: Shadow Fall
Lighting of Killzone: Shadow FallLighting of Killzone: Shadow Fall
Lighting of Killzone: Shadow Fall
 
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
 
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
 
Forward+ (EUROGRAPHICS 2012)
Forward+ (EUROGRAPHICS 2012)Forward+ (EUROGRAPHICS 2012)
Forward+ (EUROGRAPHICS 2012)
 
「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発
 
Dissecting the Rendering of The Surge
Dissecting the Rendering of The SurgeDissecting the Rendering of The Surge
Dissecting the Rendering of The Surge
 
Hable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr LightingHable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr Lighting
 
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
 
Shiny PC Graphics in Battlefield 3
Shiny PC Graphics in Battlefield 3Shiny PC Graphics in Battlefield 3
Shiny PC Graphics in Battlefield 3
 
Past, Present and Future Challenges of Global Illumination in Games
Past, Present and Future Challenges of Global Illumination in GamesPast, Present and Future Challenges of Global Illumination in Games
Past, Present and Future Challenges of Global Illumination in Games
 
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:...
 
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
 
Custom fabric shader for unreal engine 4
Custom fabric shader for unreal engine 4Custom fabric shader for unreal engine 4
Custom fabric shader for unreal engine 4
 
Triangle Visibility buffer
Triangle Visibility bufferTriangle Visibility buffer
Triangle Visibility buffer
 
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
 

Destacado

Aiming 開発ゲームの裏側
Aiming 開発ゲームの裏側Aiming 開発ゲームの裏側
Aiming 開発ゲームの裏側
Katsutoshi Makino
 
Mobile crossplatformchallenges siggraph
Mobile crossplatformchallenges siggraphMobile crossplatformchallenges siggraph
Mobile crossplatformchallenges siggraph
JP Lee
 
Pre Analyze For
Pre  Analyze ForPre  Analyze For
Pre Analyze For
JP Lee
 
Kansai cedec 2015_fumoto
Kansai cedec 2015_fumotoKansai cedec 2015_fumoto
Kansai cedec 2015_fumoto
fumoto kazuhiro
 
Unity * スマートフォン開発で学んだこと
Unity * スマートフォン開発で学んだことUnity * スマートフォン開発で学んだこと
Unity * スマートフォン開発で学んだこと
Katsutoshi Makino
 

Destacado (20)

CEDEC 2016 Metal と Vulkan を用いた水彩画レンダリング技法の紹介
CEDEC 2016 Metal と Vulkan を用いた水彩画レンダリング技法の紹介CEDEC 2016 Metal と Vulkan を用いた水彩画レンダリング技法の紹介
CEDEC 2016 Metal と Vulkan を用いた水彩画レンダリング技法の紹介
 
Weighted Blended Order Independent Transparency
Weighted Blended Order Independent TransparencyWeighted Blended Order Independent Transparency
Weighted Blended Order Independent Transparency
 
Application parallelisation Android - Klaas Vangend
Application parallelisation Android - Klaas VangendApplication parallelisation Android - Klaas Vangend
Application parallelisation Android - Klaas Vangend
 
ACES 1.0 OpenColorIO config - Siggraph 2015
ACES 1.0 OpenColorIO config - Siggraph 2015ACES 1.0 OpenColorIO config - Siggraph 2015
ACES 1.0 OpenColorIO config - Siggraph 2015
 
Aiming 開発ゲームの裏側
Aiming 開発ゲームの裏側Aiming 開発ゲームの裏側
Aiming 開発ゲームの裏側
 
Tabc vol3 テクニカルアーティストを始めるにあたって
Tabc vol3 テクニカルアーティストを始めるにあたってTabc vol3 テクニカルアーティストを始めるにあたって
Tabc vol3 テクニカルアーティストを始めるにあたって
 
中級グラフィックス入門~シャドウマッピング総まとめ~
中級グラフィックス入門~シャドウマッピング総まとめ~中級グラフィックス入門~シャドウマッピング総まとめ~
中級グラフィックス入門~シャドウマッピング総まとめ~
 
Unity & VR (Unity Roadshow 2016)
Unity & VR (Unity Roadshow 2016)Unity & VR (Unity Roadshow 2016)
Unity & VR (Unity Roadshow 2016)
 
Q(キュー)サイトに学ぶ、 演出のためのHTML5
Q(キュー)サイトに学ぶ、 演出のためのHTML5Q(キュー)サイトに学ぶ、 演出のためのHTML5
Q(キュー)サイトに学ぶ、 演出のためのHTML5
 
Aclt1
Aclt1Aclt1
Aclt1
 
Mobile crossplatformchallenges siggraph
Mobile crossplatformchallenges siggraphMobile crossplatformchallenges siggraph
Mobile crossplatformchallenges siggraph
 
Pre Analyze For
Pre  Analyze ForPre  Analyze For
Pre Analyze For
 
レイトレ合宿3!!! 5分間アピールプレゼン―Pocol
レイトレ合宿3!!! 5分間アピールプレゼン―Pocolレイトレ合宿3!!! 5分間アピールプレゼン―Pocol
レイトレ合宿3!!! 5分間アピールプレゼン―Pocol
 
Kansai cedec 2015_fumoto
Kansai cedec 2015_fumotoKansai cedec 2015_fumoto
Kansai cedec 2015_fumoto
 
Getting Native with NDK
Getting Native with NDKGetting Native with NDK
Getting Native with NDK
 
Unity * スマートフォン開発で学んだこと
Unity * スマートフォン開発で学んだことUnity * スマートフォン開発で学んだこと
Unity * スマートフォン開発で学んだこと
 
CEDEC 2015 Cocos2d-x と社内基盤の付き合い方 〜アップストリームファーストを目指して〜
CEDEC 2015 Cocos2d-x と社内基盤の付き合い方 〜アップストリームファーストを目指して〜CEDEC 2015 Cocos2d-x と社内基盤の付き合い方 〜アップストリームファーストを目指して〜
CEDEC 2015 Cocos2d-x と社内基盤の付き合い方 〜アップストリームファーストを目指して〜
 
Unityのポストエフェクトで遊ぶ!
Unityのポストエフェクトで遊ぶ!Unityのポストエフェクトで遊ぶ!
Unityのポストエフェクトで遊ぶ!
 
ACEScg: A Common Color Encoding for Visual Effects Applications - DigiPro 2015
ACEScg: A Common Color Encoding for Visual Effects Applications - DigiPro 2015ACEScg: A Common Color Encoding for Visual Effects Applications - DigiPro 2015
ACEScg: A Common Color Encoding for Visual Effects Applications - DigiPro 2015
 
뭣이 중헌디? 성능 프로파일링도 모름서 - 유니티 성능 프로파일링 가이드 (IGC16)
뭣이 중헌디? 성능 프로파일링도 모름서 - 유니티 성능 프로파일링 가이드 (IGC16)뭣이 중헌디? 성능 프로파일링도 모름서 - 유니티 성능 프로파일링 가이드 (IGC16)
뭣이 중헌디? 성능 프로파일링도 모름서 - 유니티 성능 프로파일링 가이드 (IGC16)
 

Similar a Penner pre-integrated skin rendering (siggraph 2011 advances in real-time rendering course)

The technology behind_the_elemental_demo_16x9-1248544805
The technology behind_the_elemental_demo_16x9-1248544805The technology behind_the_elemental_demo_16x9-1248544805
The technology behind_the_elemental_demo_16x9-1248544805
mistercteam
 
A Bit More Deferred Cry Engine3
A Bit More Deferred   Cry Engine3A Bit More Deferred   Cry Engine3
A Bit More Deferred Cry Engine3
guest11b095
 
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
Steven Tovey
 
CUDA by Example : Constant Memory and Events : Notes
CUDA by Example : Constant Memory and Events : NotesCUDA by Example : Constant Memory and Events : Notes
CUDA by Example : Constant Memory and Events : Notes
Subhajit Sahu
 
Deferred shading
Deferred shadingDeferred shading
Deferred shading
Frank Chao
 
new_age_graphics_android_x86
new_age_graphics_android_x86new_age_graphics_android_x86
new_age_graphics_android_x86
Droidcon Berlin
 

Similar a Penner pre-integrated skin rendering (siggraph 2011 advances in real-time rendering course) (20)

The technology behind_the_elemental_demo_16x9-1248544805
The technology behind_the_elemental_demo_16x9-1248544805The technology behind_the_elemental_demo_16x9-1248544805
The technology behind_the_elemental_demo_16x9-1248544805
 
A Bit More Deferred Cry Engine3
A Bit More Deferred   Cry Engine3A Bit More Deferred   Cry Engine3
A Bit More Deferred Cry Engine3
 
HPG 2018 - Game Ray Tracing: State-of-the-Art and Open Problems
HPG 2018 - Game Ray Tracing: State-of-the-Art and Open ProblemsHPG 2018 - Game Ray Tracing: State-of-the-Art and Open Problems
HPG 2018 - Game Ray Tracing: State-of-the-Art and Open Problems
 
Computer Science Thesis Defense
Computer Science Thesis DefenseComputer Science Thesis Defense
Computer Science Thesis Defense
 
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
 
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
 
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)
 
Graphics pipeline and rendering
Graphics pipeline and renderingGraphics pipeline and rendering
Graphics pipeline and rendering
 
Unity AMD FSR - SIGGRAPH 2021.pptx
Unity AMD FSR - SIGGRAPH 2021.pptxUnity AMD FSR - SIGGRAPH 2021.pptx
Unity AMD FSR - SIGGRAPH 2021.pptx
 
@Bristol Data Dome workshop - NSC Creative
@Bristol Data Dome workshop - NSC Creative@Bristol Data Dome workshop - NSC Creative
@Bristol Data Dome workshop - NSC Creative
 
CineBox Presentation FMX 2011
CineBox Presentation FMX 2011CineBox Presentation FMX 2011
CineBox Presentation FMX 2011
 
CUDA by Example : Constant Memory and Events : Notes
CUDA by Example : Constant Memory and Events : NotesCUDA by Example : Constant Memory and Events : Notes
CUDA by Example : Constant Memory and Events : Notes
 
Deferred shading
Deferred shadingDeferred shading
Deferred shading
 
Svr Raskar
Svr RaskarSvr Raskar
Svr Raskar
 
Crysis 2-key-rendering-features
Crysis 2-key-rendering-featuresCrysis 2-key-rendering-features
Crysis 2-key-rendering-features
 
Advanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics APIAdvanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics API
 
Virtual Reality & Sim Racing in Assetto Corsa - Romagnoli
Virtual Reality & Sim Racing in Assetto Corsa - RomagnoliVirtual Reality & Sim Racing in Assetto Corsa - Romagnoli
Virtual Reality & Sim Racing in Assetto Corsa - Romagnoli
 
Computer Graphics Part1
Computer Graphics Part1Computer Graphics Part1
Computer Graphics Part1
 
new_age_graphics_android_x86
new_age_graphics_android_x86new_age_graphics_android_x86
new_age_graphics_android_x86
 

Más de JP Lee

K 사업 E 프렌차이즈
K 사업 E 프렌차이즈K 사업 E 프렌차이즈
K 사업 E 프렌차이즈
JP Lee
 
홍길동제안서
홍길동제안서홍길동제안서
홍길동제안서
JP Lee
 
핼리네시아러프컨셉기획
핼리네시아러프컨셉기획핼리네시아러프컨셉기획
핼리네시아러프컨셉기획
JP Lee
 
Universe online detail
Universe online detailUniverse online detail
Universe online detail
JP Lee
 
초기분석등
초기분석등초기분석등
초기분석등
JP Lee
 
삼국지 게임 컨셉제안서
삼국지 게임 컨셉제안서삼국지 게임 컨셉제안서
삼국지 게임 컨셉제안서
JP Lee
 

Más de JP Lee (7)

K 사업 E 프렌차이즈
K 사업 E 프렌차이즈K 사업 E 프렌차이즈
K 사업 E 프렌차이즈
 
홍길동제안서
홍길동제안서홍길동제안서
홍길동제안서
 
핼리네시아러프컨셉기획
핼리네시아러프컨셉기획핼리네시아러프컨셉기획
핼리네시아러프컨셉기획
 
Universe online detail
Universe online detailUniverse online detail
Universe online detail
 
초기분석등
초기분석등초기분석등
초기분석등
 
삼국지 게임 컨셉제안서
삼국지 게임 컨셉제안서삼국지 게임 컨셉제안서
삼국지 게임 컨셉제안서
 
Hproject
HprojectHproject
Hproject
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
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
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
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...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
"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 ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
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
 
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, ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

Penner pre-integrated skin rendering (siggraph 2011 advances in real-time rendering course)

  • 1. Advances in Real-Time Rendering in Games
  • 2. Pre-integrated Skin Shading Eric Penner Advances in Real-Time Rendering in Games
  • 3. Advances in Real-Time Rendering in Games
  • 4. Overview  Intro to SSS  TSD Approaches to SSS  Our Approach - Pre-Integrated Skin Shading  Extra time? Two Tricks for character shadows  Masked Variance Shadow Maps  PCF2 using Pixel Quad Messages (16x depth samples) Advances in Real-Time Rendering in Games
  • 5. Subsurface Scattering - TSD  Texture Space Diffusion (Borshukov et al.) Advances in Real-Time Rendering in Games
  • 6. Subsurface Scattering - TSD  Texture Space Diffusion (Borshukov et al.)  Gaussian Blur / Wrap lighting(Gosselin/Green) Advances in Real-Time Rendering in Games
  • 7. Subsurface Scattering - TSD  Texture Space Diffusion (Borshukov et al.)  Gaussian Blur / Wrap lighting(Gosselin/Green)  Efficient Rendering of Human Skin (d’Eon et al.) Advances in Real-Time Rendering in Games
  • 8. Subsurface Scattering - TSD  NVIDIA Human Head  Gold standard for quality in real-time  Helps to have high quality head scan Advances in Real-Time Rendering in Games
  • 9. Subsurface Scattering - TSD  GPU Gems 3 - Diffusion Profile Advances in Real-Time Rendering in Games
  • 10. Subsurface Scattering - TSD  GPU Gems 3 - Diffusion Profile Advances in Real-Time Rendering in Games
  • 11. Subsurface Scattering - TSD  NVIDIA Human Head  Gold standard for quality in real-time  Lots of 10242 or 20482 maps  Many Gaussian blur passes  Take Home Messages  Linear Lighting! Needs Good Spec! (multiple lobes)  Skin diffusion is not Gaussian (two pass blur isn’t enough) Advances in Real-Time Rendering in Games
  • 12. Fast Subsurface Scattering  Fast Subsurface Scattering float2 blurJitteredSamples[13] = { { 0.000000, 0.000000 },  ShaderX7 (Hable et al.) { 1.633992, 0.036795 }, { 0.177801, 1.717593 },  Make a custom jittered kernel .... { -0.194906, 0.091094 }, };  Unique weights for r/g/b float3 blurJitteredWeights[13] = { { 0.220441, 0.437000, 0.635000 }, { 0.076356, 0.064487, 0.039097 }, { 0.116515, 0.103222, 0.064912 }, { 0.064844, 0.086388, 0.062272 }, .... }; Advances in Real-Time Rendering in Games
  • 13. Fast Subsurface Scattering  Fast Subsurface Scattering  ShaderX7 (Hable et al.)  Make a custom jittered kernel  Unique weights for r/g/b Uncharted 2 Advances in Real-Time Rendering in Games
  • 14. Fast Subsurface Scattering  Remaining Problems  Much better performance, but still expensive  Doesn’t scale (10 heads/body-parts = 20 light-maps)  Seams in UV space  Light-map resolution  Banding due to inadequate samples Advances in Real-Time Rendering in Games
  • 15. Screen Space SSS  Screen-Space Subsurface Scattering(Jiminez et al.)  Do the blur in screen-space  More scalable, but high fixed cost  Requires deferred renderer  Adds many G-buffer channels  Too many ‘S’s? Advances in Real-Time Rendering in Games
  • 16. Pre-Integrated Skin Shading  Goal: A simple pixel shader  All inputs stored locally in texture/bump maps (no blur passes)  Key Observation:  Scattering isn’t visible everywhere  Occurs near changes in incident light (light gradients)  Strategy:  Find light gradients and pre-integrate scattering Advances in Real-Time Rendering in Games
  • 17. Constant incident light: Do nothing! Advances in Real-Time Rendering in Games
  • 18. Small Surface Bumps Advances in Real-Time Rendering in Games
  • 19. Small Surface Bumps Advances in Real-Time Rendering in Games
  • 20. Shadows Advances in Real-Time Rendering in Games
  • 21. Three Problems to Solve Advances in Real-Time Rendering in Games
  • 22. Three Problems to Solve 1.) Surface Curvature 2.) Small Surface Bumps 3.) Shadows Advances in Real-Time Rendering in Games
  • 23. Three Problems to Solve 1.) Surface Curvature Advances in Real-Time Rendering in Games
  • 24. Curvature: Pre-Integrated BRDFs  Diffuse Lambertian fall-off (dot(N,L))  Causes incident light gradient  Why not bake scattering in modified dot(N,L)?  Wrap lighting (GPU Gems 1)  ATI Skin Fall-Off  Half-Life Fall-Off Advances in Real-Time Rendering in Games
  • 25. Curvature: Pre-Integrated BRDFs  Problems with wrap lighting?  Not based on real skin diffusion profiles  Biggest problem: doesn’t account for curvature/thickness! Advances in Real-Time Rendering in Games
  • 26. Curvature: Pre-Integrated BRDFs  Problem: Not based on real skin diffusion profile  Solution: Pre-blur diffuse BRDF with skin profile Advances in Real-Time Rendering in Games
  • 27. Curvature: Pre-Integrated BRDFs  Problem: Not based on real skin diffusion profile  Solution: Pre-blur diffuse BRDF with skin profile  Problem: Doesn’t account for surface curvature  Solution: Parameterize BRDF with curvature Advances in Real-Time Rendering in Games
  • 28. Curvature: Pre-Integrated BRDFs  How do we pre-integrate the diffuse BRDF? Profile Advances in Real-Time Rendering in Games
  • 29. Curvature: Pre-Integrated BRDFs  Integrate all incoming light on a sphere(or a ring, it’s easier) Profile Advances in Real-Time Rendering in Games
  • 30. Curvature: Pre-Integrated BRDFs  Let see look at some results! Advances in Real-Time Rendering in Games
  • 31. Curvature: Pre-Integrated BRDFs  Wrap Lighting  GPU Gems 1  Gamma space lighting  No tone-mapping Advances in Real-Time Rendering in Games
  • 32. Curvature: Pre-Integrated BRDF  Wrap Lighting  More recent (used today)  Linear lighting  Filming Tone-mapping Advances in Real-Time Rendering in Games
  • 33. Curvature: Pre-Integrated BRDF  Wrap Lighting  More recent (used today)  Linear lighting  Filming Tone-mapping B/G/R Cutoffs are clearly visible Advances in Real-Time Rendering in Games
  • 34. Curvature: Pre-Integrated BRDF  Pre-integrated scattering  Linear lighting  Filmic tone-mapping Advances in Real-Time Rendering in Games
  • 35. Curvature: Pre-Integrated BRDF  How does curvature help? Advances in Real-Time Rendering in Games
  • 36. Curvature: Pre-Integrated BRDF  How does curvature help?  Look at nose vs. forehead Advances in Real-Time Rendering in Games
  • 37. Curvature: Pre-Integrated BRDF  Let’s decrease the size Advances in Real-Time Rendering in Games
  • 38. Curvature: Pre-Integrated BRDF  Let’s decrease the size Advances in Real-Time Rendering in Games
  • 39. Curvature: Pre-Integrated BRDF  Light scatters right through.  Now let’s increase size Advances in Real-Time Rendering in Games
  • 40. Curvature: Pre-Integrated BRDF Advances in Real-Time Rendering in Games
  • 41. Curvature: Pre-Integrated BRDF Advances in Real-Time Rendering in Games
  • 42. Curvature: Pre-Integrated BRDF  Flatter surfaces have less visible scattering Advances in Real-Time Rendering in Games
  • 43. Curvature: Pre-Integrated BRDF  Now bake everything! Advances in Real-Time Rendering in Games
  • 44. Curvature: Pre-Integrated BRDF  So where do we get curvature (1/radius) Advances in Real-Time Rendering in Games
  • 45. Curvature: Pre-Integrated BRDF  So where do we get curvature (1/radius)  Similar triangles and derivatives. Advances in Real-Time Rendering in Games
  • 46. Curvature: Pre-Integrated BRDF  So where do we get curvature (1/radius)  Similar triangles and derivatives. c = length(fwidth(N)) / length(fwidth(pmm)) Advances in Real-Time Rendering in Games
  • 47. Curvature: Pre-Integrated BRDF  So where do we get curvature (1/radius)  Similar triangles and derivatives.  Derivatives are constant within a triangle  Sometimes this is fine  If edges appear, store curvature in vertices or texture Advances in Real-Time Rendering in Games
  • 48. Three Problems to Solve 1.) Surface Curvature Pre-integrated curvature-based BRDF 2.) Small Surface Bumps Advances in Real-Time Rendering in Games
  • 49. Per-Channel Bent Normals  BRDF works for smooth curvy surfaces  What about small bumps in normal maps?  Light should scatter past several surface bumps  Using curvature breaks down at small sizes  Let’s focus only on normals now Advances in Real-Time Rendering in Games
  • 50. Per-Channel Bent Normals  With a normal map we can sample neighbourhood  We could take many samples, light, weight and accumulate  Or, can we pre-filter the normal map?  Pre-filtering dot(N,L) is correct  Pre-filtering max(0,dot(N,L)) isn’t strictly correct (but it’s close)  LEAN/CLEAN mapping does this for specular Advances in Real-Time Rendering in Games
  • 51. Per-Channel Bent Normals  Tangent:  Normal maps can be acquired (Ma et al. 2007)  One technique applies light gradients to capture normals  Different light colours produced different captured normals Advances in Real-Time Rendering in Games
  • 52. Per-Channel Bent Normals Ma et al. 2007 - Rapid Acquisition of Specular and Diffuse Normal Maps Advances in Real-Time Rendering in Games
  • 53. Per-Channel Bent Normals Ma et al. 2007 - Rapid Acquisition of Specular and Diffuse Normal Maps Advances in Real-Time Rendering in Games
  • 54. Per-Channel Bent Normals Ma et al. 2007 - Rapid Acquisition of Specular and Diffuse Normal Maps Advances in Real-Time Rendering in Games
  • 55. Per-Channel Bent Normals Ma et al. 2007 - Rapid Acquisition of Specular and Diffuse Normal Maps Advances in Real-Time Rendering in Games
  • 56. Per-Channel Bent Normals  We don’t need captured normals to use this technique  Start with ‘true’ normal map (spec)  Pre-filter new normal maps with R/G/B skin profiles  Optimally we need 4 normals now  R/G/B and Spec  Looks great! Lots of memory! Advances in Real-Time Rendering in Games
  • 57. Bent Normals (Optimized) A.) Use geometry and spec normals (blend the rest)  Only works for certain art!  Normal map must contain only details (wrinkles/pores) B.) Use two normal samples (blend the rest)  Works for all art!  One normal-map, two samplers  Clamp one sampler at blurred mip threshold Advances in Real-Time Rendering in Games
  • 58. Bent Normals - Results Without bent normals With bent normals Advances in Real-Time Rendering in Games
  • 59. Bent Normals - Results  Now we have pretty good solutions for:  Curvy but smooth surfaces (pre-integrated BRDF)  Flat but bumpy surfaces (pre-integrated normal maps)  These complement each other  BRDF chosen from prevailing curvature (geometry)  Broad scattering from dominant surface  Bent normals fill in the gaps  Fine-grained scattering of local details Advances in Real-Time Rendering in Games
  • 60. Three Problems to Solve 1.) Surface Curvature Pre-integrated curvature-based BRDF 2.) ‘Small’ Surface Bumps Pre-integrated bent normals 3.) Shadows Pre-integrated shadow penumbrae Advances in Real-Time Rendering in Games
  • 61. Shadows  What about shadows?  Shadows also give skin a characteristic look  Seems more difficult:  Shadows depend on arbitrary occluders  Can fall anywhere on the surface Advances in Real-Time Rendering in Games
  • 62. Shadows  Turns out we can apply a very similar technique  Other approaches have used a texture lookup to mimic the look of skin(GDC 2005, Tatarchuk)  In our work we apply the diffusion profiles Advances in Real-Time Rendering in Games
  • 63. Shadows  Turns out we can apply a very similar technique  This is the shadow from a box filter S(x) Advances in Real-Time Rendering in Games
  • 64. Shadows  Turns out we can apply a very similar technique  This is the shadow from a box filter S(x)  Given the shadow value Advances in Real-Time Rendering in Games
  • 65. Shadows  Turns out we can apply a very similar technique  This is the shadow from a box filter S(x)  Given the shadow value  Invert the penumbra blur function S-1(x) Advances in Real-Time Rendering in Games
  • 66. Shadows  Turns out we can apply a very similar technique  This is the shadow from a box filter S(x)  Given the shadow value  Invert the penumbra blur function S-1(x)  Find the position within the shadow Advances in Real-Time Rendering in Games
  • 67. Shadows  Map to a smaller shadow with room for scattering Advances in Real-Time Rendering in Games
  • 68. Shadows  Apply similar integration as our diffuse Advances in Real-Time Rendering in Games
  • 69. Shadows  Pre-integrate for different penumbra size (eg. due to slope) Advances in Real-Time Rendering in Games
  • 70. Shadows  Let’s look at some results compared to TSD Advances in Real-Time Rendering in Games
  • 71. Pre- TSD Integrated Advances in Real-Time Rendering in Games
  • 72. Results TSD Advances in Real-Time Rendering in Games
  • 73. Results Pre- Integrated Advances in Real-Time Rendering in Games
  • 74. Results Diffuse Advances in Real-Time Rendering in Games
  • 75. Results TSD Advances in Real-Time Rendering in Games
  • 76. Results Pre-Integrated Advances in Real-Time Rendering in Games
  • 77. Shadows  We need a wide penumbra to get lots of scattering  We used two different shadow techniques  In both cases it really helps to use extra shadow maps  We can cheat: only render the head, not the whole scene  Can be as low as 642 for one head (preferably 1282) Advances in Real-Time Rendering in Games
  • 78. Shadows - PCF  1.) Pixel Quad Amortization (16 shadow map texels per sample!)  Pixels are rendered in quads – quad pixels can share work!  8x8 PCF in 4 samples!  Requires Nvidia card (but DX11 ‘fine’ ddx/ddy might fix that)  Tell me if you try it with DX11 hardware!!  See GPU Pro 2 for details Advances in Real-Time Rendering in Games
  • 79. Shadows - VSMs  2.) Masked Variance Shadow maps  Render only the head into it’s own small variance shadow map  ‘Background’ causes bad variance artifacts!  Include an extra channel as background mask (eg. A2B10G10R10)  Blur the variance shadow map and mask  Correct variance sample to remove the background percentage  Correct the shadow calculation accordingly  Background percentage = not shadowed Advances in Real-Time Rendering in Games
  • 80. Filmic Tone-mapping  All the images today use filmic tone-mapping  Certain shots (eg. sunlight) need a lot of light  Scattering occurs at the dark end of dynamic range  If we try capture the bright light  We invariably crush the darks into a small dynamic range  In summary, we need high dynamic range!  And a way to map it nicely to a LDR display Advances in Real-Time Rendering in Games
  • 81. Filmic Tone-mapping  Kodak film response curves  This is a nice approximation: (Hejl 2009) x = max(0, LinearColor-0.004); GammaColor = (x*(6.2*x+0.5))/ (x*(6.2*x+1.7)+0.06); Advances in Real-Time Rendering in Games
  • 82. Filmic Tone-mapping  Without filmic tonemap  1x intensity  Larger size  Boring! Advances in Real-Time Rendering in Games
  • 83. Filmic Tone-mapping  Without filmic tonemap  4x intensity  More interesting, but! Saturated (clamped to 1.0) Less saturated Advances in Real-Time Rendering in Games blacks
  • 84. Filmic Tone-mapping  With filmic tonemap  4x intensity Saturated Advances in Real-Time Rendering in Games blacks
  • 85. Filmic Tone-mapping  Without filmic tonemap Advances in Real-Time Rendering in Games
  • 86. Filmic Tone-mapping  With filmic tonemap Advances in Real-Time Rendering in Games
  • 87. Filmic Tone-mapping  Digital cameras also have this problem!  Left side is desired look  Right side is blown out  Film is much better Advances in Real-Time Rendering in Games
  • 88. Filmic Tone-mapping  Varying size and intensity by powers of two Still 251/255 Advances in Real-Time Rendering in Games
  • 89. Pre-Integrated Skin Shading  Future work:  Approximate lookup textures with curve fitting  Use additional axis of curvature in diffuse fall-off  Include transmittance techniques  When the detailed normal map gets blurred, we lose the small scattering effects from our normal map technique. Possibly we should bias the curvature lookup to account for this in the BRDF. Advances in Real-Time Rendering in Games
  • 90. Pre-Integrated Skin Shading  Thanks to:  George Borshukov  Natalya Tatarchuk  Google (where I work now)  Everyone at Electronic Arts (where I used to work) Advances in Real-Time Rendering in Games
  • 91. Advances in Real-Time Rendering in Games
  • 92. Curvature: Pre-Integrated BRDFs  Integrate all incoming light on a sphere(or a ring, it’s easier) Profile Oops! saturate(cos())! Advances in Real-Time Rendering in Games