Light Animation with Precomputed Light Paths on the GPU

Post on 11-Jan-2016

27 views 0 download

Tags:

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

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

GI: light path GI: light path generation generation

imageVirtualworld

Path reusePath reuse

Path precomputationPath precomputationEntry point

Exit point

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:

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

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

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

Preprocessing: Exit Preprocessing: Exit pointspoints

1. Vertices2. Correspond to texel centers

Preprocessing: Entry Preprocessing: Entry pointspoints

Random sampling

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

entry pointwith unit irradiance

Preprocessing: Preprocessing: Reference point Reference point illuminationillumination

Virtuallights

unit irrad

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

unit irrad

transfer

irrad

PRM: 4D arrayPRM: 4D array

r, g, b

Exit point Texcoord: (u,v)

Entry point:

PRM item

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

Rendering:Rendering:PRM weightingPRM weighting

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

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.

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

Resulting clusterResulting cluster

r, g, b

Exit point

v

Pane of Entry point Cluster 1

u

ResultsResults

4096 entry points

256 – 32 clusters: 128 – 4Mb texture memory

Preproc: 5 minutesRendering: 40 FPS

Results: Room with Results: Room with stairsstairs

16K entries32 clusters4Mb per obj

50 FPS

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