Light Animation with Precomputed Light Paths on the GPU

23
Light Animation with Light Animation with Precomputed Light Precomputed Light Paths on the GPU Paths on the GPU László Szécsi, TU Budapest László Szécsi, TU Budapest László Szirmay-Kalos, TU László Szirmay-Kalos, TU Budapest Budapest Mateu Sbert, U of Girona Mateu Sbert, U of Girona

description

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 - PowerPoint PPT Presentation

Transcript of Light Animation with Precomputed Light Paths on the GPU

Page 1: Light Animation with Precomputed Light Paths on the GPU

Light Animation with Light Animation with Precomputed Light Precomputed Light Paths on the GPUPaths on the GPU

László Szécsi, TU BudapestLászló Szécsi, TU Budapest

László Szirmay-Kalos, TU László Szirmay-Kalos, TU BudapestBudapest

Mateu Sbert, U of GironaMateu Sbert, U of Girona

Page 2: Light Animation with Precomputed Light Paths on the GPU

GI: light path GI: light path generation generation

imageVirtualworld

Page 3: Light Animation with Precomputed Light Paths on the GPU

Path reusePath reuse

Page 4: Light Animation with Precomputed Light Paths on the GPU

Path precomputationPath precomputationEntry point

Exit point

Page 5: Light Animation with Precomputed Light Paths on the GPU

Previous workPrevious work

In a single frameIn a single frame– Random walk with splittingRandom walk with splitting– Bi-directional methodsBi-directional methods

Bidir path tracing, photon map, instant radiosityBidir path tracing, photon map, instant radiosity– MetropolisMetropolis– Iterative methods Iterative methods

In multiple framesIn multiple frames– Radiosity: static lights + diffuse surfacesRadiosity: static lights + diffuse surfaces– Light Animation: Light Animation: non-diffuse non-diffuse + static camera+ static camera– PRT: envPRT: environment mapironment map lighting lighting– LPRT: LPRT:

Page 6: Light Animation with Precomputed Light Paths on the GPU

Storing partial light Storing partial light pathspaths Finite element representationFinite element representation

– Pros: Pros: compact, compact, good for low frequency good for low frequency illuminationillumination

– Cons: Cons: costly to updatecostly to update Sampling + interpolationSampling + interpolation

– Pros: Pros: easier to update, easier to update, good for high frequency good for high frequency

illuminationillumination– Cons: Cons: not as compactnot as compact

Page 7: Light Animation with Precomputed Light Paths on the GPU

Contribution of tContribution of this his paperpaper

Precomputation aided Real-time Precomputation aided Real-time global illuminationglobal illumination

Static sceneStatic scene For the sake of simplicityFor the sake of simplicity:: diffuse diffuse

scenescene Dynamic camera and lightsDynamic camera and lights Light paths are stored using Light paths are stored using

samplingsampling

Page 8: Light Animation with Precomputed Light Paths on the GPU

New methodNew method

Preprocessing:Preprocessing:– Exit point selectionExit point selection– Random entry point selectionRandom entry point selection– Computation of light transfer capabilities Computation of light transfer capabilities

between entry and exit pointsbetween entry and exit points– Storing the results in Storing the results in Precomputed Radiance Precomputed Radiance

MapsMaps Real-time renderingReal-time rendering

– Modulation of the Modulation of the Precomputed Radiance MapsPrecomputed Radiance Maps with the actual lightingwith the actual lighting

Page 9: Light Animation with Precomputed Light Paths on the GPU

Preprocessing: Exit Preprocessing: Exit pointspoints

1. Vertices2. Correspond to texel centers

Page 10: Light Animation with Precomputed Light Paths on the GPU

Preprocessing: Entry Preprocessing: Entry pointspoints

Random sampling

Page 11: Light Animation with Precomputed Light Paths on the GPU

Preprocessing: Preprocessing: Transfer from entry to Transfer from entry to exit pointsexit points

entry pointwith unit irradiance

Page 12: Light Animation with Precomputed Light Paths on the GPU

Preprocessing: Preprocessing: Reference point Reference point illuminationillumination

Virtuallights

unit irrad

Page 13: Light Animation with Precomputed Light Paths on the GPU

Precomputed Radiance Precomputed Radiance Map Item: (entry, exit, Map Item: (entry, exit, irrad)irrad)

unit irrad

transfer

irrad

Page 14: Light Animation with Precomputed Light Paths on the GPU

PRM: 4D arrayPRM: 4D array

r, g, b

Exit point Texcoord: (u,v)

Entry point:

PRM item

Page 15: Light Animation with Precomputed Light Paths on the GPU

Real-time Rendering:Real-time Rendering:Entry point visibilityEntry point visibility

Page 16: Light Animation with Precomputed Light Paths on the GPU

Rendering:Rendering:PRM weightingPRM weighting

Page 17: Light Animation with Precomputed Light Paths on the GPU

ImplementationImplementation

Entry point sampling andPhoton tracing

Exit point illuminationcomputation

PRMs in textures

Shadow mapping:Direct illum +

Entry point visibility

Camera rendering:Direct illum +PRM weighting

Image

CPU GPU

Preprocessing

Real-time rendering

Page 18: Light Animation with Precomputed Light Paths on the GPU

Tile in a single or few textures

PRMs in textures: PRMs in textures: TilingTiling

r, g, b

Exit point

u

v

Pane of Entry point 1

r, g, b

Exit point

u

v

Pane ofEntry point 2

Etc.

Page 19: Light Animation with Precomputed Light Paths on the GPU

Entry point clusteringEntry 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 havesimilar normals

Page 20: Light Animation with Precomputed Light Paths on the GPU

Resulting clusterResulting cluster

r, g, b

Exit point

v

Pane of Entry point Cluster 1

u

Page 21: Light Animation with Precomputed Light Paths on the GPU

ResultsResults

4096 entry points

256 – 32 clusters: 128 – 4Mb texture memory

Preproc: 5 minutesRendering: 40 FPS

Page 22: Light Animation with Precomputed Light Paths on the GPU

Results: Room with Results: Room with stairsstairs

16K entries32 clusters4Mb per obj

50 FPS

Page 23: Light Animation with Precomputed Light Paths on the GPU

ConclusionsConclusions

Precomputation aided real-time Precomputation aided real-time light animation on the GPUlight animation on the GPU

Computes indirect illuminationComputes indirect illumination Allows dynamicAllows dynamic lights and cameralights and camera Effective for point lightsEffective for point lights