A Novel Hemispherical Basis for Accurate and Efficient Rendering

Radiance Cache Splatting:
A GPU-Friendly Global
Illumination Algorithm
P. Gautron J. Křivánek
K. Bouatouch S. Pattanaik
Global Illumination
Why?
Direct
Indirect
Global Illumination
EGSR 2005 – Konstanz, Germany
2
Global Illumination
How?
∫
Lo(P, ωo) = Li(P, ωi) * BRDF(ωo, ωi) *cos(θ)dωi
EGSR 2005 – Konstanz, Germany
3
Global Illumination
How?
∫
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
-…
EGSR 2005 – Konstanz, Germany
4
GPUs
Speed
GPU
Speed
Time
EGSR 2005 – Konstanz, Germany
5
GPUs
Versatility
Linear algebra
Fluid dynamics
Signal processing
Databases
…
Simple 3D
graphics only
And graphics!
Time
EGSR 2005 – Konstanz, Germany
6
Global Illumination & GPUs
CPU
GPU
EGSR 2005 – Konstanz, Germany
7
Global Illumination & GPUs
Previous work
Hemicube
Cohen et al. 1985
Photon mapping on GPU
Purcell et al. 2003
PRT
Sloan et al. 2002
EGSR 2005 – Konstanz, Germany
8
Contributions
A reformulation of (Ir)Radiance caching …
- No complex data structure
- Fast, image-space (ir)radiance interpolation
- Fast approximation of hemisphere sampling
… for fast and easy GPU implementation
EGSR 2005 – Konstanz, Germany
9
Outline
Introduction
Irradiance & Radiance Caching
Our method: Radiance Cache Splatting
Results
Conclusion & Future Work
EGSR 2005 – Konstanz, Germany
10
Outline
Introduction
Irradiance & Radiance Caching
Our method: Radiance Cache Splatting
Results
Conclusion & Future Work
EGSR 2005 – Konstanz, Germany
11
Irradiance Caching
Sparse computation of indirect diffuse lighting


EGSR 2005 – Konstanz, Germany
12
Irradiance Caching
Sparse computation of indirect diffuse lighting
EGSR 2005 – Konstanz, Germany
13
Irradiance Caching
Sparse computation of indirect diffuse lighting
Interpolation

EGSR 2005 – Konstanz, Germany
14
Interpolation
n
nk
E
E(P) = Ek+ (nk x n)
r
Ek+ D
t
Ek
EGSR 2005 – Konstanz, Germany
15
Interpolation
n2
n n3 n4
n1
E
E(P) =
Σ
k S
Ek+ (nk x n)
r
Ek+ D
t
Ek
wk(P)
Σ
wk(P)
k S
S = { k / wk(P) > 1/a }
EGSR 2005 – Konstanz, Germany
16
Radiance Caching
Extension of irradiance caching to glossy interreflections
Cache directional distribution of light
EGSR 2005 – Konstanz, Germany
17
Radiance Caching
Extension of irradiance caching to glossy interreflections
Cache directional distribution of light
Hemispherical Harmonics
EGSR 2005 – Konstanz, Germany
18
Radiance Caching
HSH
Incident Radiance

HSH
BRDF
L1
L2
f1
f2
Ln
fn
EGSR 2005 – Konstanz, Germany
19
Implementation
Cache Record Computation
Ray tracing


