Lecture 12: Shading (cont.)
COMP5822M – High Perf. Graphics
– Rendering Equation – Emissive
Copyright By PowCoder代写 加微信 powcoder
– BRDF (lambertian, microfacets)
– Incident illumination
COMP5822M – High Perf. Graphics
– Shading(cont.) – AO, SSAO et al. – IBL
– Lightmaps
– Other GI
COMP5822M – High Perf. Graphics
The Rendering Equation
COMP5822M – High Perf. Graphics
What goes into each of these?
Reality is weirder than our graphics
– We’re trying to emulate reality.
– But with very much simplified models
– Capture the important parts.
– What are we missing? – Quite a few things.
COMP5822M – High Perf. Graphics
Reality is weirder than our graphics
– Example:
What does the shadow look like?
A disk? Something else?
Light Coin
COMP5822M – High Perf. Graphics
Reality is weirder than our graphics
– Example:Poisson/FresnelSpot
– What does the shadow look like?
2021/2022 Wall COMP5822M – High Perf. Graphics
A “fuzzy” disk with a bright spot in the middle?
Reality is weirder than our graphics ray optics
– Example:Poisson/FresnelSpot –
What does the shadow look like?
Light Coin
COMP5822M – High Perf. Graphics
A “fuzzy” disk with a bright spot in the middle.
The Rendering Equation
COMP5822M – High Perf. Graphics
What goes into each of these?
Basic model
– Directilluminationonly
– You already know this one.
– With / without shadow maps
COMP5822M – High Perf. Graphics
Basic model
– Directilluminationonly
– You already know this one.
– With / without shadow maps
– Phong: Diffuse and Specular reflections – SimilarforotherBRDFs
COMP5822M – High Perf. Graphics
Basic model
– Ambientlight
– The most approximate approximation of indirect illum.
– Models light that has bounced around many times
– And thus comes equally from all directions
COMP5822M – High Perf. Graphics
– Two sets of techniques:
– First: trying to fix/improve ambient
– Second: indirect/global illumination models
COMP5822M – High Perf. Graphics
Ambient Occlusion
– Recall: ambient is light coming equally from all directions
COMP5822M – High Perf. Graphics
Ambient Occlusion
– Recall: ambient is light coming equally from all directions
COMP5822M – High Perf. Graphics
Ambient Occlusion
– Recall: ambient is light coming equally from all directions
COMP5822M – High Perf. Graphics
Ambient Occlusion
– Recall: ambient is light coming equally from all directions
– Concaveregions: Ambient light blocked.
COMP5822M – High Perf. Graphics
Ambient Occlusion
– Recall: ambient is light coming equally from all directions
– Concaveregions:
Ambient light blocked. – To varying degrees.
COMP5822M – High Perf. Graphics
Ambient Occlusion
– AmbientOcclusion/Obscurance(AO)modelsthis – This helps highlight surface details
2021/2022 Src: “The Alchemy screen-space ambient obscurance algorithm” COMP5822M – High Perf. Graphics McGuire, Osman, Bukowski & Hennessey (2011)
Ambient Occlusion
COMP5822M – High Perf. Graphics
𝐿𝐴 𝜔,𝒏 𝑑𝜔=2𝜋𝐿𝐴 Ω+
Ambient Occlusion
COMP5822M – High Perf. Graphics
𝐿𝐴 𝜔,𝒏 𝑑𝜔<2𝜋𝐿𝐴 Ω+
𝐿𝐴 𝜔,𝒏 𝑑𝜔=2𝜋𝐿𝐴 Ω+
Ambient Occlusion
- How do we evaluate it? - Ray tracing
- Geometric
- Screen space
COMP5822M – High Perf. Graphics
Ambient Occlusion Volumes
- Geometricapproach
- “Ambient Occlusion Volumes”, McGuire (2010)
- (And related works)
COMP5822M – High Perf. Graphics
Ambient Occlusion Volumes
- Geometricapproach
“Ambient Occlusion Volumes”, McGuire (2010) (And related works)
COMP5822M – High Perf. Graphics
Src: “Ambient Occlusion Volumes”, McGuire (2010)
Screen space techniques
- “Screenspaceambientocclusion”(SSAO) - Most common approaches
- Manyvariations
- Ambient Occlusion
- Ambient Obscurance
- Screen Space Global Illumination
/ Screen Space Directional Occlusion -...
COMP5822M – High Perf. Graphics
Screen space techniques
- Basicidea:
- Inspect depth buffer in a local
neighbourhood
- E.g. how much of the horizon
is obscured?
COMP5822M – High Perf. Graphics
Screen space techniques
- Basicidea:
- Inspect depth buffer in a local
neighbourhood
- E.g. how much of the horizon
is obscured?
COMP5822M – High Perf. Graphics
Src: https://learnopengl.com/Advanced-Lighting/SSAO
SSAO - Implementation
- Take N samples in neighbourhood
- Disc vs. hemisphere
- Random or patterns (see papers)
- Blurresults
- Fewer samples in previous step
- Clever blurs (bilateral, ...) can help
COMP5822M – High Perf. Graphics
SSAO - Implementation
- Take X samples in neighbourhood
- Disc vs hemisphere
- Random or patterns (see papers)
- Blurresults
- Allows use of fewer samples in previous step
- Clever blurs (bilateral, ...) can help
COMP5822M – High Perf. Graphics McGuire, Osman, Bukowski & Hennessey (2011)
Src: “The Alchemy screen-space ambient obscurance algorithm”
SSAO – False AO
- Gotcha:ambiguousdepthbufferconfigurations
COMP5822M – High Perf. Graphics
SSAO – False AO
- Gotcha:ambiguousdepthbufferconfigurations
COMP5822M – High Perf. Graphics
SSAO – False AO
- Workaround:
- Threshold when sampling neighbourhood
- Too far away: assume “open” space
- Otherapproaches:
- Multiple layers
- Multiple views -...
COMP5822M – High Perf. Graphics
SSAO – False AO
- Workaround:
- Threshold when sampling neighbourhood
- Too far away: assume “open” space
- Otherapproaches:
- Multiple layers
- Multiple views -...
COMP5822M – High Perf. Graphics
Src: https://www.babylonjs.com/demos/ssao/
SSAO – False AO
- Workaround:
- Threshold when sampling neighbourhood
- Too far away: assume “open” space
False AO around the cat.
- Otherapproaches:
- Multiple layers
- Multiple views -...
COMP5822M – High Perf. Graphics
Src: https://www.babylonjs.com/demos/ssao/
SSAO – False AO
- Threshold:producesreverseproblem
- White “halos” around foreground objects.
COMP5822M – High Perf. Graphics
SSAO – False AO
- Threshold:producesreverseproblem
- White “halos” around foreground objects.
Greedfall (https://guides4gamers.com/sites/19/screenshots/2019/09/1920/the-battle-of-the-red-spears-1.jpg)
COMP5822M – High Perf. Graphics
Assassin’s Creed 3 https://www.youtube.com/watch?v=3yq_5dBSy2E
SSAO – False AO
- Threshold:producesreverseproblem
- White “halos” around foreground objects.
Greedfall (https://guides4gamers.com/sites/19/screenshots/2019/09/1920/the-battle-of-the-red-spears-1.jpg)
COMP5822M – High Perf. Graphics
Assassin’s Creed 3 https://www.youtube.com/watch?v=3yq_5dBSy2E
SSAO – Edges
- Screenedgesareproblematic
- General issue with screen space techniques
COMP5822M – High Perf. Graphics
SSAO – Edges
- Screenedgesareproblematic
- General issue with screen space techniques
COMP5822M – High Perf. Graphics
Greedfall (Note: just for illustration, not sure if/how they solved this.) (https://guides4gamers.com/sites/19/screenshots/2019/09/1920/the-battle-of-the-red-spears-1.jpg)
SSAO – Edges
- Screenedgesareproblematic
- General issue with screen space techniques
COMP5822M – High Perf. Graphics
Greedfall (Note: just for illustration, not sure if/how they solved this.) (https://guides4gamers.com/sites/19/screenshots/2019/09/1920/the-battle-of-the-red-spears-1.jpg)
SSAO – Edges
- Screenedgesareproblematic
- General issue with screen space techniques
Outside of rendered area. No depth buffer values here!
COMP5822M – High Perf. Graphics
Greedfall (Note: just for illustration, not sure if/how they solved this.) (https://guides4gamers.com/sites/19/screenshots/2019/09/1920/the-battle-of-the-red-spears-1.jpg)
SSAO – Edges
- Screenedgesareproblematic
- General issue with screen space techniques
- Sometimesvisible
- SSAO: less AO along the edge of the screen
- (Other techniques similar)
COMP5822M – High Perf. Graphics
SSAO – Edges
- Fixes/workarounds
- Render slightly larger view
=> information around edges of visible image
– Play with texture address modes
(e.g. MIRRORED_REPEAT?)
– Ignore problem.
COMP5822M – High Perf. Graphics
Extensions – SSDO / SSGI
– SSAO:removeambientcontribution
– SSDO/SSGI: add single bounce
– Still account for AO.
– SSDO: consider light direction
when evaluating AO.
COMP5822M – High Perf. Graphics
Extensions – SSDO / SSGI
– SSAO:removeambientcontribution
– SSDO/SSGI: add single bounce
– Still account for AO.
– SSDO: consider light direction
when evaluating AO.
COMP5822M – High Perf. Graphics
Extensions – SSDO / SSGI
– SSAO:removeambientcontribution – SSDO/SSGI: add single bounce
Still account for AO.
SSDO: consider light direction when evaluating AO.
COMP5822M – High Perf. Graphics
Src: “Approx. Dynamic Global Illumination in Image Space” Ritschel, Grosch & Seidel (2009)
Image-based Lighting (IBL)
– Ambient: constant amount of light everywhere
– Can we improve that?
COMP5822M – High Perf. Graphics
Image-based Lighting (IBL)
– Ambient: constant amount of light everywhere
– Can we improve that?
– Environmentmaps.
COMP5822M – High Perf. Graphics
Image-based Lighting (IBL)
– Ambient: constant amount of light everywhere
– Can we improve that?
– Environmentmaps.
– Tell us what light is coming
from what direction.
COMP5822M – High Perf. Graphics
Src: https://learnopengl.com/PBR/IBL/Diffuse-irradiance
Image-based Lighting (IBL)
– Integrate incoming light over hemisphere – Expensive if done naively
– Precompute approximation of integral
– Essentially a blur/convolution of the env. map
– Sample with fewer taps
COMP5822M – High Perf. Graphics
Src: https://learnopengl.com/PBR/IBL/Diffuse-irradiance
Image-based Lighting (IBL)
– Integrate incoming light over hemisphere – Expensive if done naively
– Precompute approximation of integral
– Essentially a blur/convolution of the env. map
– Sample with fewer taps
COMP5822M – High Perf. Graphics
Src: https://learnopengl.com/PBR/IBL/Diffuse-irradiance
Image-based Lighting (IBL)
– Extensions to specular
– Makes objects look more like
a part of the environment.
– Requiresgoodenvironment
– But approx. static maps
COMP5822M – High Perf. Graphics
Src: https://learnopengl.com/PBR/IBL/Diffuse-irradiance
Indirect / Global Illumination
– Simulatefulllighttransport – Or parts of it.
COMP5822M – High Perf. Graphics
Indirect / Global Illumination
– Simulatefulllighttransport – Or parts of it.
– Approaches:
– Precompute
– Approximate
– Undersample + Reconstruct
– Or combinations
COMP5822M – High Perf. Graphics
Indirect / Global Illumination
– Techniques: – Lightmaps
– VPLs, RSMs, LPVs, SSR, … 🙂
COMP5822M – High Perf. Graphics
– Precomputelighttransport – Store in a texture
COMP5822M – High Perf. Graphics
– Precomputelighttransport
– Store in a texture
– Needs unique texture for every piece of the scene
– Can get expensive
– Lower resolution lightmap + detailed high-res textures
– Two sets of texture coordinates
COMP5822M – High Perf. Graphics
– Precomputelighttransport
– Store in a texture
– Needs unique texture for every piece of the scene
– Can get expensive
– Lower resolution lightmap + detailed high-res textures
– Two sets of texture coordinates
– Static scenes (geometry + lights) only
COMP5822M – High Perf. Graphics
– Precomputelighttransport – Store in a texture
COMP5822M – High Perf. Graphics
“The Unique Lighting of Mirror’s Edge”, Larsson & Halén (2010)
– Augmentwithe.g.lightprobes
– Illuminate dynamic objects
– Objects won’t affect light transport, though.
COMP5822M – High Perf. Graphics
– CanprecomputepartialGI – E.g., just ambient occlusion
COMP5822M – High Perf. Graphics
Virtual Point Lights (VPLs)
– Outline: use secondary light sources to emulate indirect light
COMP5822M – High Perf. Graphics
Virtual Point Lights (VPLs)
– Outline: use secondary light sources to emulate indirect light
COMP5822M – High Perf. Graphics
Virtual Point Lights (VPLs)
– Outline: use secondary light sources to emulate indirect light
COMP5822M – High Perf. Graphics
Virtual Point Lights (VPLs)
– Outline: use secondary light sources to emulate indirect light
COMP5822M – High Perf. Graphics
Virtual Point Lights (VPLs)
– Originatesfromoff-linerendering
– Trickyparts:
– Potentially large amount of (overlapping) light sources
– Splotches/fireflies and related artifacts
COMP5822M – High Perf. Graphics
Virtual Point Lights (VPLs)
– Originatesfromoff-linerendering
– Trickyparts:
– Potentially large amount of (overlapping) light sources
– Splotches/fireflies and related artifacts
– Temporal instability, …
COMP5822M – High Perf. Graphics
Src: http://sjbrown.co.uk/2011/05/09/virtu al-point-light-bias-compensation/
Virtual Point Lights (VPLs)
– Originatesfromoff-linerendering
– Trickyparts:
– Potentially large amount of (overlapping) light sources
– Splotches/fireflies and related artifacts
– Temporal instability, …
COMP5822M – High Perf. Graphics
Virtual Point Lights (VPLs)
– Originatesfromoff-linerendering
– Trickyparts:
– Potentially large amount of (overlapping) light sources
– Splotches/fireflies and related artifacts
– Temporal instability, …
– Adapted to real-time in a few different forms
– Manually placed lights
– E.g. “Incremental Instant Radiosity For Real-Time Indirect Illum.”
Laine, Saransaari, Kontkanen, Lehtinen & Aila (2007)
COMP5822M – High Perf. Graphics
Reflective Shadow Maps (RSMs)
– Closely related to VPLs
– Can generate VPS of a reflective shadow map
COMP5822M – High Perf. Graphics
Reflective Shadow Maps (RSMs)
– Closely related to VPLs
– Can generate VPS of a reflective shadow map
COMP5822M – High Perf. Graphics
Reflective Shadow Maps (RSMs)
– Closely related to VPLs
– Can generate VPS of a reflective shadow map
COMP5822M – High Perf. Graphics
Reflective Shadow Maps (RSMs)
– Closely related to VPLs
– Can generate VPLs from a reflective shadow map
– “Reflective shadow maps”
Dachsbacher & Stamminger (2005)
– Many follow up works
COMP5822M – High Perf. Graphics
Reflective Shadow Maps (RSMs)
– Use RSMs to find main reflections
– Model with a VPL
COMP5822M – High Perf. Graphics
Light Propagation Volumes (LPVs)
– Differentapproach
– Insert (reflected) light into a grid
– Iteratively move around light in the grid
COMP5822M – High Perf. Graphics
Light Propagation Volumes (LPVs)
– Differentapproach
– Insert (reflected) light into a grid
– Iteratively move around light in the grid
Iter. 1 Iter. 2 Iter. 3 Sum( Iter. 1… N )
COMP5822M – High Perf. Graphics
Light Propagation Volumes (LPVs)
– Differentapproach
– Insert (reflected) light into a grid
– Iteratively move around light in the grid
Iter. 1 Iter. 2 Iter. 3 Sum( Iter. 1… N )
COMP5822M – High Perf. Graphics
Light Propagation Volumes (LPVs)
– Originally:
– “Cascaded Light Propagation Volumes for Real-Time Indirect
Illumination”
Kaplanyan & Dachsbacher (2010)
– Crytek / Crysis, now elsewhere
– “Real-Time Multiple Scattering with Light Propagation Volumes” Billeter, Sintorn & Assarsson (2012)
– Others of course.
COMP5822M – High Perf. Graphics
Screen Space Reflections
– Idea: find reflections in rendered image – With depth buffer.
COMP5822M – High Perf. Graphics
Screen Space Reflections
– Idea: find reflections in rendered image – With depth buffer.
COMP5822M – High Perf. Graphics
Src: “Stochastic Screen-Space Reflections”, Stachowiak (2015).
Screen Space Reflections
– Idea: find reflections in rendered image – With depth buffer.
COMP5822M – High Perf. Graphics
Src: “Stochastic Screen-Space Reflections”, Stachowiak (2015).
Screen Space Reflections
– Idea: find reflections in rendered image – With depth buffer.
COMP5822M – High Perf. Graphics
Src: “Stochastic Screen-Space Reflections”, Stachowiak (2015).
Screen Space Reflections
– Idea: find reflections in rendered image – With depth buffer.
COMP5822M – High Perf. Graphics
Src: “Stochastic Screen-Space Reflections”, Stachowiak (2015).
Screen Space Reflections
– See e.g.: “Stochastic Screen-Space Reflections”
Stachowiak (2015) – Frostbite Engine
– Undersample & reconstruct (TAA?) – Problems at edges of screen.
COMP5822M – High Perf. Graphics
– See Advances in Real-Time Rendering webpage for the video on the stochastic screen-space reflections!
(http://advances.realtimerendering.com/s2015/index.html)
COMP5822M – High Perf. Graphics
COMP5822M – High Perf. Graphics
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com