1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

65
1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik

Transcript of 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

Page 1: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

1

Temporal Radiance Caching

P. Gautron K. Bouatouch S. Pattanaik

Page 2: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

2

Global IlluminationGlobal Illumination

P

Lo(P, ωo) ∫ Li(P, ωi)= * BRDF(ωo, ωi) *cos(θ)dωi

Page 3: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

3

GI: ComputationGI: Computation

Lo(P, ωo) ∫ Li(P, ωi)= * BRDF(ωo, ωi) *cos(θ)dωi

No analytical solution

Numerical methods

- Radiosity

- Photon mapping- Path tracing- Bidirectional path tracing

- Irradiance & Radiance caching- …

Page 4: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

4

GI: ComputationGI: Computation

Lo(P, ωo) ∫ Li(P, ωi)= * BRDF(ωo, ωi) *cos(θ)dωi

No analytical solution

Numerical methods

- Radiosity

- Photon mapping

- Path tracing

- Bidirectional path tracing

- Irradiance & Radiance caching- …

Page 5: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

5

(Ir)Radiance Caching(Ir)Radiance Caching

R

Spatial weighting function

Ward et al. 88: A Ray Tracing Solution for Diffuse Interreflections

Page 6: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

6

(Ir)Radiance Caching(Ir)Radiance Caching

Spatial gradients

Ward et al. 88: A Ray Tracing Solution for Diffuse Interreflections

Page 7: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

7

(Ir)Radiance Caching(Ir)Radiance CachingWard et al. 88: A Ray Tracing Solution for Diffuse Interreflections

Page 8: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

8

(Ir)Radiance Caching(Ir)Radiance Caching

Record Location GI Solution

Ward et al. 88: A Ray Tracing Solution for Diffuse Interreflections

Page 9: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

9

(I)RC in Dynamic Scenes(I)RC in Dynamic Scenes

Page 10: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

10

(I)RC in Dynamic Scenes(I)RC in Dynamic Scenes

Page 11: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

11

(I)RC in Dynamic Scenes(I)RC in Dynamic Scenes

Page 12: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

12

(I)RC in Dynamic Scenes(I)RC in Dynamic Scenes

Page 13: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

13

ContributionsContributions

Temporal (ir)radiance interpolation scheme

Temporal weighting function

Temporal gradients

Fast estimate of future indirect lighting

Page 14: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

14

OutlineOutline

- Introduction

- Irradiance and Radiance Caching

- Temporal Radiance Caching

- Results

- Conclusion

Page 15: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

15

OutlineOutline

- Introduction

- Irradiance and Radiance Caching

- Temporal Radiance Caching

- Results

- Conclusion

Page 16: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

16

Irradiance Caching: ObservationsIrradiance Caching: Observations

- Indirect lighting is costly

-Indirect lighting changes slowly over a surface

Ward et al. 88: A Ray Tracing Solution for Diffuse Interreflections

Page 17: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

17

Irradiance Caching: PrincipleIrradiance Caching: Principle

Record Location GI Solution

Ward et al. 88: A Ray Tracing Solution for Diffuse Interreflections

Page 18: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

18

IC Records: Zone of InfluenceIC Records: Zone of Influence

Close objects = Small zone Distant objects = Large zone

Page 19: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

19

IC: Spatial Weighting FunctionIC: Spatial Weighting Function

Spatial change of indirect lighting depends on

- Local geometry

- Surrounding geometry

nk

n

PPk

Page 20: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

20

IC: Spatial Weighting FunctionIC: Spatial Weighting Function

nk

n

PPk

Upper bound of the change

change = ||P-Pk||

Rk

+ 1-n.nk

Distance Normals divergence

Mean dist. to the surrounding geometry

Page 21: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

21

IC: Spatial Weighting FunctionIC: Spatial Weighting Function

nk

n

PPk

wk(P) = 1

||P-Pk||

Rk

+ 1-n.nk

Distance Normals divergence

> 1/a

Mean dist. to the surrounding geometry

Page 22: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

22

IC: Spatial GradientsIC: Spatial Gradients

No Gradients With Gradients

Estimate of the spatial change wrt.- Distance - Normals divergence

Page 23: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

23

Radiance CachingRadiance Caching

Extension of irradiance caching to glossy interreflections

Cache directional distribution of light

Hemispherical Harmonics

Krivanek et al. 05: Radiance Caching for Efficient Global Illumination Computation

Page 24: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

24

Radiance CachingRadiance Caching

Same weighting function as IC

Transl. gradient for each coef.

Rot. gradient replaced by rotation

Krivanek et al. 05: Radiance Caching for Efficient Global Illumination Computation

Page 25: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

25

(I)RC in Dynamic Scenes(I)RC in Dynamic Scenes

New cache for each frame

High cost

Flickering

Reuse records across frames

Page 26: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

26

OutlineOutline

- Introduction

- Irradiance and Radiance Caching

- Temporal Radiance Caching

- Results

- Conclusion

- Temporal Weighting Function- Estimate of the Future Incoming Lighting- Temporal Gradients

Page 27: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

27

OutlineOutline

- Introduction

- Irradiance and Radiance Caching

- Temporal Radiance Caching

- Results

- Conclusion

- Temporal Weighting Function- Estimate of the Future Incoming Lighting- Temporal Gradients

Page 28: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

28

Temporal Weighting FunctionTemporal Weighting Function

Estimate the temporal change rate of indirect lighting

Page 29: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

29

Temporal Weighting FunctionTemporal Weighting Function

Estimate the temporal change rate of indirect lighting

Page 30: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

30

Temporal Weighting FunctionTemporal Weighting Function

Estimate the temporal change rate of indirect lighting

≈Et-Et+1

