advanced computer graphics cs 563: vpl based real time gi...
TRANSCRIPT
![Page 1: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/1.jpg)
Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI
AlgorithmLight Propagation Volumes
Xin Wang
Computer Science Dept.Worcester Polytechnic Institute (WPI)
![Page 2: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/2.jpg)
Overview
![Page 3: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/3.jpg)
Previous Work
Irradiance Volumes[Greger et al. 1997]/SH Irradiance Volumes[Tatarchuk 2004]
VPL Visibility[Laine et al. 2007] Lattice‐Boltzmann Lighting[Geist et al. 2004] Light Propagation Maps[Fattal 2009]
![Page 4: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/4.jpg)
Massive Lighting
Render sliced unwrapped light box into LPV (spatial overdraw vs screen‐space, maximum 1024x32 pixels)
Convert light’s radiant intensity into SH Shadows are not supported
Coverage in unwrapped render target
Light in the Light Propagation Volume
![Page 5: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/5.jpg)
Basic Idea
![Page 6: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/6.jpg)
Basic Idea
![Page 7: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/7.jpg)
Basic Idea
![Page 8: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/8.jpg)
Propagation Example
![Page 9: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/9.jpg)
Light Propagation Volume Outline
Use many‐lights approach to capture sources of indirect lighting
Sample directly lit surfaces and initialize 3D grid Represent directional distribution with Spherical
Harmonics Inspired by SH Irradiance Volumes [Tatarchuk04]
Iterative, local propagation: cell‐to‐cell
![Page 10: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/10.jpg)
Secondary Light Sources
Sample lit surface elementsSample lit surface elements
Grid initializationGrid initialization
Light propagation in the gridLight propagation in the grid
Scene illumination with the gridScene illumination with the grid
![Page 11: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/11.jpg)
Reflective Shadow Maps
Reflective Shadow Map – efficient VPL generator Shadow map with MRT layout: depth, color and normal
Flux NormalDepth
![Page 12: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/12.jpg)
Injection
Sample lit surface elementsSample lit surface elements
Grid initializationGrid initialization
Light propagation in the gridLight propagation in the grid
Scene illumination with the gridScene illumination with the grid
![Page 13: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/13.jpg)
Rendering Pipeline – Injection
Reflective shadow maps Radiance volume gathering
VPL
VPL
VPL
Discretize initial VPL distribution by the regular grid and SH
A set of regularly sampled VPLs of the scene from light position
![Page 14: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/14.jpg)
Light Injection into the Volume
Every element of Reflective Shadow Mapis a secondary lights
Render as a point primitive into 3D grid Represent flux in Spherical
Harmonics Accumulate all VPLs into the grid The 3D grid is initialized with
initial reflected light in the end
![Page 15: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/15.jpg)
Light Propagation
Sample lit surface elementsSample lit surface elements
Grid initializationGrid initialization
Light propagation in the gridLight propagation in the grid
Scene illumination with the gridScene illumination with the grid
![Page 16: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/16.jpg)
Rendering Pipeline – Propagate
Reflective shadow maps Radiance volume gathering
VPL
VPL
VPL
Discretize initial VPL distribution by the regular grid and SH
Iterative propagation
Propagate light iteratively going from one cell to another
A set of regularly sampled VPLs of the scene from light position
![Page 17: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/17.jpg)
Iterative Light Propagation
Local cell‐to‐cell propagationacross the 3D grid Iterate till the light travels through
the entire volume Similar to SH Discrete Ordinate
Method (used for participatingmedia illumination)
Number of iterations depend on the resolution of the grid
![Page 18: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/18.jpg)
The Propagation Iteration
6 axial directions of propagation Use contour faces as a
propagation wave front Integrate source
intensity by the solid angle to get incoming fluxfor the face f
![Page 19: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/19.jpg)
The Propagation Iteration
Use more than 6 directions Only 6 direct neighbors Compute light
propagation to eachface of neighbors’ cells
30 virtual directions SHDOM: 27 neighbor
cells = 27 directions good trade‐off of
memory bandwidth
“Ray effect” ‐ light propagates in a set of fictitious directions
4 directions of propagation
8 directions of propagation
![Page 20: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/20.jpg)
Reprojection
Acquire the incident flux throughthe receiving face
Create a new point light in the center of receiving cell Oriented towards the face Causing exactly the same flux as the face received
Generate clamped cosine lobe in SH basis similar to injection stage
Accumulate the resulting SH coefficients into the destination cell for next iteration
![Page 21: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/21.jpg)
Rendering
Look‐up grid with trilinear interpolation Evaluate the irradiance with cosine lobe of surface’s
normal Apply dampening factor Compute directional derivative towards normal Dampen based on derivative deviation from the intensity
distribution direction
![Page 22: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/22.jpg)
Results of indirect illumination
![Page 23: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/23.jpg)
Cascaded Light Propagation Volumes Motivation: memory and bandwidth
cost is o(N^3) for increase of LPV grid Impossible to support large scenes
Idea: use multiple nested grids torefine resolution hierarchically Do not consider small objects for
large sparse grids Transfer propagated lighting from
nested grid to the parent grid Illuminate scene similarly to
cascaded shadow maps Reduces the number of iterations sufficient per cascade
![Page 24: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/24.jpg)
Cascaded Indirect Illumination
1 cascade
3 cascades
![Page 25: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/25.jpg)
Multiple Bounces Idea: use information
from occlusion gridto compute multipleindirect reflections
Reflect light duringeach propagationiteration
Avoid self‐illumination by injecting reflectedlight at safety‐distance
![Page 26: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/26.jpg)
Glossy Reflections
• Idea: Compute incident light from reflection direction by marching through LPV grid
• Go few steps back in propagation time to reducelight smearing
• 4 cells is sufficient for moderately glossy objects
• Lookups into multiple cells prevent discontinuitiesin glossy reflections
![Page 27: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/27.jpg)
Conclusion
Full‐dynamic: scene, view, lighting changes Real‐time: GPU‐ and consoles‐ friendly Production‐eligible (simple tweaking) Highly scalable proportionally to quality
Stable, flicker‐free Supports complex geometry (e.g. foliage)
![Page 28: Advanced Computer Graphics CS 563: VPL based Real Time GI ...web.cs.wpi.edu/~emmanuel/courses/cs563/S12/slides/... · Advanced Computer Graphics CS 563: VPL‐based Real‐Time GI](https://reader033.vdocuments.us/reader033/viewer/2022042912/5f463c2636d8164eca3bb16c/html5/thumbnails/28.jpg)
References
Cascaded Light Propagation Volumes for Real‐Time Indirect Illumination. Anton Kaplanyan, Carsten Dachsbacher. ACM 2010
Light Propagation Volumes in CryEngine3. Anton Kaplanyan. Siggraph 2009