Prefiltered Single Scattering Oliver Klehm MPI Informatik HansPeter

  • Slides: 29
Download presentation
Prefiltered Single Scattering Oliver Klehm, MPI Informatik Hans-Peter Seidel, MPI Informatik Elmar Eisemann, TU

Prefiltered Single Scattering Oliver Klehm, MPI Informatik Hans-Peter Seidel, MPI Informatik Elmar Eisemann, TU Delft

Motivation Photo by Frédo Durand 2

Motivation Photo by Frédo Durand 2

Shadow Map near far 3

Shadow Map near far 3

Assumptions: • Single scattering 4

Assumptions: • Single scattering 4

Shadow Map Assumptions: • Single scattering • Homogeneous medium 5

Shadow Map Assumptions: • Single scattering • Homogeneous medium 5

Shadow Map 6

Shadow Map 6

Shadow Map How to do this efficiently? Naïve: O(w*h * d) w*h pixels, d

Shadow Map How to do this efficiently? Naïve: O(w*h * d) w*h pixels, d integration steps 7

Link to Percentage Closer Filtering Light direction Visibility function V V(d, z. S) 8

Link to Percentage Closer Filtering Light direction Visibility function V V(d, z. S) 8

Shadow Mapping Light direction p z Shadow Map 0 d(x') z(p) Visibility function V(d,

Shadow Mapping Light direction p z Shadow Map 0 d(x') z(p) Visibility function V(d, z) 1 d(x) 0 -1 -1 0 d(x')-z(p) 1 1 x 9

Convolution Shadow Maps Approximate visibility function with truncated Fourier series [Annen et al. 2007]

Convolution Shadow Maps Approximate visibility function with truncated Fourier series [Annen et al. 2007] +a 2 +. . +a 4 +. . +a 8 +. . +a 16 10

Convolution Shadow Maps Filtering V(d, zs ) = ai(d) Bi(zs ) Shadow Map z

Convolution Shadow Maps Filtering V(d, zs ) = ai(d) Bi(zs ) Shadow Map z 0 V(d, zs ) = (1+1+0+0+0) d 11

Convolution Shadow Maps Filtering V(d, zs ) = ai(d) Bi(zs ) Only depends on

Convolution Shadow Maps Filtering V(d, zs ) = ai(d) Bi(zs ) Only depends on depths in SM • Compute Bi(zs) Shadow Map • Filter Bi Filtering without knowledge of shading point! • Compute ai(d) • Fetch filtered Bi , compute ai Bi At shading time d 12

Filtering for camera rays V(d, zs ) = ai(d) Bi(zs ) Shadow Map Bi

Filtering for camera rays V(d, zs ) = ai(d) Bi(zs ) Shadow Map Bi Maps Filter Kernel S=1 N d (constant for entire ray) camera ray 13

Filtering for camera rays V(d, zs ) = ai(d) Bi(zs ) Shadow Map Bi

Filtering for camera rays V(d, zs ) = ai(d) Bi(zs ) Shadow Map Bi Maps camera ray N? camera ray 14

Prefix Sum-like Filtering Bi Map Filtered Bi Map camera ray 15

Prefix Sum-like Filtering Bi Map Filtered Bi Map camera ray 15

Filtering for camera rays V(d, z. S) = ai(d. S) Bi(z. S) Shadow Map

Filtering for camera rays V(d, z. S) = ai(d. S) Bi(z. S) Shadow Map d 2 d 7 d 11 d 16 d 21 16

Rectified Shadow Map Light direction 17

Rectified Shadow Map Light direction 17

Rectified Shadow Map Light direction 18

Rectified Shadow Map Light direction 18

Rectified Shadow Map Light direction 19

Rectified Shadow Map Light direction 19

Rectified Shadow Map Light direction 20

Rectified Shadow Map Light direction 20

Rectified Shadow Map 21

Rectified Shadow Map 21

Wrap up 22

Wrap up 22

Video 23

Video 23

Related Work • Complexity: (w*h pixels, d*a shadow map, allowing for d marching-steps) •

Related Work • 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 1 d min-max mipmaps” • Tree average: O(w*h * log d + a*d) • Tree worst: O(w*h * d + a*d) O(w*h * C + a*d) + C * a*d ) • Ours: (C basis functions) 24

Comparison 25

Comparison 25

Limitations • Light dependent falloff functions • Local light sources • Degenerated cases of

Limitations • Light dependent falloff functions • Local light sources • Degenerated cases of perspective projection • Ringing artifacts (similar to convolution shadow maps) 26

Limitations • Ringing artifacts (similar to convolution shadow maps) 27

Limitations • Ringing artifacts (similar to convolution shadow maps) 27

Nitty Gritty Details (in the paper) • Not average visibility, but medium attenuation? •

Nitty Gritty Details (in the paper) • 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

Conclusions • Volumetric single scattering - constant time per pixel • Purely image-based, no

Conclusions • Volumetric single scattering - constant time per pixel • Purely image-based, no scene dependence • New light projection for rectified shadow map • Fast, high-quality effects 2. 2 ms 30 fps 29