EGSR 2005 – Konstanz, Germany
20
Implementation
Cache storage
4
6
1
10
8
2
11
3
3
13
2
4
5
6
7
12
8
9
5
1
9
10
11
12
13
7
EGSR 2005 – Konstanz, Germany
21
Outline
Introduction
Irradiance & Radiance Caching
Our method: Radiance Cache Splatting
Results
Conclusion & Future Work
EGSR 2005 – Konstanz, Germany
22
(Ir)Radiance Caching vs GPU
(Ir)Radiance
Caching
GPU
Ray tracing
Rasterization
Cache stored in tree
Spatial queries
?
1/2/3D textures
Texture lookups
EGSR 2005 – Konstanz, Germany
23
Reformulation
(Ir)Radiance
Caching
Octree
Ray tracing
Our
method
(Ir)Radiance
Caching
Native GPU
features
EGSR 2005 – Konstanz, Germany
24
Outline
Introduction
Irradiance & Radiance Caching
Our method: Radiance Cache Splatting
From octree to splatting
From ray tracing to rasterization
Overall algorithm
Results
Conclusion & Future Work
EGSR 2005 – Konstanz, Germany
25
Outline
Introduction
Irradiance & Radiance Caching
Our method: Radiance Cache Splatting
From octree to splatting
From ray tracing to rasterization
Overall algorithm
Results
Conclusion & Future Work
EGSR 2005 – Konstanz, Germany
26
From Octree to Splatting
n2
n n3 n4
Irradiance Interpolation
n1
E
E(P) =
Σ
k S
Ek+ (nk x n)
r
Ek+ D
t
Ek
wk(P)
Σ
wk(P)
k S
S = { k / wk(P) > 1/a }
EGSR 2005 – Konstanz, Germany
27
From Octree to Splatting
Irradiance Caching Weighting Function
n
nk
Pk
P
1
wk(P) =
Distance
||P-Pk||
+
Rk
1-n.nk
Normals divergence
EGSR 2005 – Konstanz, Germany
28
From Octree to Splatting
Simplified Weighting Function
nk
n
Pk P
1
wk(P) =
Distance
||P-Pk||
+
Rk
1-n.nk
Normals divergence
EGSR 2005 – Konstanz, Germany
29
From Octree to Splatting
Simplified Weighting Function
nk
n
Pk P
~
w (P) =
k
Distance
Distance
1
1
||P-P
||P-Pkk||||
+
R
Rkk
1-n.nk
Normals divergence
EGSR 2005 – Konstanz, Germany
30
From Octree to Splatting
Simplified Weighting Function
n
nk
Pk
P
aRk
~
w (P) =
k
Rk
||P-Pk||
> 1/a
EGSR 2005 – Konstanz, Germany
31
From Octree to Splatting
Principle
~
w (P) =
k
Rk
||P-Pk||
> 1/a
EGSR 2005 – Konstanz, Germany
32
From Octree to Splatting
Principle
EGSR 2005 – Konstanz, Germany
33
From Octree to Splatting
Principle
wk(P)>1/a ?
EGSR 2005 – Konstanz, Germany
34
From Octree to Splatting
Principle
wk(P)E(P)
wk(P)
EGSR 2005 – Konstanz, Germany
35
From Octree to Splatting
Principle
EGSR 2005 – Konstanz, Germany
36
From Octree to Splatting
Principle
Σw (P)E(P)
k
k
Σ w (P)
k
k
EGSR 2005 – Konstanz, Germany
37
From Octree to Splatting
Final Image Generation
Σw (P)E(P)
k
k
Σ w (P)
k
k
EGSR 2005 – Konstanz, Germany
38
From Octree to Splatting
Example
EGSR 2005 – Konstanz, Germany
39
Outline
Introduction
Irradiance & Radiance Caching
Our method: Radiance Cache Splatting
From octree to splatting
From ray tracing to rasterization
Overall algorithm
Results
Conclusion & Future Work
EGSR 2005 – Konstanz, Germany
40
From Ray Tracing to Rasterization
CPU

EGSR 2005 – Konstanz, Germany
41
From Ray Tracing to Rasterization
Simple plane sampling
GPU
Vertex Fragment
Shader Shader

EGSR 2005 – Konstanz, Germany
42
From Ray Tracing to Rasterization
Simple plane sampling
GPU
Vertex Fragment
Shader Shader

EGSR 2005 – Konstanz, Germany
43
From Ray Tracing to Rasterization
Simple plane sampling
GPU
Vertex Fragment
Shader Shader
EGSR 2005 – Konstanz, Germany
44
From Ray Tracing to Rasterization
Simple plane sampling
GPU
Vertex Fragment
Shader Shader
Incoming radiance loss
EGSR 2005 – Konstanz, Germany
45
From Ray Tracing to Rasterization
Our plane sampling
GPU
Vertex Fragment
Shader Shader

