real%time)volumetric)shadows) using)1d)min%max)mipmaps) › ~wjarosz › publications › ... ·...
Post on 30-Jun-2020
0 Views
Preview:
TRANSCRIPT
Real-‐Time Volumetric Shadows using 1D Min-‐Max Mipmaps
Frédo Durand
1
Jiawen “Kevin” Chen
Wojciech Jarosz
Ilya Baran
MIT CSAIL Disney Research Zürich
Volumetric scaNering with shadows
Photo by Frédo Durand 2
Alan Wake by Remedy Entertainment 3
4
6
Related work
• AnalyWcal scaNering models [Sun et al. 2005], [Pegoraro et al. 2009, 2010] – Sky lighWng, bloom near light sources, aNenuaWon
– Doesn’t account for visibility
Sun et al. [2005]
8 Pegoraro et al. [2010]
Related work
• Max [1986] – AnalyWcal integraWon
• Wyman and Ramsey [2008] – Ray marching along intervals
• Engelhardt and Dachsbacher [2010] – Detect disconWnuiWes, subsample and interpolate
9
Related work
• Billeter et al. [2010] – Interpret shadow map as a height field
– Rasterize height field and analyWcally accumulate scaNering integral
– Vertex and fragment overhead
• We ray trace instead
10
Incremental integraWon [Baran et al. 2010]
• Epipolar recWficaWon
• SVD approximaWon for smooth, non-‐analyWc integrands
• ParWal sum trees
11
~
Overview
• Review of epipolar geometry and visibility integraWon
• Min-‐max mipmap data structure
• Results and discussion
Epipolar recWficaWon
Light direc
Won
Epipolar slices
Eye
13
Epipolar recWficaWon
14
r
d
15
16
17
8
5
2
Brute force complexity: O(rd)
18
Visibility integraWon revisited
View ray: y = 5, x = 9
Height field intersecWon
View ray: y = 5, x = 9
1D Min-‐Max Mipmap • Binary tree of shadow map depths – Each node stores min and max of children
20
2 9
1 3
6 9
7 9
1 9
6 9
1 9
9 2 1 3 9 6 7 9
21
Mipmap traversal
View ray: y = 5, x = 9
Mipmap traversal
22
• View ray: y = 5, x = 9 1 9
1 9
6 9
2 9
1 3
6 9
7 9
9 2 1 3 9 6 7 9
Sum = 0
Mipmap traversal
23
• View ray: y = 5, x = 9 y: 1 ≤ 5 < 9
1 9
1 9
6 9
2 9
1 3
6 9
7 9
9 2 1 3 9 6 7 9
Sum = 0
Mipmap traversal
24
• View ray: y = 5, x = 9
y: 1 ≤ 5 < 9
1 9
1 9
6 9
2 9
1 3
6 9
7 9
9 2 1 3 9 6 7 9
Sum = 0
Mipmap traversal
25
• View ray: y = 5, x = 9
y: 2 ≤ 5 < 9
1 9
1 9
6 9
2 9
1 3
6 9
7 9
9 2 1 3 9 6 7 9
Sum = 0
Mipmap traversal
26
• View ray: y = 5, x = 9
y: 5 < 9, lit
1 9
1 9
6 9
2 9
1 3
6 9
7 9
9 2 1 3 9 6 7 9
Sum = 1
Mipmap traversal
27
• View ray: y = 5, x = 9
y: 5 > 2, shadowed
1 9
1 9
6 9
2 9
1 3
6 9
7 9
9 2 1 3 9 6 7 9
Sum = 1
Mipmap traversal
28
• View ray: y = 5, x = 9
y: 5 > 3, shadowed
1 9
1 9
6 9
2 9
1 3
6 9
7 9
9 2 1 3 9 6 7 9
Sum = 1
Mipmap traversal
29
• View ray: y = 5, x = 9
y: 5 < 6, lit
1 9
1 9
6 9
2 9
1 3
6 9
7 9
9 2 1 3 9 6 7 9
Sum = 5
30
Textured lights and aNenuaWon
1
0.9
0.8
0.6
0.5
0.4
0.3
Light aNenuaWon
0.3
Light texture 0.8 0.1 0.5 0.3 0.2 1 0.8 0.4
Textured lights using prefix sums
31
1 9
1 9
6 9
2 9
1 3
6 9
7 9
9 2 1 3 9 6 7 9
0.8 0.1 0.5 0.3 0.2 1 0.8 Light texture 0.4
6 9
Range: [4,8)
0.8 0.9 1.4 1.7 1.9 2.9 3.7 Light CDF 4.1 0
SVD approximaWon
~
A U SVT
=
+
+
+
32
Min-‐Max Mipmap vs. ParWal Sum Tree [Baran et al. 2010]
33
2 9
1 3
6 9
7 9
1 9
6 9
1 9
9 2 1 3 9 6 7 9
2 0 1 1
2 2
4
1 1 0 0 1 0 1 0
• StaWc • Stores shadow map structure
• Dynamic • Stores interval sums computed so far
Equal Wme comparison: Sibenik
34
Our method at 11 ms Ray marching at 11 ms
Screen resoluWon: 1280 x 960 Shadow map resoluWon: 4096 x 4096 NVIDIA GeForce 480 GTX
Performance comparison (lower is beNer) DirecWonal light, 4K shadow map
113
286
43 39
78
31 43
29 11
24 7
0
50
100
150
200
250
300
350
Sibenik Trees Terrain
Run1
me (m
s)
Ray marching
[Engelhardt and Dachsbacher 2010]
[Baran et al. 2010]
Our method
36
Performance vs. Billeter et al. [2010] Spotlight, 4K shadow map
26
93.2
28.1
12.5
38.2
9
0
10
20
30
40
50
60
70
80
90
100
Sibenik Trees Terrain
Run1
me (m
s)
[Billeter et al. 2010]
Our method
37
Discussion • Compared to Billeter et al. [2010] – Do not need explicit height field geometry
– One fragment per pixel – No processing for occluded light-‐shadow transiWons
• Compared to Baran et al. [2010] – StaWc data structure – Parallel queries – Pixel shaders only
38 38 38
1 9
1 9
2 9
9 2
1 3
1 3
6 9
6 9
9 6
7 9
7 9
Conclusions and future work
• Volumetric shadows pracWcal for games
• GPU algorithm design tradeoffs
• Inhomogeneous media
39 Photo by Flickr user visualparadox
top related