Real-Time Volumetric Shadows using 1D Min-Max Mipmaps - - PowerPoint PPT Presentation

real time volumetric shadows using 1d min max mipmaps
SMART_READER_LITE
LIVE PREVIEW

Real-Time Volumetric Shadows using 1D Min-Max Mipmaps - - PowerPoint PPT Presentation

Real-Time Volumetric Shadows using 1D Min-Max Mipmaps Jiawen Kevin Chen Ilya Baran Frdo Durand Wojciech Jarosz MIT CSAIL Disney Research


slide-1
SLIDE 1

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 ¡

slide-2
SLIDE 2

Volumetric ¡scaNering ¡with ¡shadows ¡

Photo ¡by ¡Frédo ¡Durand ¡

2 ¡

slide-3
SLIDE 3

Alan ¡Wake ¡by ¡Remedy ¡Entertainment ¡

3 ¡

slide-4
SLIDE 4

4 ¡

slide-5
SLIDE 5
slide-6
SLIDE 6

6 ¡

slide-7
SLIDE 7
slide-8
SLIDE 8

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] ¡

slide-9
SLIDE 9

Related ¡work ¡

  • Max ¡[1986] ¡

– AnalyWcal ¡integraWon ¡

  • Wyman ¡and ¡Ramsey ¡[2008] ¡

– Ray ¡marching ¡along ¡intervals ¡

  • Engelhardt ¡and ¡Dachsbacher ¡

[2010] ¡

– Detect ¡disconWnuiWes, ¡ subsample ¡and ¡interpolate ¡

9 ¡

slide-10
SLIDE 10

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 ¡

slide-11
SLIDE 11

Incremental ¡integraWon ¡[Baran ¡et ¡al. ¡2010] ¡

  • Epipolar ¡recWficaWon ¡
  • SVD ¡approximaWon ¡for ¡

smooth, ¡non-­‑analyWc ¡ integrands ¡

  • ParWal ¡sum ¡trees ¡

11 ¡

~ ¡

slide-12
SLIDE 12

Overview ¡

  • Review ¡of ¡epipolar ¡geometry ¡

and ¡visibility ¡integraWon ¡ ¡ ¡

  • Min-­‑max ¡mipmap ¡data ¡structure ¡
  • Results ¡and ¡discussion ¡
slide-13
SLIDE 13

Epipolar ¡recWficaWon ¡

L i g h t ¡ d i r e c W

  • n

¡ Epipolar ¡slices ¡ Eye ¡

13 ¡

slide-14
SLIDE 14

Epipolar ¡recWficaWon ¡

14 ¡

slide-15
SLIDE 15

r ¡ d ¡

15 ¡

slide-16
SLIDE 16

16 ¡

slide-17
SLIDE 17

17 ¡

8 ¡ 5 ¡ 2 ¡ Brute ¡force ¡ complexity: ¡O(rd) ¡

slide-18
SLIDE 18

18 ¡

Visibility ¡integraWon ¡revisited ¡

View ¡ray: ¡ y ¡= ¡5, ¡x ¡= ¡9 ¡

slide-19
SLIDE 19

Height ¡field ¡intersecWon ¡

View ¡ray: ¡ y ¡= ¡5, ¡x ¡= ¡9 ¡

slide-20
SLIDE 20

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 ¡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 9

9 2 1 3 9 6 7 9

2 1 1 2 2 4

1 1 1 1

  • StaWc ¡
  • Stores ¡shadow ¡map ¡

structure ¡

  • Dynamic ¡
  • Stores ¡interval ¡sums ¡

computed ¡so ¡far ¡

slide-34
SLIDE 34

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 ¡

slide-35
SLIDE 35

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 ¡ Run1me ¡(ms) ¡ Ray ¡marching ¡ [Engelhardt ¡and ¡ Dachsbacher ¡2010] ¡ [Baran ¡et ¡al. ¡2010] ¡ Our ¡method ¡

slide-36
SLIDE 36

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 ¡ Run1me ¡(ms) ¡ [Billeter ¡et ¡al. ¡2010] ¡ Our ¡method ¡

slide-37
SLIDE 37

37 ¡

slide-38
SLIDE 38

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

slide-39
SLIDE 39

Conclusions ¡and ¡future ¡work ¡

  • Volumetric ¡shadows ¡ ¡

pracWcal ¡for ¡games ¡

  • GPU ¡algorithm ¡design ¡

tradeoffs ¡

  • Inhomogeneous ¡media ¡

39 ¡

Photo ¡by ¡Flickr ¡user ¡visualparadox ¡