kd-trees using the RTSAH Matthias Moulin, Niels Billen and Philip - - PowerPoint PPT Presentation

kd trees using the rtsah
SMART_READER_LITE
LIVE PREVIEW

kd-trees using the RTSAH Matthias Moulin, Niels Billen and Philip - - PowerPoint PPT Presentation

Efficient visibility heuristics for kd-trees using the RTSAH Matthias Moulin, Niels Billen and Philip Dutr Department of Computer Science KU Leuven, Belgium kd-trees Matthias Moulin, Niels Billen and Philip Dutr 2 kd-trees Recursively


slide-1
SLIDE 1

Efficient visibility heuristics for kd-trees using the RTSAH

Matthias Moulin, Niels Billen and Philip Dutré

Department of Computer Science KU Leuven, Belgium

slide-2
SLIDE 2

kd-trees

Matthias Moulin, Niels Billen and Philip Dutré 2

slide-3
SLIDE 3

kd-trees

Matthias Moulin, Niels Billen and Philip Dutré 3

Recursively split 3D space

slide-4
SLIDE 4

kd-trees

Matthias Moulin, Niels Billen and Philip Dutré 4

Recursively split 3D space

slide-5
SLIDE 5

kd-trees

Matthias Moulin, Niels Billen and Philip Dutré 5

Recursively split 3D space

slide-6
SLIDE 6

kd-trees

Matthias Moulin, Niels Billen and Philip Dutré 6

Recursively split 3D space

slide-7
SLIDE 7

kd-trees

Matthias Moulin, Niels Billen and Philip Dutré 7

Trace rays front to back

slide-8
SLIDE 8

kd-trees

Matthias Moulin, Niels Billen and Philip Dutré 8

Trace rays front to back

slide-9
SLIDE 9

kd-trees

Matthias Moulin, Niels Billen and Philip Dutré 9

Trace rays front to back

slide-10
SLIDE 10

kd-trees

Matthias Moulin, Niels Billen and Philip Dutré 10

Trace rays front to back

slide-11
SLIDE 11

kd-trees

Matthias Moulin, Niels Billen and Philip Dutré 11

Problem: where to put the splitting planes?

slide-12
SLIDE 12

kd-trees

Matthias Moulin, Niels Billen and Philip Dutré 12

Problem: where to put the splitting planes?

slide-13
SLIDE 13

kd-trees

Matthias Moulin, Niels Billen and Philip Dutré 13

Problem: where to put the splitting planes?

slide-14
SLIDE 14

kd-trees

Matthias Moulin, Niels Billen and Philip Dutré 14

Problem: where to put the splitting planes?

slide-15
SLIDE 15

kd-trees

Matthias Moulin, Niels Billen and Philip Dutré 15

Problem: where to put the splitting planes?

slide-16
SLIDE 16

kd-trees

Matthias Moulin, Niels Billen and Philip Dutré 16

Problem: where to put the splitting planes?

slide-17
SLIDE 17

kd-trees

Matthias Moulin, Niels Billen and Philip Dutré 17

Problem: where to put the splitting planes?

slide-18
SLIDE 18

Literature

Matthias Moulin, Niels Billen and Philip Dutré 18

  • Surface Area Heuristic

[Goldsmith & Salmon 1987], [MacDonald & Booth 1990]

  • Optimizations
  • 𝒫(𝑂 log(𝑂)) build procedure

[Wald & Havran 2006]

  • Mail-boxing

[Hunt 2008]

  • Alternative build heuristics
  • Interior rays

[Fabianowski et al. 2009]

  • Actual ray distribution

[Havran & Bittner 1999], [Bittner & Havran 2009]

  • Non-uniform ray distribution

[Choi et al. 2012]

  • Blocking factors

[Reinhard et al. 1996], [Havran 2000]

slide-19
SLIDE 19

Surface Area Heuristic

Matthias Moulin, Niels Billen and Philip Dutré 19

Where to put the splitting plane? → Try to minimize the ray tracing cost! 𝐷SAH 𝑊 = 𝐷t + 𝑞L𝐷L + 𝑞R𝐷R

slide-20
SLIDE 20

Surface Area Heuristic

Matthias Moulin, Niels Billen and Philip Dutré 20

Where to put the splitting plane? → Try to minimize the ray tracing cost! 𝐷SAH 𝑊 = 𝐷t + 𝑞L𝐷L + 𝑞R𝐷R

slide-21
SLIDE 21

Surface Area Heuristic

Matthias Moulin, Niels Billen and Philip Dutré 21

