Presentation is loading. Please wait.

Presentation is loading. Please wait.

OBBTree: A Hierarchical Structure for Rapid Interference Detection Gottschalk, M. C. Lin and D. ManochaM. C. LinD. Manocha Department of Computer Science,

Similar presentations


Presentation on theme: "OBBTree: A Hierarchical Structure for Rapid Interference Detection Gottschalk, M. C. Lin and D. ManochaM. C. LinD. Manocha Department of Computer Science,"— Presentation transcript:

1 OBBTree: A Hierarchical Structure for Rapid Interference Detection Gottschalk, M. C. Lin and D. ManochaM. C. LinD. Manocha Department of Computer Science, University of N. Carolina, Chapel Hill. Presenter: Tao Ju Spring, 2001

2 Introduction OBBTree: A tight-fitting hierarchical structure and an efficient overlap-testing algorithm for interference detection amongst complex models undergoing rigid motion. Bounding Volume: OBB (Oriented Bounding Box) Overlap test algorithm for OBBs: Separating Axis Algorithm

3 Computing Tight Fitting OBB O(n Log(n)) Triangulate polygons. ( O(n) ) Compute the convex hull of the vertices of the triangles. ( O(n Log(n)) ) Orientation of OBB: Covariance Matrix. ( O(n) ) Position and dimension of OBB. ( O(n) )

4 Compute Orientation of OBB Let the i ’ th triangle of the convex hull have vertices p i, q i, and r i. Let the number of triangles in the convex hull be n. The area of i ’ th triangle is denoted as A i, A i = | (p i - q i ) × (p i - r i ) | / 2 The surface area of the convex hull is denoted as A H, A H = ∑ i A i

5 Compute Orientation of OBB The centroid of the i ’ th triangle is denoted by vector m i, m i = ( p i + q i + r i ) / 3 The centroid of the entire convex hull is a weighted mean of the triangle centroids, denoted by m H, m H = ∑ i A i m i / A H

6 Compute Orientation of OBB The elements of the covariance matrix C n × n are defined as: C n × n = The three eigenvectors of C will be mutually orthogonal. After normalization, the three eigenvectors become axes of OBB.

7 Compute Dimension of OBB Find the maximum and minimum extents of the original triangle set along each axis, and size the OBB.

8 Computing Tight Fitting OBB Why using covariance matrix? Second order statistics summarizing the data points. Why using convex hull? Avoid arbitrary influences from interior vertices of the model. Why computing areas? Infinitely dense sampling.

9 Constructing a hierarchical OBBTree: Top-down Approach Subdivision method: Split the longest axis of an OBB with a plane orthogonal to one of its axes, partitioning the polygons according to which side of the plane their center point lies on. The subdivision coordinate along that axis was then chosen to be that of the mean point of the vertices.

10 OBBTree Construction Building the OBBTree: Recursively partition the bounded polygons and bound the resulting groups.

11 OBBTree Construction Running time: Similar to Quicksort. Fitting an OBB to n triangles and partitioning into two subgroups:O(n Log(n)) Levels of recursion:O( Log(n)) Total computation time: O(n Log 2 (n))

12 Fast Overlap Test For OBBs Previous algorithms: Simple test (144 edge-face tests) Linear programming Closest features computation. Performance: Two orders of magnitude slower than checking two spheres for overlap.

13 Fast Overlap Test For OBBs Separating axis theorem: Two convex polytopes are disjoint iff there exists a separating axis orthogonal to a face of either polytope or orthogonal to an edge from each polytope. Separating Axis: An axis on which the projections of two polytopes don’t overlap.

14 Fast Overlap Test For OBBs Testing 15 axes is sufficient for determining overlap status of two OBBs.

15 Fast Overlap Test For OBBs Radius of interval: r A = ∑ i | a i A i · L | The intervals are disjoint iff: | T · L | > r A + r B

16 Fast Overlap Test For OBBs The computation simplifies when L is a box axis or cross product of box axes. Worst case run time: 200 operations. ( computed on HP 735/125 ) Separating Axis Algorithm Closest Features Linear Programming 5 – 7 us45 – 105 us180 – 230 us

17 Comparison Of Bounding Volumes Bounding volumes: Spheres AABBs ( Axis Aligned Bounding Boxes ) OBBs ( Oriented Bounding Boxes )

18 Comparison Of Bounding Volumes Cost function of hierarchical structure: T = N v × C v + N p × C p where N v : # of bounding volume pair overlap tests C v : cost of testing a pair of bounding volumes for overlap, N p : # of primitive pairs tested for interference, C p : cost of testing a pair of primitives for overlap.

19 Comparison Of Bounding Volumes C v is one-order of magnitude slower than that for sphere trees or AABBs. Primary advantage for OBB: Low N v and N p In general, OBBs can bound geometry more tightly than AABBTrees and sphere trees.

20 Comparison Of Bounding Volumes Define tightness, г, of a bounding volume, B, with respect to the geometry it covers, G, is B ’ s Hausdorff distance from G, i.e. г= max b min g dist(b, g)b ∈ B, g ∈ G Define diameter, d, of a bounding volume with respect to the bounded geometry is the maximum distance among all pairs of enclosed points on the bounded geometry, d = max g,h dist(g, h) g, h ∈ G

21 Comparison Of Bounding Volumes When bounding low curvature surfaces, AABBTrees and spheres haveгwith linear dependence on d, whereas OBBTrees haveгwith quadratic dependence on d. To cover a surface patch with volumes to a given tightness, if OBBs require O(m) bounding volumes, AABBs and spheres would require O(m 2 ) bounding volumes.

22 Comparison Of Bounding Volumes AABBs vs. OBBs: Approximation of a Torus – This shows OBBs converging to the shape of a torus more rapidly.

23 Experiment Of Bounding Volumes Parallel close proximity : every point on each surface is close to some point on the other surface.

24 Experiment Of Bounding Volumes Point close proximity : two nonparallel surfaces patches come close to touching at a point.

25 Comparison Of Performance With AABBs: Improvement from 1/7 – 1/5 of a second for computation of all contacts between models to 1/75 – 1/25 of a second. ( on SGI Indigo 2 Extreme ). With spheres: Improvement of one order of magnitude.

26 Interference Detection In Action RAPID V-COLLIDE H-COLLIDE

27 Interference Detection In Action Interactive Interference Detection on Complex Interweaving Pipeline: 140, 000 polygons each; Average time to perform collision query: 4.2 msec

28 Interference Detection In Action Interactive Interference Detection for a Torpedo on a Pivot Structure – Torpedo has 4780 triangles; Pivot has 44921 triangles; Average time to perform collision query: 100 msec

29 Interference Detection In Action Interactive Interference Detection for a Complex Torus – Torus has 20000 polygons; Environment has 98000 polygons; Average time to perform collision query: 6.9 msec

30 Conclusion New efficient algorithms for hierarchical representation using tight-fitting OBBs. Use of a “ separating axis ” theorem to check two OBBs for overlap in about 100 operations on average. By comparison with AABBs, show that for many close proximity situations, OBBs are asymptotically much faster.


Download ppt "OBBTree: A Hierarchical Structure for Rapid Interference Detection Gottschalk, M. C. Lin and D. ManochaM. C. LinD. Manocha Department of Computer Science,"

Similar presentations


Ads by Google