object partitioning considered harmful: space subdivision for bvhs
Post on 02-Jan-2016
21 Views
Preview:
DESCRIPTION
TRANSCRIPT
Stefan Popov Space Subdivision for BVHs
Stefan Popov, Iliyan Georgiev, Rossen Dimov, and Philipp Slusallek
Object Partitioning Considered Harmful: Space Subdivision for
BVHs
Stefan Popov Space Subdivision for BVHs
Motivation Classical BVH construction is not perfect
Looks only at primitive’s centroids
How much more performance is there?
Classical : Create leaf Correct solution
Tested sp
lits
Stefan Popov Space Subdivision for BVHs
Background
SAH:
Cost based BVH construction: Top-down Partition set of N’s primitives into NL and NR
Take partition with minimal cost Exhaustive search: O(2N)
)(
)()()(
NSA
NNSANNSACNcost RRLLT
0 1 0 1 1 0 0 1
\NL NR
N
Stefan Popov Space Subdivision for BVHs
Classical BVH Construction
P2
P1
P3
P4
Assumes finely tessellated geometry Primitive point
Stefan Popov Space Subdivision for BVHs
Can We Do Better?
Optimal partition Cost ≈ 100
CBVH split Cost ≈ 700
Stefan Popov Space Subdivision for BVHs
Geometric Partitioning Regular approach: Partition N’s primitives
Evaluate AABBs, and use to compute cost O(2N) partitions to test
Geometric partitioning: Fix child AABBs and put primitives according to SAH Some configurations are infeasible Child AABB boundaries ≡ boundaries of primitives O(N12) configurations to test
Stefan Popov Space Subdivision for BVHs
Geometric Partitioning Example
Boundaries of NL or R incident with dotted lines P4 shared put into node with smaller SA
P1
P2
P3P4
NL NR
Stefan Popov Space Subdivision for BVHs
Geometric Partitioning Example
Configuration infeasible P2 is not covered
P1
P2
P3P4
NL NR
Stefan Popov Space Subdivision for BVHs
Practical Considerations O(N12) is actually O(N6)
Each side of the parent AABB is inherited by a child Select child AABBs on a regular grid
Run-time: O(G6N0.5) including cost calculation Choosing G=RN1/6 yields O(N1.5)
Look at CBVH configurations as well
P1
P2
P3P4
NL NR
Stefan Popov Space Subdivision for BVHs
Results: FPS Random Rays
Bunny Fairy Forest Sponza Venice Soda Hall
0.70000000000000
1
1
0.4
0.8 0.8
0.70000000000000
1
0.70000000000000
1
0.3
0.5 0.5
0.70000000000000
1
0.4
Classical BVH Our Method (R=64) Our Method (R=4K)
Hig
he
r is
be
tte
r
Stefan Popov Space Subdivision for BVHs
Results: Surface Area Cost
Bunny Fairy Forest Sponza Venice Soda Hall
66 58
142
95
166
68 68
167
108
167
80
150
Classical BVH Our Method (R=64) Our Method (R=4K)
Lo
we
r is
be
tte
r
Stefan Popov Space Subdivision for BVHs
Result Analysis Suspect: SAH
Overlap + locally minimizing SAH has adverse effect Experiment: Use recursive cost evaluation
Tree cost better than CBVH but slower FPS! Hypothesis: SA model needs space partitioning
Intuition: Early ray termination New algorithm
Penalize overlap in cost function Refine search space by allowing primitive splitting
Stefan Popov Space Subdivision for BVHs
Splitting Primitives Feasible and infeasible configurations
Two possible ways to split a primitive
SAH cost is the same
P3
P1 P2
NL
NRP3
P1 P2
NL
NR
P3
P1 P2
NL
NRP3
P1 P2
NL
NR
Stefan Popov Space Subdivision for BVHs
Search Spaces
Child AABBs continuum inside parent’s AABB Not limited to boundary of primitives anymore
Limit search to a grid for practical purposes Augment with search space of other algorithms
CBVH & KD-tree construction search spaces
P3
P1P2
NL
NR P3
P1P2
NL
NR
Stefan Popov Space Subdivision for BVHs
Penalizing Overlap
Bias SAH to account for overlap
CO – the overlap penalty Standard SAH: CO = 0 Standard SAH with space partitioning: CO ∞
)(
)()(
)(
)(1)(
NSA
NNSANNSA
NV
NNVCCNcost RRLLRLOT
Stefan Popov Space Subdivision for BVHs
The Generic Algorithm Parameters:
Search space Overlap penalty
Algorithm Take configuration search space with lowest cost
Interesting parameters CBVH: BVH, CO = 0 Full: Grid + KD tree + BVH, CO ∞ KDBVH: KD tree, CO irrelevant
Stefan Popov Space Subdivision for BVHs
Results: FPS Random Rays
Bunny Fairy Forest Sponza Venice Soda Hall
0.70000000000000
1
1
0.4
0.8 0.80.81
0.8
1.11.2
0.81
0.8
1.2 1.2
CBVH Full Search KDBVH
Hig
he
r is
be
tte
r
Stefan Popov Space Subdivision for BVHs
Results: FPS Frustum Traversal
Bunny Fairy Forest Sponza Venice Soda Hall
11
5.1 4.83.3
5.4
9.3
5.15.9
3.7
8.79.3
5.1 5.83.9
8.7
CBVH Full Search KDBVH
Hig
he
r is
be
tte
r
Stefan Popov Space Subdivision for BVHs
Comparison to Pre-Splitting
CBVH EVH (t=14)
EVH (t=16)
ESC (e=80)
ESC (e=200)
Full Search
KDBVH
0.110.25 0.28 0.29
0.26
0.590.57
0.6 0.6 0.60.5 0.55
0.95 0.96
Sponza Rotated Sponza
Hig
he
r is
be
tte
r
Stefan Popov Space Subdivision for BVHs
Role of Overlap Penalty
0 2 4 6 8 1060
65
70
75
80
85
1.2
1.6
2
2.4
2.8
Ray Cost Size in MB
Overlap Penalty
Ray
Co
st
MB
Stefan Popov Space Subdivision for BVHs
Spatial Build Algorithm Implement KDBVH using sweep plane Extensions:
Combine with CBVH to control size using CO
Sampling of cost function Issues: Might miss cost minimum
Cost is quadratic between split plane positions
P3
P2
Stefan Popov Space Subdivision for BVHs
Conclusion & Future Work
SAH inadequate without space partitioning! Generic framework to study BVH construction
Can explore full 2N search space Spatial build algorithm
Fast with near optimal results Research early termination aware cost function
Stefan Popov Space Subdivision for BVHs
Thank you!
top related