𝐷SAH 𝑊 = 𝐷t + 𝑞L𝐷L + 𝑞R𝐷R Where to put the splitting plane? → Try to minimize the ray tracing cost!

slide-22
SLIDE 22

Surface Area Heuristic

Matthias Moulin, Niels Billen and Philip Dutré 22

𝐷SAH 𝑊 = 𝐷t + 𝑞L𝐷L + 𝑞R𝐷R Where to put the splitting plane? → Try to minimize the ray tracing cost!

slide-23
SLIDE 23

Surface Area Heuristic

Matthias Moulin, Niels Billen and Philip Dutré 23

Where to put the splitting plane? → Try to minimize the ray tracing cost! 𝐷SAH 𝑊 = 𝐷t + 𝑞L𝐷L + 𝑞R𝐷R

slide-24
SLIDE 24

Surface Area Heuristic

Matthias Moulin, Niels Billen and Philip Dutré 24

Where to put the splitting plane? → Try to minimize the ray tracing cost! 𝐷SAH 𝑊 = 𝐷t + 𝑞L𝐷L + 𝑞R𝐷R

slide-25
SLIDE 25

Surface Area Heuristic

Matthias Moulin, Niels Billen and Philip Dutré 25

Where to put the splitting plane? → Try to minimize the ray tracing cost! 𝐷SAH 𝑊 = 𝐷t + 𝑇𝐵L 𝑇𝐵Tot 𝐷L + 𝑇𝐵R 𝑇𝐵Tot 𝐷R

slide-26
SLIDE 26

Surface Area Heuristic ― Problems

Matthias Moulin, Niels Billen and Philip Dutré 26

SAH assumes that rays do not terminate within a voxel

slide-27
SLIDE 27

Surface Area Heuristic ― Problems

Matthias Moulin, Niels Billen and Philip Dutré 27

SAH assumes that rays do not terminate within a voxel

slide-28
SLIDE 28

Surface Area Heuristic ― Problems

Matthias Moulin, Niels Billen and Philip Dutré 28

SAH assumes that rays do not terminate within a voxel Contribution: 𝒲L→R = unblocked rays from left to right

slide-29
SLIDE 29

Surface Area Heuristic ― Problems

Matthias Moulin, Niels Billen and Philip Dutré 29

SAH assumes that rays do not terminate within a voxel Contribution: 𝒲R→L = unblocked rays from right to left

slide-30
SLIDE 30

Ray Termination Surface Area Heuristic

Matthias Moulin, Niels Billen and Philip Dutré 30

𝐷RTSAH = 𝐷t + 𝑞jL𝐷L + 𝑞jR𝐷R + 𝑞L→R 𝐷L + 𝒲L→R𝐷R + 𝑞R→L 𝐷R + 𝒲R→L𝐷L

[Ize et al. 2011]

slide-31
SLIDE 31

Ray Termination Surface Area Heuristic

Matthias Moulin, Niels Billen and Philip Dutré 31

𝐷RTSAH = 𝐷t + 𝑞jL𝐷L + 𝑞jR𝐷R + 𝑞L→R 𝐷L + 𝒲L→R𝐷R + 𝑞R→L 𝐷R + 𝒲R→L𝐷L

slide-32
SLIDE 32

Ray Termination Surface Area Heuristic

Matthias Moulin, Niels Billen and Philip Dutré 32

𝐷RTSAH = 𝐷t + 𝑞jL𝐷L + 𝑞jR𝐷R + 𝑞L→R 𝐷L + 𝒲L→R𝐷R + 𝑞R→L 𝐷R + 𝒲R→L𝐷L

slide-33
SLIDE 33

Ray Termination Surface Area Heuristic

Matthias Moulin, Niels Billen and Philip Dutré 33

𝐷RTSAH = 𝐷t + 𝑞jL𝐷L + 𝑞jR𝐷R + 𝑞L→R 𝐷L + 𝒲L→R𝐷R + 𝑞R→L 𝐷R + 𝒲R→L𝐷L

slide-34
SLIDE 34

Ray Termination Surface Area Heuristic

Matthias Moulin, Niels Billen and Philip Dutré 34

𝐷RTSAH = 𝐷t + 𝑞jL𝐷L + 𝑞jR𝐷R + 𝑞L→R 𝐷L + 𝒲L→R𝐷R + 𝑞R→L 𝐷R + 𝒲R→L𝐷L

slide-35
SLIDE 35

Ray Termination Surface Area Heuristic

Matthias Moulin, Niels Billen and Philip Dutré 35