EGSR 2005 – Konstanz, Germany
46
From Ray Tracing to Rasterization
Our plane sampling
GPU
Vertex Fragment
Shader Shader
Compensation of incoming radiance loss
EGSR 2005 – Konstanz, Germany
47
Our plane sampling
Summary
3x more accurate than simple plane sampling
Plausible directional information
Easy implementation on GPU
EGSR 2005 – Konstanz, Germany
48
Outline
Introduction
Irradiance & Radiance Caching
Our method: Radiance Cache Splatting
From octree to splatting
From ray tracing to rasterization
Overall algorithm
Results
Conclusion & Future Work
EGSR 2005 – Konstanz, Germany
49
Algorithm
Step 1 : information generation
GPU
Vertex Fragment
Shader Shader
EGSR 2005 – Konstanz, Germany
50
Algorithm
Step 2 : detection
CPU
?
EGSR 2005 – Konstanz, Germany
51
Algorithm
Step 2 : detection
CPU
GPU
Hemisphere sampling
EGSR 2005 – Konstanz, Germany
52
Algorithm
Step 2 : detection
CPU
GPU
Hemisphere sampling
?
EGSR 2005 – Konstanz, Germany
53
Algorithm
Step 2 : detection
CPU
?
EGSR 2005 – Konstanz, Germany
54
Algorithm
Step 2 : detection
EGSR 2005 – Konstanz, Germany
CPU
55
Algorithm
Step 3 : display
GPU
Vertex Fragment
Shader Shader
Matrices
Vertex
Shader
Record information
EGSR 2005 – Konstanz, Germany
56
Algorithm
Step 3 : display
GPU
Vertex Fragment
Shader Shader
Fragment
Shader
Record information
EGSR 2005 – Konstanz, Germany
57
Algorithm
Step 3 : display
GPU
Vertex Fragment
Shader Shader
Fragment
Shader
EGSR 2005 – Konstanz, Germany
58
Algorithm
Summary
No spatial data structure
Spatial queries replaced by splatting
Interpolation by blending
No quality loss compared to (Ir)Radiance Caching
No order constraint for image traversal
Can be implemented using native GPU features
EGSR 2005 – Konstanz, Germany
59
Our renderer
Record computation
1-bounce GI: shadow maps & plane sampling
Indirect lighting
Radiance cache splatting
Direct lighting
GPU per-pixel lighting & shadow maps
CPU ray tracing
EGSR 2005 – Konstanz, Germany
60
Outline
Introduction
Irradiance & Radiance Caching
Our method: Radiance Cache Splatting
Results
Conclusion & Future Work
EGSR 2005 – Konstanz, Germany
61
Results
Sibenik Cathedral (80K triangles)
EGSR 2005 – Konstanz, Germany
62
Results
Sponza Atrium (66K triangles)
EGSR 2005 – Konstanz, Germany
63
Results
Comparison with Radiance
Sibenik Cathedral
Sponza Atrium
Radiance
Time
425 s
645 s
Our
Renderer
Time
14,3 s
13,7 s
Speedup
29,7
47,1
EGSR 2005 – Konstanz, Germany
64
Results
From Irradiance to Radiance Caching: Venus (24K triangles)
EGSR 2005 – Konstanz, Germany
65
Conclusion
Reformulation of (Ir)Radiance Caching
Speedup: 29x – 47x
Interactive or fast, high quality rendering
EGSR 2005 – Konstanz, Germany
66
Future Work
Multiple bounces
Area light sources
All-Frequency BRDFs
More complex models
Better hemisphere sampling
EGSR 2005 – Konstanz, Germany
67
Any questions?
Radiance Cache Splatting on the web:
http://www.irisa.fr/siames/Pascal.Gautron/
EGSR 2005 – Konstanz, Germany
68