Radiance Caching for Efficient Global Illumination Computation

Download Report

Transcript Radiance Caching for Efficient Global Illumination Computation

3rd International Radiance Workshop
11 - 12 October 2004, Fribourg, Switzerland
Radiance Caching for Efficient
Global Illumination Computation
J. Křivánek P. Gautron
S. Pattanaik K. Bouatouch
Radiance Workshop 2004 – Fribourg, Switzerland
1
High Quality GI
The Day After Tomorrow, © 2004 20th Century Fox
Shrek 2, © 2004 PDI/DreamWorks
Radiance Workshop 2004 – Fribourg, Switzerland
2
Global Illumination… How?
∫
Lo(P, ωo) = Li(P, ωi) * BRDF(ωo, ωi) *cos(θ)dωi
Radiance Workshop 2004 – Fribourg, Switzerland
3
Monte Carlo
∫
Lo(P, ωo) = Li(P, ωi) * BRDF(ωo, ωi) *cos(θ)dωi
No analytical solution
Shooting
Gathering
Radiance Workshop 2004 – Fribourg, Switzerland
4
Shooting
Radiance Workshop 2004 – Fribourg, Switzerland
5
Shooting
Radiance Workshop 2004 – Fribourg, Switzerland
6
Shooting
Final gathering: costly
Photon map only for indirect diffuse
Distribution ray tracing for non diffuse: noisy
Radiance Workshop 2004 – Fribourg, Switzerland
7
Gathering
Radiance Workshop 2004 – Fribourg, Switzerland
8
Gathering
Support for glossy GI
Random sampling: noisy
High quality: many rays
Radiance Workshop 2004 – Fribourg, Switzerland
9
Irradiance Caching
Sparse computation of indirect diffuse lighting


Radiance Workshop 2004 – Fribourg, Switzerland 10
Irradiance Caching
Sparse computation of indirect diffuse lighting
Radiance Workshop 2004 – Fribourg, Switzerland 11
Irradiance Caching
Sparse computation of indirect diffuse lighting
Interpolation

Radiance Workshop 2004 – Fribourg, Switzerland 12
Gradients
Why?
Without gradients
With gradients
Images from "Irradiance Gradients", Gregory J. Ward, Paul S. Heckbert
Eurographics Workshop on Rendering 1992
Radiance Workshop 2004 – Fribourg, Switzerland 13
Gradients
n
ni
E = Ei
+…
Radiance Workshop 2004 – Fribourg, Switzerland 14
Rotational gradient
n
ni
n
ni
E = Ei
θ
+…
(ni x n)
r Ei
Radiance Workshop 2004 – Fribourg, Switzerland 15
Translational gradient
n
ni
D
E = Ei
+ (ni x n)
r Ei
+D
t
Ei
Radiance Workshop 2004 – Fribourg, Switzerland 16
Non diffuse surfaces
Irradiance values: indirect diffuse
Indirect glossy: distribution ray tracing
High quality: many rays
Radiance Workshop 2004 – Fribourg, Switzerland 17
Contributions
Extension to indirect glossy lighting
BDRF-based selection of record points
Low frequency: records
High frequency: distribution ray tracing
Novel translational gradient
Radiance Workshop 2004 – Fribourg, Switzerland 18
Outline
Introduction
IC for glossy surfaces
Hemispherical data representation
Radiance gradients
Outgoing radiance computation
Results
Conclusion
Radiance Workshop 2004 – Fribourg, Switzerland 19
Outline
Introduction
IC for glossy surfaces
Hemispherical data representation
Radiance gradients
Outgoing radiance computation
Results
Conclusion
Radiance Workshop 2004 – Fribourg, Switzerland 20
Caching on glossy surfaces
Need hemispherical data representation
Radiance Workshop 2004 – Fribourg, Switzerland 21
Caching on glossy surfaces
n
ni
?
Need new gradients
Radiance Workshop 2004 – Fribourg, Switzerland 22
Outline
Introduction
IC for glossy surfaces
Hemispherical data representation
Radiance gradients
Outgoing radiance computation
Results
Conclusion
Radiance Workshop 2004 – Fribourg, Switzerland 23
Hemispherical Functions

Original Function
Piecewise linear approximation
Need a more compact and smooth
representation
Better fitting
Fast computation of integrals
Radiance Workshop 2004 – Fribourg, Switzerland 24
Orthogonal Polynomials
f(x) = fi bi(x)
g(x) = gi bi(x)
fi =
 f(x)b (x)dx
i
 f(x)g(x)dx =
fi
gi
Radiance Workshop 2004 – Fribourg, Switzerland 25
Application to GI
Incident Radiance
BRDF
 dot product
