Title: Bounding Volume Hierarchy
1Bounding Volume Hierarchy
- Efficient Distance Computation Between
Non-Convex Objects - Sean Quinlan
- Stanford, 1994
- Presented
- by Mathieu Brédif
2Simplifying Assumptions
- Surface analysis only
- Decomposition of objects into sets of convex
surfaces - Easy in graphics all surfaces are composed
of triangles - Not necessarily easy in general
3Basis Convex Objects
- Efficient distance computation between
convex polyhedra - Decomposition of two objects into m and n
convex polyhedra. - O(mn) distance computation
4Algorithm Overview
- PreprocessingApproximation by Bounding Volume
Hierarchies of Spheres - Query Branch and Bound in both trees to find
minimum distance
5The Sphere Hierarchy
- Binary tree
- Root node objects bounding sphere
- Leaf nodes are tiny spheres their union
approximates the objects surface - Every nodes sphere contains entirely its
descendents
6Creating the Leaves
- Cover the object surface with tiny spheres (leaf
nodes). - Radius user-determined.
7Creating a balanced Tree
- Divide halfway in the major axis of a rectangular
bounding box. - Recurse until 1 leaf per set
- (Root down to leaves)
8Decorating the Tree with Spheres
- Leaves up to root create bounding spheres for
each node. - Best of 2 methods
- Find the minimal sphere that contains the two
spheres of the child nodes - Determine a sphere directly from the leaf nodes
descended from this node
9Resulting Tree Representation
10Resulting Tree Representation
11Resulting Tree Representation
12Resulting Tree Representation
13Query Computing Distances
- Depth-first search on the binary tree
- Keep an updated minimum distance
- Depth-first ? more pruning in search
- Prune search on branches that wont reduce
minimum distance - Once leaf node is reached, examine underlying
convex polygon for exact distance (former method)
14Simple Example
- Set initial distance value to infinity
Start at the root node. 20 lt infinity, so
continue searching
15Simple Example
- Set initial distance value to infinity
Start at the root node. 20 lt infinity, so
continue searching.
40 lt infinity, so continue searching recursively.
- Choose the nearest of the two child spheres to
search first
16Simple Example
- Eventually search reaches a leaf node
40 lt infinity examine the polygon to which the
leaf node is attached.
17Simple Example
- Eventually search reaches a leaf node
Call algorithm to find exact distance to the
segment. Replace infinity with new minimum
distance (42 in this case).
40 lt infinity examine the segment to which the
leaf node is attached.
18Simple Example
- Continue depth-first search
45 gt 42 dont search this branch any further
19Simple Example
- Continue depth-first search
60 gt 42 we can prune this half of our tree from
the search
45 gt 42 dont search this branch any further
20Efficiency Building the Tree
- Roughly balanced binary tree
- Expected time O(n log n)
- Worst case time O(n 2)
- (n leaves nodes)
- Precomputed Built only once!
21Efficiency Searching the Tree
- Full search
- O(n) to traverse the tree
- O(p) time to compute distance to each polygon
in the underlying model - The algorithm allows a pruned search
- Worst case no change! (close objects)
- Best case O(log n) a single polygon comparison
22Collision Detection
- BVH Two sphere trees
- 2 spheres intersects gt descend further
- May need to descend to polygon level (line
segment in 2D)
23Collision Detection
- Quick
- Widely separated
- Collided
- Slower
- Close but not overlapping
- Close at many points
24Extension Multiple Trees
- If 2nd object is not a single point
- Start at root of both trees
- Branch split the larger sphere
- The closest child to the unsplit sphere is
searched first - Deformable Object precomputation of solid links,
meta-tree computation before queries
25Extension Relative Error
- New minimum distance d Registration
- d (1-a)d
- 0?alt1 user-determined relative error
- d0 iff d0 correct collision detection
- Better pruning gt performance speedup
- Exact distance in d,d/(1-a)
- Trade off efficiency/exactitude
26Empirical Results
- Relative error of 20
- more pruning in search
- speedup of 2 orders of magnitude
- Objects close together
- less pruning in search
- less efficient
27Conclusions
- Simple and intuitive way to speed up distance
calculations - Gives more information than collision detection
algorithms - Built on top of algorithms that compute distances
between convex polygons - Applications to path planning (robotobject1,
obstaclesobject2)