Oliver Klehm, MPI Informatik Hans-Peter Seidel, MPI Informatik Elmar Eisemann, TU Delft
2 Photo by Frédo Durand
3 Shadow Map near far
4 Assumptions: Single scattering
5 Assumptions: Single scattering Homogeneous medium Shadow Map
6
How to do this efficiently? Naïve: O(w*h * d) w*h pixels, d integration steps 7 Shadow Map
Percentage Closer Filtering 8 V(d,z S ) Light direction Visibility function V
9 Light direction Shadow Map x z(p) d(x) 0 1 Visibility function V(d,z) p d(x')-z(p) d(x') z
Approximate visibility function with truncated Fourier series 10 +a a a a 16 [Annen et al. 2007]
11 V(d,z ) = V(d,z ) = a i (d) B i (z ) ss Shadow Map 0 z s ( ) d
12 Compute B i (z s ) Filter B i Compute a i (d) Fetch filtered B i, compute a i B i V(d,z ) = a i (d) B i (z ) ss Shadow Map Only depends on depths in SM Filtering without knowledge of shading point! At shading time d
13 Shadow Map camera ray d (constant for entire ray) S = 1 N B i Maps V(d,z ) = a i (d) B i (z ) ss Filter Kernel
14 Shadow Map camera ray B i Maps V(d,z ) = a i (d) B i (z ) ss camera ray N?
15 camera ray B i Map Filtered B i Map
16 V(d,z S ) = a i (d S ) B i (z S ) Shadow Map d2d2 d7d7 d 11 d 16 d 21
17 Light direction
18 Light direction
19 Light direction
20 Light direction
21
22
23
Complexity: (w*h pixels, d*a shadow map, allowing for d marching-steps) Ray-marching:O(w*h * d) Tree-based structures on rectified shadow map [Baran et al. 2010] “A hierarchical volumetric shadow algorithm for single scattering” [Chen et al. 2011] “Realtime volumetric shadows using 1d min-max mipmaps ” Tree average:O(w*h * log d+ a*d) Tree worst:O(w*h * d+ a*d) Ours: O(w*h * C + C * a*d ) (C basis functions) 24 O(w*h+ a*d)
25
Light dependent falloff functions Local light sources Degenerated cases of perspective projection Ringing artifacts (similar to convolution shadow maps) 26
Ringing artifacts (similar to convolution shadow maps) 27
Not average visibility, but medium attenuation? Add weights to filtering Other visibility linearization methods? Exponential shadow maps Variance shadow maps Exponential variance shadow maps Fast prefix-sum-like filtering? 28
Volumetric single scattering - constant time per pixel Purely image-based, no scene dependence New light projection for rectified shadow map Fast, high-quality effects ms30 fps