Radiance Workshop 2004 – Fribourg, Switzerland 26
Spherical Harmonics
(0,0)
(1,-1)
(2,-2)
(1,0)
(2,-1)
(2,0)
(1,1)
(2,1)
(2,2)
Radiance Workshop 2004 – Fribourg, Switzerland 27
Hemispherical Harmonics
A Novel Hemispherical Basis for Accurate and Efficient Rendering
P. Gautron, J. Křivànek, S. Pattanaik, K. Bouatouch, EGSR 04
(0,0)
(1,-1)
(2,-2)
(1,0)
(2,-1)
(2,0)
(1,1)
(2,1)
(2,2)
Radiance Workshop 2004 – Fribourg, Switzerland 28
Why (Hemi)Spherical harmonics?
Ease of use
Rotation support
Radiance Workshop 2004 – Fribourg, Switzerland 29
Representation Limitations
Bandlimited: "ringing" artifacts
Limit to low-frequency BRDFs
Radiance Workshop 2004 – Fribourg, Switzerland 30
Adaptive BRDF Representation
Why?
Low frequency
"(H)SH-Friendly"
High frequency
Ward BRDF with same parameters
Radiance Workshop 2004 – Fribourg, Switzerland 31
Adaptive BRDF Representation
How?
BRDF = 4D Function
Parabolic Parameterization
Radiance Workshop 2004 – Fribourg, Switzerland 32
Incoming Radiance
λlm (P) =
∫
Li(P, ωi)Blm(ωi) d ωi
Same principle as Irradiance Caching
Radiance Workshop 2004 – Fribourg, Switzerland 33
Incoming Radiance
λlm (P) =
∫
Li(P, ωi)Blm(ωi) d ωi
(H)SH
Same principle as Irradiance Caching
Radiance Workshop 2004 – Fribourg, Switzerland 34
Outline
Introduction
IC for glossy surfaces
Hemispherical data representation
Radiance gradients
Outgoing radiance computation
Results
Conclusion
Radiance Workshop 2004 – Fribourg, Switzerland 35
Radiance Gradients
n
ni
Radiance Workshop 2004 – Fribourg, Switzerland 36
Rotational gradient
n
ni
n
ni
θ
=R
Rotation Matrix
Radiance Workshop 2004 – Fribourg, Switzerland 37
Translational gradient
Goal
n
ni
D
∂
∂
,
,0
=
∂x
∂y
(H)SH
(H)SH
(H)SH
Radiance Workshop 2004 – Fribourg, Switzerland 38
Translational Gradient
Numerical Method
p
Radiance Workshop 2004 – Fribourg, Switzerland 39
Translational Gradient
Numerical Method
p
Δx
p'
Radiance Workshop 2004 – Fribourg, Switzerland 40
Translational Gradient
Numerical Method
λ'lm - λlm
∂ λlm
=
Δx
∂x
N
λlm =
m
m( θ , Φ )
Ω
θ
,
Φ
*L
(
)*B
*Li(
Σ k i k k ll k k
λ'lm =
m( θ' , Φ' )
m
Ω'
θ
,
Φ
*Li(
)*B
*L
(
Σ k i k k ll k k
k=1
N
p
Δx
p'
k=1
Radiance Workshop 2004 – Fribourg, Switzerland 41
Translational Gradient
Analytical Method
N
λlm =
m( θ , Φ )
Ω
θ
,
Φ
*L
(
)*B
Σ ki k k l k k
k=1
∂
= ∂x
,
∂
∂y
, 0
N
∂ λlm = Σ Li (θk, Φk)* ∂ Ωk B m(θ , Φ )
k
k
l
k=1
∂
x
∂x
∂ Blm(θk, Φk)
+Ωk
∂x
Radiance Workshop 2004 – Fribourg, Switzerland 42
Outline
Introduction
IC for glossy surfaces
Hemispherical data representation
Radiance gradients
Outgoing radiance computation
Results
Conclusion
Radiance Workshop 2004 – Fribourg, Switzerland 43
Outgoing Radiance
n
ni
= Ri
∂
∂
d
+ dx
+ y
∂x
∂y
Radiance Workshop 2004 – Fribourg, Switzerland 44
Outgoing Radiance
n
ni
Λ(P) =
Σ
i S
∂ Λi d ∂ Λi
Λ
d
wi(P)
Ri i + x
+ y
∂x
∂y
Σ
wi(P)
i S
Radiance Workshop 2004 – Fribourg, Switzerland 45
Outgoing Radiance
Incident Radiance
BRDF
 dot product
Radiance Workshop 2004 – Fribourg, Switzerland 46
Outline
Introduction
IC for glossy surfaces
Hemispherical data representation
Radiance gradients
Outgoing radiance computation
Results
Conclusion
Radiance Workshop 2004 – Fribourg, Switzerland 47
Stills comparison
Monte Carlo Path Tracing
Radiance Caching
Rendering time: 155s
P4 2.2GHz, 512MB RAM
Radiance Workshop 2004 – Fribourg, Switzerland 48
Stills comparison
Monte Carlo
Path Tracing
Radiance
Caching
Radiance Workshop 2004 – Fribourg, Switzerland 49
Video: Cornell Box
Radiance Workshop 2004 – Fribourg, Switzerland 50
Video: Flamingo
Radiance Workshop 2004 – Fribourg, Switzerland 51
Outline
Introduction
IC for glossy surfaces
Hemispherical data representation
Radiance gradients
Outgoing radiance computation
Results
Conclusion
Radiance Workshop 2004 – Fribourg, Switzerland 52
Conclusion
Extension of irradiance caching to radiance caching
Quality improvement
Efficiency improvement
Definition of new translational gradient
Independent from distribution
Independent from basis functions
Radiance Workshop 2004 – Fribourg, Switzerland 53
Future Work
"All-frequency" hemispherical representation
Hardware support
Radiance Workshop 2004 – Fribourg, Switzerland 54
Any Questions ?
Rendered using Radiance Caching
Radiance Workshop 2004 – Fribourg, Switzerland 55