𝐷RTSAH = 𝐷t + 𝑞jL𝐷L + 𝑞jR𝐷R + 𝑞L→R 𝐷L + 𝒲L→R𝐷R + 𝑞R→L 𝐷R + 𝒲R→L𝐷L

slide-36
SLIDE 36

Ray Termination Surface Area Heuristic

Matthias Moulin, Niels Billen and Philip Dutré 36

𝐷RTSAH = 𝐷t + 𝑞jL𝐷L + 𝑞jR𝐷R + 𝑞L→R 𝐷L + 𝒲L→R𝐷R + 𝑞R→L 𝐷R + 𝒲R→L𝐷L

slide-37
SLIDE 37

Ray Termination Surface Area Heuristic

Matthias Moulin, Niels Billen and Philip Dutré 37

𝐷RTSAH = 𝐷t + 𝑞jL𝐷L + 𝑞jR𝐷R + 𝑞L→R 𝐷L + 𝒲L→R𝐷R + 𝑞R→L 𝐷R + 𝒲R→L𝐷L

slide-38
SLIDE 38

RASTERIZED Approximation

Matthias Moulin, Niels Billen and Philip Dutré 38

Projects all primitives orthogonally on the splitting plane

slide-39
SLIDE 39

RASTERIZED Approximation

Matthias Moulin, Niels Billen and Philip Dutré 39

Projects all primitives orthogonally on the splitting plane

slide-40
SLIDE 40

RASTERIZED Approximation

Matthias Moulin, Niels Billen and Philip Dutré 40

Projects all primitives orthogonally on the splitting plane

slide-41
SLIDE 41

RASTERIZED Approximation

Matthias Moulin, Niels Billen and Philip Dutré 41

Projects all primitives orthogonally on the splitting plane

slide-42
SLIDE 42

RASTERIZED Approximation

Matthias Moulin, Niels Billen and Philip Dutré 42

Projects all primitives orthogonally on the splitting plane

slide-43
SLIDE 43

RASTERIZED Approximation

Matthias Moulin, Niels Billen and Philip Dutré 43

Projects all primitives orthogonally on the splitting plane

slide-44
SLIDE 44

RASTERIZED Approximation

Matthias Moulin, Niels Billen and Philip Dutré 44

Projects all primitives orthogonally on the splitting plane

slide-45
SLIDE 45

RASTERIZED Approximation

Matthias Moulin, Niels Billen and Philip Dutré 45

Projects all primitives orthogonally on the splitting plane

slide-46
SLIDE 46

RASTERIZED Approximation

Matthias Moulin, Niels Billen and Philip Dutré 46

Projects all primitives orthogonally on the splitting plane

slide-47
SLIDE 47

Visibility Estimation Error

Matthias Moulin, Niels Billen and Philip Dutré 47

slide-48
SLIDE 48

Visibility Estimation Error

Matthias Moulin, Niels Billen and Philip Dutré 48

slide-49
SLIDE 49

Visibility Estimation Error

Matthias Moulin, Niels Billen and Philip Dutré 49

slide-50
SLIDE 50

Visibility Estimation Error

Matthias Moulin, Niels Billen and Philip Dutré 50

slide-51
SLIDE 51

Visibility Estimation Error

Matthias Moulin, Niels Billen and Philip Dutré 51

slide-52
SLIDE 52

Visibility Estimation Error

Matthias Moulin, Niels Billen and Philip Dutré 52

slide-53
SLIDE 53

Visibility Estimation Error

Matthias Moulin, Niels Billen and Philip Dutré 53

slide-54
SLIDE 54

AVERAGED approximation

Matthias Moulin, Niels Billen and Philip Dutré 54

average projected surface area =

1 4 surface area

slide-55
SLIDE 55

Visibility Estimation Error

Matthias Moulin, Niels Billen and Philip Dutré 55

slide-56
SLIDE 56

Visibility Estimation Error

Matthias Moulin, Niels Billen and Philip Dutré 56

slide-57
SLIDE 57

Results

Matthias Moulin, Niels Billen and Philip Dutré 57

Sponza (512spp) Whitted Ray Tracer

slide-58
SLIDE 58

Matthias Moulin, Niels Billen and Philip Dutré 58

SAH

Low High

#INTERSECTION tests for PRIMARY rays Diff(RASTERIZED, SAH) Diff(AVERAGED, SAH)

slide-59
SLIDE 59

Matthias Moulin, Niels Billen and Philip Dutré 59

SAH #INTERSECTION tests for PRIMARY rays

  • 12.5%
  • 25.5%

Less More

Diff(RASTERIZED, SAH) Diff(AVERAGED, SAH)