δt

∂E∂t

(t0)

= E0( -1)

= Et+1/Et

Page 31: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

31

Temporal Weighting FunctionTemporal Weighting Function

Inverse of the temporal change rate of indirect lighting

= Et+1/Et

( -1)(t-t0)

1wk

t(t) = > 1/at

Problem : Lifespan is determined when the record is created

Page 32: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

32

Lifespan ThresholdingLifespan Thresholding

P

At point P and time t:

Static environment

= Et+1/Et = 1

wkt(t) = ∞ for all t

Infinite Lifespan

Page 33: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

33

Lifespan ThresholdingLifespan Thresholding

P

At point P and time t:

Static environment

= Et+1/Et = 1

wkt(t) = ∞ for all t

Infinite Lifespan

Page 34: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

34

Lifespan ThresholdingLifespan Thresholding

P

At point P and time t:

Static environment

= Et+1/Et = 1

wkt(t) = ∞ for all t

Infinite LifespanIncorrect

wkt(t) = 0 if t-tk>δtmax

Page 35: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

35

Record ReplacementRecord Replacement

Page 36: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

36

Temporal Weighting FunctionTemporal Weighting Function

Determines the lifespan of the records

Lifespan depends on the local change of incoming radiance

If the environment is static, threshold the lifespan to a maximum value

= Et+1/Et

Requires the knowledge of future irradiance

However

Page 37: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

37

OutlineOutline

- Introduction

- Irradiance and Radiance Caching

- Temporal Radiance Caching

- Results

- Conclusion

- Temporal Weighting Function- Estimate of the Future Incoming Lighting- Temporal Gradients

Page 38: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

38

Future Incoming LightingFuture Incoming Lighting

P P

≈Time t Time t+1

E(P, t) = E(P, t+1) =

Page 39: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

39

Future Incoming LightingFuture Incoming Lighting

Assumption: Animation is predefined

Future transformation matrices are known

Use reprojection to estimate the future incoming lighting

Page 40: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

40

ReprojectionReprojection

k

Et

Et+1

Page 41: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

41

ReprojectionReprojection

t+1t

k

EtOK

Et+1

Hemispheresampling

Page 42: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

42

ReprojectionReprojection

t+1

? ?

EtOK

Et+1

Reprojection

Page 43: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

43

ReprojectionReprojection

EtOK

Et+1

t+1

? ?

Depth culling

Page 44: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

44

ReprojectionReprojection

EtOK

Et+1

Hole filling

t+1

? ?

Page 45: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

45

ReprojectionReprojection

EtOK

Et+1

t+1

OK

Page 46: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

46

Future Incoming LightingFuture Incoming Lighting

Simple reprojection

No additional hemisphere sampling

Easy GPU Implementation

Page 47: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

47

Temporal InterpolationTemporal Interpolation

k

Et =

Page 48: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

48

Temporal InterpolationTemporal Interpolation

k

Et = Recompute Irradiance

Page 49: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

49

Temporal Interpolation: GoalTemporal Interpolation: Goal

k

Et =

Page 50: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

50

OutlineOutline

- Introduction

- Irradiance and Radiance Caching

- Temporal Radiance Caching

- Results

- Conclusion

- Temporal Weighting Function- Estimate of the Future Incoming Lighting- Temporal Gradients

Page 51: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

51

Extrapolated GradientsExtrapolated Gradients

Et computed by hemisphere sampling

Et+1 estimated by reprojection

Δ

textra ≈ Et+1-Et

Δ

t = ∂E / ∂t

Page 52: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

52

Extrapolated GradientsExtrapolated Gradients

k

Etextra = E0 = Computed

E1 = EstimatedEt

actual =

Etactual-Et

extra =

Page 53: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

53

Extrapolated GradientsExtrapolated Gradients

Page 54: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

54

Interpolated Gradients: Pass 1Interpolated Gradients: Pass 1

k

E0 = Computed

Etactual =

Page 55: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

55

Interpolated Gradients: Pass 2Interpolated Gradients: Pass 2

k

Etinter = E0 = Computed

Et = ComputedEt

actual =

Etactual-Et

inter =

Page 56: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

56

Interpolated GradientsInterpolated Gradients

Et computed by hemisphere sampling

Et+n computed by hemisphere sampling

Δ

t = ∂E / ∂t

Δ Et+n-Et

ntinter ≈

Page 57: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

57

Temporal GradientsTemporal Gradients

Extrapolated

1 pass

Possible flickering

Interpolated

2 passes

No flickering

Page 58: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

58

OutlineOutline

- Introduction

- Irradiance and Radiance Caching

- Temporal Radiance Caching

- Results

- Conclusion

Page 59: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

59

Flying KiteFlying Kite

Page 60: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

60

Japanese InteriorJapanese Interior

Page 61: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

61

Japanese InteriorJapanese Interior

Page 62: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

62

SpheresSpheres

Page 63: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

63

ConclusionConclusion

Temporal radiance interpolation scheme

Reuse records across frames

Quality improvement Speedup

Easily integrates within (ir)radiance caching-based renderers

GPU ImplementationWork submitted for publication

Dynamic objects, light sources, viewpoint

Page 64: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

64

Future WorkFuture Work

Avoid the need of maximum lifespan

Propose an interpolation method adapted to fast changes(temporal details are smoothed out by the gradients)

Page 65: 1 Temporal Radiance Caching P. Gautron K. Bouatouch S. Pattanaik.

65

On the web:http://www.irisa.fr/siames/Pascal.Gautron/

ORGoogle ‘pascal gautron’

P. Gautron, K. Bouatouch, S. Pattanaik

Temporal Radiance Caching

Technical Report no. 1796, IRISA, Rennes, France