230 likes | 324 Views
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
E N D
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 precomputation Entry point Exit point
Previous work • In a single frame • Random walk with splitting • Bi-directional methods • Bidir path tracing, photon map, instant radiosity • Metropolis • Iterative methods • 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 • Pros: compact, good for low frequency illumination • Cons: costly to update • 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 • Static scene • For the sake of simplicity: diffuse scene • Dynamic camera and lights • Light paths are stored using sampling
New method • 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 • Modulation of the Precomputed Radiance Maps with the actual lighting
Preprocessing: Exit points • Vertices • 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 unit irrad Virtual lights
Precomputed Radiance Map Item: (entry, exit, irrad) unit irrad irrad transfer
PRM: 4D array Exit point Texcoord: (u,v) Entry point: r, g, b PRM item
Implementation CPU GPU Entry point sampling and Photon tracing Exit point illumination computation PRMs in textures Preprocessing Shadow mapping: Direct illum + Entry point visibility Camera rendering: Direct illum + PRM weighting Image Real-time rendering
Tile in a single or few textures PRMs in textures: Tiling u u Exit point Exit point v v r, g, b r, g, b Etc. Pane of Entry point 1 Pane of Entry point 2
Entry point clustering u u Exit point Exit point r, g, b r, g, b v v Pane of Entry point 2 Pane of Entry point 1 Close and have similar normals
Resulting cluster u Exit point Pane of Entry point Cluster 1 r, g, b v
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 • Computes indirect illumination • Allows dynamiclights and camera • Effective for point lights