Spatial Directional Radiance Caching Václav Gassenbauer Czech Technical University in Prague...

Post on 01-Apr-2015

218 views 5 download

Tags:

Transcript of Spatial Directional Radiance Caching Václav Gassenbauer Czech Technical University in Prague...

1

Spatial Directional Radiance Caching

Václav GassenbauerCzech Technical University in Prague

Jaroslav KřivánekCornell University

Kadi BouatouchIRISA / INRIA Rennes

2

GoalAcceleration of Global Illumination

Computation on Glossy Surfaces

Adapt glossiness of surfaces

3

Previous Work

Irradiance caching (IC) ◦ [Ward et al. 88], [Ward and Heckbert 92]

◦ Indirect illumination changes slowly → interpolate

Variants of IC◦ [Tabellion and Lamorlette 04], [Brouillat et

al. 08], [Arikan et al. 05], …

Radiance caching (SHRC) ◦ [Křivánek et al. 05]

Other techniques ◦ [Hinkenjann and Roth 07, …]

4

Motivation

Radiance caching limitation◦Uniform sampling of full hemisphere

◦Low glossy surfaces

◦Conversion of the scene BRDFs into the frequency domain in preprocess

5

SDRC – Overview

Caching schemeCache structureNew record computationSpatial / Directional InterpolationOutgoing radiance computation

6

Spatial Cache Lookup

SpatialCacheMiss!

BRDFImportanceSampling

Spatial Directional Caching Scheme

SpatialCache

p2

iL

p1

Project Sample onto Unit Square

Store incache

iLiL

N

i

oL1

/pdfoL

Spatial Cache Lookup

iL

SpatialCache

Hit!

DirectionalCache HIT!

DirectionalCache MISS!

Directional

CacheUpdate

M

i

oL1

/pdfoL

Directional Cache

7

Structure of the Two Caches

kD-tree(directional cache)

Octree (spati

al cache)

SpatialCache

iL

iL

iL

8

New Record Computation

Generate N samples using BRDF importance sampling

pCompute incoming radiance using ray casting and photon mapTransform samples onto 2D domain

Build a k-D tree upon the samples

L-tree

9

Spatial Interpolation

p

Collect L-trees that can be used for interpolation at p (borrowed from RC)

For all L-trees found compute the spatial weight

1

1

i

i

isi Rw nn

ppp

Spatial

Cache

Spatial Cache Lookup

p1

p2p

SpatialCache

Hit!L-tree(p2)

p2

L-tree(p1)p1

10

Directional Interpolation

p2

p

L-tree(p2)

Generate M(M<<N) samples using BRDF importance sampling

For all the samples try find nearby radiance samples in L-tree(p2) in S(p)

Transform samples onto unit domain

Update L-tree(p2) if necessary

Radiance sample found

Radiance not sample found→ ray tracing

L-tree(p2)

11

Which Radiance Samples Are Nearby?

i-th L-tree

dr

2d

2

1,0maxr

wjik

jdik

inin

in

Compute search radius for each radiance sample

Collect nearby radiance samples

Compute directional weights

dr inj

inik

inik

12

Incoming Radiance Interpolation

Interpolate all collected radiance sample◦Sums run over all radiance samples from all

contributing L-trees.

Product of spatial and directional

weights

k-th radiance sample stored in

the i-th L-tree

Interpolated

incoming radiance

Si Tkj

dik

si

Si Tkikj

dik

si

j

i

i

ww

Lww

Lin

inin

inin

p

p

p

,~

Outgoing Radiance Computation

Evaluate Monte Carlo Estimator

interpolated incoming radiance

# render

samples

Sampling probability ofoutin j

Estimated outgoing radiance

13

M

j j

jjj BRDFL

ML

1 ,pdf

cos,,~

1,

~outin

inoutinininoutout p

p

Results

SHRC vs. SDRC◦SHRC = Spherical harmonics caching

◦SDRC = new Spatial-Directional caching

MC vs. SHRC vs. SDRC vs. REF◦MC = Monte Carlo importance sampling

◦REF = reference solution

SDRC scalabilityAnimation

14

15

SHRC vs. SDRC

SDRC adapts to the BRDF lobe exponent automatically

16

MC vs. SHRC vs. SDRC vs. REF

SDRC produce less noise than MC SDRC produce no ringing artifacts as SHRC.

MC SDRC (new)

SHRC REF

17

SDRC scalability

N=64 / t≈6.2s

N=128 / t≈13.0s N=256 / t≈23.6s

SD

RC

MC

Rendering time is O(N).

indirect lighting compu-tation time of

the detail

18

AnimationWithout reusing cache

record

With reusing cache record- Flickering reduced

Side-by-side comparison

19

Discussion

Interpolation◦MC performs better than SDRC for highly

glossy materialsSupported materials

◦Spatially varying ones without sudden changes

◦Availability of sampling procedureMemory consumption

◦≈ higher memory requirements than SHRC (N = 512 and SH order of 10)

20

Conclusion

Indirect lighting computation on glossy surfaces

PROS:+Exploits spatial / directional coherence+No blurry / banding artifacts+Adapts automatically to the glossiness+Less noisy than MC

CONS−Higher memory requirements−Potentially difficult parallelization

21

Future Work

Precise formalization of illumination coherence

Decrease flickering in animation

22

Acknowledgements

Chess pieces courtesy of T. Hachisuka

Ray tracing system - PBRT

Thank you for your attention

23

Cache Record Density Control