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 split 3D space Matthias Moulin, Niels Billen and Philip Dutré 3
kd-trees Recursively split 3D space Matthias Moulin, Niels Billen and Philip Dutré 4
kd-trees Recursively split 3D space Matthias Moulin, Niels Billen and Philip Dutré 5
kd-trees Recursively split 3D space Matthias Moulin, Niels Billen and Philip Dutré 6
kd-trees Trace rays front to back Matthias Moulin, Niels Billen and Philip Dutré 7
kd-trees Trace rays front to back Matthias Moulin, Niels Billen and Philip Dutré 8
kd-trees Trace rays front to back Matthias Moulin, Niels Billen and Philip Dutré 9
kd-trees Trace rays front to back Matthias Moulin, Niels Billen and Philip Dutré 10
kd-trees Problem: where to put the splitting planes? Matthias Moulin, Niels Billen and Philip Dutré 11
kd-trees Problem: where to put the splitting planes? Matthias Moulin, Niels Billen and Philip Dutré 12
kd-trees Problem: where to put the splitting planes? Matthias Moulin, Niels Billen and Philip Dutré 13
kd-trees Problem: where to put the splitting planes? Matthias Moulin, Niels Billen and Philip Dutré 14
kd-trees Problem: where to put the splitting planes? Matthias Moulin, Niels Billen and Philip Dutré 15
kd-trees Problem: where to put the splitting planes? Matthias Moulin, Niels Billen and Philip Dutré 16
kd-trees Problem: where to put the splitting planes? Matthias Moulin, Niels Billen and Philip Dutré 17
Literature • 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] Matthias Moulin, Niels Billen and Philip Dutré 18
Surface Area Heuristic Where to put the splitting plane? → Try to minimize the ray tracing cost! 𝐷 SAH 𝑊 = 𝐷 t + 𝑞 L 𝐷 L + 𝑞 R 𝐷 R Matthias Moulin, Niels Billen and Philip Dutré 19
Surface Area Heuristic Where to put the splitting plane? → Try to minimize the ray tracing cost! 𝐷 SAH 𝑊 = 𝐷 t + 𝑞 L 𝐷 L + 𝑞 R 𝐷 R Matthias Moulin, Niels Billen and Philip Dutré 20
Surface Area Heuristic Where to put the splitting plane? → Try to minimize the ray tracing cost! 𝐷 SAH 𝑊 = 𝐷 t + 𝑞 L 𝐷 L + 𝑞 R 𝐷 R Matthias Moulin, Niels Billen and Philip Dutré 21
Surface Area Heuristic Where to put the splitting plane? → Try to minimize the ray tracing cost! 𝐷 SAH 𝑊 = 𝐷 t + 𝑞 L 𝐷 L + 𝑞 R 𝐷 R Matthias Moulin, Niels Billen and Philip Dutré 22
Surface Area Heuristic Where to put the splitting plane? → Try to minimize the ray tracing cost! 𝐷 SAH 𝑊 = 𝐷 t + 𝑞 L 𝐷 L + 𝑞 R 𝐷 R Matthias Moulin, Niels Billen and Philip Dutré 23
Surface Area Heuristic Where to put the splitting plane? → Try to minimize the ray tracing cost! 𝐷 SAH 𝑊 = 𝐷 t + 𝑞 L 𝐷 L + 𝑞 R 𝐷 R Matthias Moulin, Niels Billen and Philip Dutré 24
Surface Area Heuristic Where to put the splitting plane? → Try to minimize the ray tracing cost! 𝐷 SAH 𝑊 = 𝐷 t + 𝑇𝐵 L 𝐷 L + 𝑇𝐵 R 𝐷 R 𝑇𝐵 Tot 𝑇𝐵 Tot Matthias Moulin, Niels Billen and Philip Dutré 25
Surface Area Heuristic ― Problems SAH assumes that rays do not terminate within a voxel Matthias Moulin, Niels Billen and Philip Dutré 26
Surface Area Heuristic ― Problems SAH assumes that rays do not terminate within a voxel Matthias Moulin, Niels Billen and Philip Dutré 27
Surface Area Heuristic ― Problems SAH assumes that rays do not terminate within a voxel Contribution: 𝒲 L→R = unblocked rays from left to right Matthias Moulin, Niels Billen and Philip Dutré 28
Surface Area Heuristic ― Problems SAH assumes that rays do not terminate within a voxel Contribution: 𝒲 R→L = unblocked rays from right to left Matthias Moulin, Niels Billen and Philip Dutré 29
Ray Termination Surface Area Heuristic 𝐷 RTSAH = 𝐷 t + 𝑞 jL 𝐷 L + 𝑞 jR 𝐷 R + 𝑞 L→R 𝐷 L + 𝒲 L→R 𝐷 R + 𝑞 R→L 𝐷 R + 𝒲 R→L 𝐷 L [Ize et al. 2011] Matthias Moulin, Niels Billen and Philip Dutré 30
Ray Termination Surface Area Heuristic 𝐷 RTSAH = 𝐷 t + 𝑞 jL 𝐷 L + 𝑞 jR 𝐷 R + 𝑞 L→R 𝐷 L + 𝒲 L→R 𝐷 R + 𝑞 R→L 𝐷 R + 𝒲 R→L 𝐷 L Matthias Moulin, Niels Billen and Philip Dutré 31
Ray Termination Surface Area Heuristic 𝐷 RTSAH = 𝐷 t + 𝑞 jL 𝐷 L + 𝑞 jR 𝐷 R + 𝑞 L→R 𝐷 L + 𝒲 L→R 𝐷 R + 𝑞 R→L 𝐷 R + 𝒲 R→L 𝐷 L Matthias Moulin, Niels Billen and Philip Dutré 32
Ray Termination Surface Area Heuristic 𝐷 RTSAH = 𝐷 t + 𝑞 jL 𝐷 L + 𝑞 jR 𝐷 R + 𝑞 L→R 𝐷 L + 𝒲 L→R 𝐷 R + 𝑞 R→L 𝐷 R + 𝒲 R→L 𝐷 L Matthias Moulin, Niels Billen and Philip Dutré 33
Ray Termination Surface Area Heuristic 𝐷 RTSAH = 𝐷 t + 𝑞 jL 𝐷 L + 𝑞 jR 𝐷 R + 𝑞 L→R 𝐷 L + 𝒲 L→R 𝐷 R + 𝑞 R→L 𝐷 R + 𝒲 R→L 𝐷 L Matthias Moulin, Niels Billen and Philip Dutré 34
Ray Termination Surface Area Heuristic 𝐷 RTSAH = 𝐷 t + 𝑞 jL 𝐷 L + 𝑞 jR 𝐷 R + 𝑞 L→R 𝐷 L + 𝒲 L→R 𝐷 R + 𝑞 R→L 𝐷 R + 𝒲 R→L 𝐷 L Matthias Moulin, Niels Billen and Philip Dutré 35
Ray Termination Surface Area Heuristic 𝐷 RTSAH = 𝐷 t + 𝑞 jL 𝐷 L + 𝑞 jR 𝐷 R + 𝑞 L→R 𝐷 L + 𝒲 L→R 𝐷 R + 𝑞 R→L 𝐷 R + 𝒲 R→L 𝐷 L Matthias Moulin, Niels Billen and Philip Dutré 36
Ray Termination Surface Area Heuristic 𝐷 RTSAH = 𝐷 t + 𝑞 jL 𝐷 L + 𝑞 jR 𝐷 R + 𝑞 L→R 𝐷 L + 𝒲 L→R 𝐷 R + 𝑞 R→L 𝐷 R + 𝒲 R→L 𝐷 L Matthias Moulin, Niels Billen and Philip Dutré 37
RASTERIZED Approximation Projects all primitives orthogonally on the splitting plane Matthias Moulin, Niels Billen and Philip Dutré 38
RASTERIZED Approximation Projects all primitives orthogonally on the splitting plane Matthias Moulin, Niels Billen and Philip Dutré 39
RASTERIZED Approximation Projects all primitives orthogonally on the splitting plane Matthias Moulin, Niels Billen and Philip Dutré 40
RASTERIZED Approximation Projects all primitives orthogonally on the splitting plane Matthias Moulin, Niels Billen and Philip Dutré 41
RASTERIZED Approximation Projects all primitives orthogonally on the splitting plane Matthias Moulin, Niels Billen and Philip Dutré 42
RASTERIZED Approximation Projects all primitives orthogonally on the splitting plane Matthias Moulin, Niels Billen and Philip Dutré 43
RASTERIZED Approximation Projects all primitives orthogonally on the splitting plane Matthias Moulin, Niels Billen and Philip Dutré 44
RASTERIZED Approximation Projects all primitives orthogonally on the splitting plane Matthias Moulin, Niels Billen and Philip Dutré 45
RASTERIZED Approximation Projects all primitives orthogonally on the splitting plane Matthias Moulin, Niels Billen and Philip Dutré 46
Visibility Estimation Error Matthias Moulin, Niels Billen and Philip Dutré 47
Visibility Estimation Error Matthias Moulin, Niels Billen and Philip Dutré 48
Visibility Estimation Error Matthias Moulin, Niels Billen and Philip Dutré 49
Visibility Estimation Error Matthias Moulin, Niels Billen and Philip Dutré 50
Visibility Estimation Error Matthias Moulin, Niels Billen and Philip Dutré 51
Visibility Estimation Error Matthias Moulin, Niels Billen and Philip Dutré 52
Visibility Estimation Error Matthias Moulin, Niels Billen and Philip Dutré 53
AVERAGED approximation 1 average projected surface area = 4 surface area Matthias Moulin, Niels Billen and Philip Dutré 54
Visibility Estimation Error Matthias Moulin, Niels Billen and Philip Dutré 55
Visibility Estimation Error Matthias Moulin, Niels Billen and Philip Dutré 56
Results Sponza (512spp) Whitted Ray Tracer Matthias Moulin, Niels Billen and Philip Dutré 57
SAH Diff (RASTERIZED, SAH) Diff (AVERAGED, SAH) Low High #INTERSECTION tests for PRIMARY rays Matthias Moulin, Niels Billen and Philip Dutré 58
SAH Diff (RASTERIZED, SAH) Diff (AVERAGED, SAH) Less More -12.5% -25.5% #INTERSECTION tests for PRIMARY rays Matthias Moulin, Niels Billen and Philip Dutré 59
SAH Diff (RASTERIZED, SAH) Diff (AVERAGED, SAH) Low High #INTERSECTION tests for SHADOW rays Matthias Moulin, Niels Billen and Philip Dutré 60
SAH Diff (RASTERIZED, SAH) Diff (AVERAGED, SAH) Less More -3.1% -22.1% #INTERSECTION tests for SHADOW rays Matthias Moulin, Niels Billen and Philip Dutré 61
Recommend
More recommend