Light Animation with Precomputed Light Paths on the GPU László Szécsi, TU Budapest László Szirmay-Kalos, TU Budapest Mateu Sbert, U of Girona
GI: light path generation image Virtual world
Path reuse
Path precomputation Entry point Exit point
Previous work In a single frame In a single frame –Random walk with splitting –Bi-directional methods Bidir path tracing, photon map, instant radiosity Bidir path tracing, photon map, instant radiosity –Metropolis –Iterative methods In multiple frames In multiple frames –Radiosity: static lights + diffuse surfaces –Light Animation: non-diffuse + static camera –PRT: environment map lighting –LPRT:
Storing partial light paths Finite element representation Finite element representation –Pros: compact, good for low frequency illumination –Cons: costly to update Sampling + interpolation Sampling + interpolation –Pros: easier to update, good for high frequency illumination –Cons: not as compact
Contribution of this paper Precomputation aided Real-time global illumination Precomputation aided Real-time global illumination Static scene Static scene For the sake of simplicity: diffuse scene For the sake of simplicity: diffuse scene Dynamic camera and lights Dynamic camera and lights Light paths are stored using sampling Light paths are stored using sampling
New method Preprocessing: Preprocessing: –Exit point selection –Random entry point selection –Computation of light transfer capabilities between entry and exit points –Storing the results in Precomputed Radiance Maps Real-time rendering Real-time rendering –Modulation of the Precomputed Radiance Maps with the actual lighting
Preprocessing: Exit points 1. Vertices 2. Correspond to texel centers
Preprocessing: Entry points Random sampling
Preprocessing: Transfer from entry to exit points entry point with unit irradiance
Preprocessing: Reference point illumination Virtual lights unit irrad
Precomputed Radiance Map Item: (entry, exit, irrad) unit irrad transfer irrad
PRM: 4D array r, g, b Exit point Texcoord: (u,v) Entry point: PRM item
Real-time Rendering: Entry point visibility
Rendering: PRM weighting
Implementation Entry point sampling and Photon tracing Exit point illumination computation PRMs in textures Shadow mapping: Direct illum + Entry point visibility Camera rendering: Direct illum + PRM weighting Image CPUGPU Preprocessing Real-time rendering
Tile in a single or few textures PRMs in textures: Tiling r, g, b Exit point u v Pane of Entry point 1 r, g, b Exit point u v Pane of Entry point 2 Etc.
Entry point clustering r, g, b Exit point v Pane of Entry point 1 r, g, b Exit point Pane of Entry point 2 u u v Close and have similar normals
Resulting cluster r, g, b Exit point v Pane of Entry point Cluster 1 u
Results 4096 entry points 256 – 32 clusters: 128 – 4Mb texture memory Preproc: 5 minutes Rendering: 40 FPS
Results: Room with stairs 16K entries 32 clusters 4Mb per obj 50 FPS
Conclusions Precomputation aided real-time light animation on the GPU Precomputation aided real-time light animation on the GPU Computes indirect illumination Computes indirect illumination Allows dynamic lights and camera Allows dynamic lights and camera Effective for point lights Effective for point lights