Advanced Computer Graphics CS 563: VPL based RT GI Techniques - - PowerPoint PPT Presentation
Advanced Computer Graphics CS 563: VPL based RT GI Techniques - - PowerPoint PPT Presentation
Advanced Computer Graphics CS 563: VPL based RT GI Techniques William DiSanto Computer Science Dept. Worcester Polytechnic Institute (WPI) Instant Radiosity 1997 Keller Fast and physically accurate Models diffuse lighting Virtual
Instant Radiosity
1997 Keller Fast and physically accurate Models diffuse lighting
Virtual Point Light
Hemispherical light with cosine falloff Positioned by emitting particles from light source Some way to end bounces
Derivation of Instant Radiocity
Rendering Equation Operator R: Express as sum of indirect illumination
Derivation of Instant Radiocity
Express rendering equation as an integration over
the observable light from first hit surface
Express surface lighting term by sampling direct and
indirect paths
Rendering Operator: Reflect >= 1
Express Rendering Equation as sampling along variable
length paths
Function V could be visibility from AO (inviting error)
Compute Indirect: over Path Lengths (j), Pixels,
Paths, and Light Sources
Derivation of Instant Radiocity
Radiance after j reflections: Assume perfectly diffuse BRDF (constant term)
IR Result
Samples from Area Light Bounces
Making the Algorithm Practical
Limit number of samples virtual point lights and
number of bounces
Proportional to reflectivity of the media Assume less the perfect reflection ( < 1)
Compute light observed in terms of radiance from
- riginal light source propagated over some number of
bounces
Implementation of Instant Radiocity
Start with N particles at light
Determine samples remaining
Select a originator from light source
Trace through reflections
Loop until no samples are left : Light Power : Average Diffuse : Projection Direction Next Slide
Implementation of Instant Radiocity
Render all 1st 2nd, 3rd bounce
VPLs together
All radiation from a sample
particle rendered in one iteration : hit point : diffuse attenuation :random direction
Sampling
Random Jitter Halton
Omni‐Directional RSMs
Problems with IR
Requires many renders, possibly shadow maps Requires many VPLs
100+ for static scene
Interactive rates reached with averaging renders
1000+ for dynamic scene
Problems with IR
Specular surfaces reveal locations of VPLs
Problems with IR
Render many detailed shadow maps
Incremental Instant Radiosity
Scenes can be rendered fairly accurately with
- nly one bounce
Use Reflective Shadow Map to distribute first
bounce Virtual Point Lights
Incremental Instant Radiosity
Reuse VPLs from previous renders
Budget 4‐8 new VPLs per new frame
Allows for moving light sources Assumes a static scene (could be large) Good frame rates 40+
Procedure: Find Bad VPLs
1. Determine valid VPLs 2. Remove invalid VPLs
Occluded from light source Behind view of light source
Procedure: Find Bad VPLs
Generate Voronoi Diagram and Delaunay Triangulation for
point set (left)
Some VPLS may be removed if they contribute to regions
where virtual point light density is too great (right)
Characterized by having short edge lengths
Procedure: Seed VPLs
3.a Create VPLs within budget and render SMs
Long edges are good places to seed new VPLs
4. Compute new Voronoi Area and weight intensity for
VPLs accordingly
Procedure: Project
3.b Render Shadow maps for new VPLs
Project new VPL distribution onto hemisphere
Procedure: Render
5. Perform deferred render pass
store: position, normals, color
6. Tile the G‐Buffer (will reduce texture lookups) 7. Loop over tiles
use subset of VPLs to color each tile, results in noise
Procedure: Recombine + Smooth
8. Combine tiles back into full resolution image 9. Use spatially aware box filter (example on 4x4 tiling)
Same size as tiling May require some tuning
IIR: Results
IIR: Problems
Diffuse surfaces only View dependent Dynamic scenes will have lagging shadows This GI takes 70+ % of rendering budget Does have nice overall render times
Imperfect Shadow Maps
Attempts indirect illumination for dynamic scenes For many scenes: Indirect illumination varies smoothly Each VPL has a small contribution
Imperfect Shadow Maps
Depth Renders do not need to be terribly accurate Attempt to render 1000+ ISMs
Procedure: VPL Generation
Render Omni‐Directional RSM
Randomly seed VPLs by importance (some PDF)
Procedure: Pre‐Processing
Randomly sample geometry Select triangles with probability proportional to area
Select a random 3D point on each selected triangle
Store barycentric coordinates with points
Used to calculate normal and reflectance
Procedure: ISM Generation
Each VPL selects a sub sample of points Points are splat onto each depth map (GL_Points) Dynamic scenes are handled by deforming points
Procedure: Pull Push Interpolation
Vertex buffer distributes points to ISMs evenly Gaps are filled with push‐pull, errors average out
Procedure: Pull Push Interpolation
Interpolation performed in texture space Parallel operation Averaging of all ISM increases shadow smoothness
Procedure: Interleaved Sampling
Filter indirect light separately from direct light Indirect light is interleaved Same as in incremental instant radiocity May need to tune parameters
Procedure: Multiple Bounces
Distribute from cube maps of omni‐directional light
1024 VPLs first bounce (left)
+ 256 VPLs second bounce (middle)
+ 256 VPLs third bounce (right)
Problems
Works best with low gloss surfaces Arbitrary tuning
Will not operate the same for every scene For different kinds of lighting
As of 2009 offers only interactive frame rates Does not scale well for large scenes Indirect lighting still accounts for the majority of the
render budget
Results: Complex Geometry
Extends well to arbitrary shapes
1024 VPLs 256x256 with subset of 4,000 points each
Results: Direct Lighting
Complex area lights
512 VPLS
256x256 with subset of 8,000 points each
Results: Glossy
4096 VPLs, 64x64 resolution, subset of 2,000 points each Problem with hard shadows
Results: Environmental Maps
Direct Environment Lighting
1024 VPLs
256x256 with subset of 8,000 points each
Results: Sponza Scene
7 ms VPL generation 44 ms ISM 8 ms Pull‐Push 15 ms Rendering 4 ms Blur 11 ms Direct Lighting
Results: Accuracy
Parameters can be manually adjusted to fit the scene (splat size, resolution, point samples)