slide-60
SLIDE 60

Matthias Moulin, Niels Billen and Philip Dutré 60

SAH #INTERSECTION tests for SHADOW rays Diff(RASTERIZED, SAH) Diff(AVERAGED, SAH)

Low High

slide-61
SLIDE 61

Matthias Moulin, Niels Billen and Philip Dutré 61

SAH

  • 3.1%
  • 22.1%

#INTERSECTION tests for SHADOW rays Diff(RASTERIZED, SAH) Diff(AVERAGED, SAH)

Less More

slide-62
SLIDE 62

Matthias Moulin, Niels Billen and Philip Dutré 62

SAH

251.6s (-3.9%) 249.3s (-4.8%) 261.9s

Total rendering time Diff(RASTERIZED, SAH) Diff(AVERAGED, SAH)

Less More

slide-63
SLIDE 63

Matthias Moulin, Niels Billen and Philip Dutré 63

SAH #TRAVERSED nodes for PRIMARY rays Diff(RASTERIZED, SAH) Diff(AVERAGED, SAH)

Low High

slide-64
SLIDE 64

Matthias Moulin, Niels Billen and Philip Dutré 64

SAH

+8.2% +7.6%

#TRAVERSED nodes for PRIMARY rays Diff(RASTERIZED, SAH) Diff(AVERAGED, SAH)

Less More

slide-65
SLIDE 65

Matthias Moulin, Niels Billen and Philip Dutré 65

SAH #TRAVERSED nodes for SHADOW rays Diff(RASTERIZED, SAH) Diff(AVERAGED, SAH)

Low High

slide-66
SLIDE 66

Matthias Moulin, Niels Billen and Philip Dutré 66

SAH

  • 2.2%

+10.6%

#TRAVERSED nodes for SHADOW rays Diff(RASTERIZED, SAH) Diff(AVERAGED, SAH)

Less More

slide-67
SLIDE 67

Matthias Moulin, Niels Billen and Philip Dutré 67

260.0s (-7.5%) 257.2s (-8.5%) 281.2s

SAH Total rendering time Diff(RASTERIZED, SAH) Diff(AVERAGED, SAH)

Less More

slide-68
SLIDE 68

Matthias Moulin, Niels Billen and Philip Dutré 68

125.8s (-3.2%) 123.6 (-4.8%)

SAH

129.9

Total rendering time Diff(RASTERIZED, SAH) Diff(AVERAGED, SAH)

Less More

slide-69
SLIDE 69

Matthias Moulin, Niels Billen and Philip Dutré 69

49,6s (1.8%) 48,2s (-1.0%)

SAH

48,7s

Total rendering time Diff(RASTERIZED, SAH) Diff(AVERAGED, SAH)

Less More

slide-70
SLIDE 70

Conclusions

Our RASTERIZED/AVERAGED RTSAH <> SAH

  • Significant reductions in intersection tests for primary and

shadow rays

  • Ray termination included in build heuristic
  • Same computational build complexity
  • Same finite set of candidate splitting planes

Matthias Moulin, Niels Billen and Philip Dutré 70

slide-71
SLIDE 71

Matthias Moulin, Niels Billen and Philip Dutré 71

Questions? Thank you for your attention!

slide-72
SLIDE 72

Matthias Moulin, Niels Billen and Philip Dutré 72

slide-73
SLIDE 73

Matthias Moulin, Niels Billen and Philip Dutré 73

  • 20.5%
  • 18.9%

+4.6% +1.3% 260.0s (-7.5%)

  • 30.7%
  • 40.8%

+12.2% +10.8% 257.2s (-8.5%) Sponza (512spp) 281.2s

SAH Diff(RASTERIZED, SAH) Diff(AVERAGED, SAH)

Less More

slide-74
SLIDE 74

Matthias Moulin, Niels Billen and Philip Dutré 74

  • 10.6%
  • 9.1%

+8.0% +12.3% 125.8s (-3.2%)

  • 20.2%
  • 17.7%

+6.7% +12.0% 123.6 (-4.8%)

SAH

Sibenik (512spp) 129.9

Diff(RASTERIZED, SAH) Diff(AVERAGED, SAH)

Less More

slide-75
SLIDE 75

Matthias Moulin, Niels Billen and Philip Dutré 75

  • 1.8%
  • 1.5%

+5.5% +7.4% 49,6s (1.8%) +0.9%

  • 3.7%

+2.6% +2.7% 48,2s (-1.0%)

SAH Diff(RASTERIZED, SAH) Diff(AVERAGED, SAH)

Sibenik (512spp) 48,7s Less More