
OBBTree: A Hierarchical Structure for Rapid Interference Detection S. Gottschalk M. C. Lin D. Manocha Department of Computer Science University of North Carolina Chapel Hill, NC 27599-3175 g fgottscha,lin,manocha @cs.unc.edu http://www.cs.unc.edu/Ägeom/OBB/OBBT.html Abstract: We present a data structure and an algorithm 3. Close Proximity: In the actual applications, the mod- for ef®cient and exact interference detection amongst com- els can come in close proximity of each other and can plex models undergoing rigid motion. The algorithm is ap- have multiple contacts. plicable to all general polygonal models. It pre-computes a hierarchical representation of models using tight-®tting 4. Accurate Contact Determination: The applications oriented bounding box trees (OBBTrees). At runtime, the need to know accurate contacts between the models (up algorithm traverses two such trees and tests for overlaps be- to the resolutionof the models and machine precision). tween oriented bounding boxes based on a separating axis theorem, which takes less than 200 operations in practice. Many applications, like dynamic simulation, physically- It has been implemented and we compare its performance based modeling, tolerance checking for virtual prototyping, with other hierarchical data structures. In particular, it can and simulation-based design of large CAD models, have all robustly and accurately detect all the contacts between large these four characterizations. Currently, fast interference complex geometries composed of hundreds of thousands of detection for such applications is a major bottleneck. polygons at interactive rates. Main Contribution: We present ef®cient algorithms CR Categories and Subject Descriptors: I.3.5 [Com- for accurate interference detection for such applications. puter Graphics]: Computational Geometry and Object They make no assumptions about model representation or Modeling the motion. The algorithms compute a hierarchical repre- Additional Key Words and Phrases: hierarchical data sentation using oriented bounding boxes (OBBs).AnOBB structure, collision detection, shape approximation, con- is a rectangular bounding box at an arbitrary orientation in tacts, physically-based modeling, virtual prototyping. 3-space. The resulting hierarchical structure is referred to as an OBBTree. The idea of using OBBs is not new and many researchers have used them extensively to speed up ray tracing and interference detection computations. Our 1 Introduction major contributions are: The problems of interference detection between two or 1. New ef®cient algorithms for hierarchical representa- more geometric models in static and dynamic environments tion of large models using tight-®tting OBBs. are fundamental in computer graphics. They are also con- sidered important in computational geometry, solid mod- 2. Use of a `separating axis' theorem to check two OBBs eling, robotics, molecular modeling, manufacturing and in space (with arbitrary orientation) for overlap. Based computer-simulated environments. Generally speaking, we on this theorem, we can test two OBBs for overlap in are interested in very ef®cient and, in many cases, real-time about 100 operations on average. This test is about algorithms for applications with the following characteri- one order of magnitude faster compared to earlier al- zations: gorithms for checking overlap between boxes. 3. Comparison with other hierarchical representations 1. Model Complexity: The input models are composed based on sphere trees and axis-aligned boundingboxes of many hundreds of thousands of polygons. (AABBs). We show that for many close proximity sit- uations, OBBs are asymptotically much faster. 2. Unstructured Representation: The input models are represented as collections of polygons with no topol- 4. Robust and interactive implementation and demon- ogy information. Such models are also known as stration. We have applied it to compute all contacts `polygonsoups' and their boundaries may have cracks, between very complex geometries at interactive rates. T-joints, or may have non-manifold geometry. No ro- bust techniques are known for cleaning such models. The rest of the paper is organized in the following man- ner: We provide a comprehensive survey of interference Also with U.S. Army Research Of®ce detection methods in Section 2. A brief overview of the algorithm is given in Section 3. We describe algorithms for ef®cient computation of OBBTrees in Section 4. Sec- Permission to make digital or hard copies of part or all of this work or tion 5 presents the separating-axis theorem and shows how personal or classroom use is granted without fee provided that copies are it can be used to compute overlaps between two OBBs not made or distributed for profit or commercial advantage and that copies very ef®ciently. We compare its performance with hierar- bear this notice and the full citation on the first page. To copy otherwise, to chical representations composed of spheres and AABBs in republish, to post on servers, or to redistribute to lists, requires prior Section 6. Section 7 discusses the implementation and per- specific permission and/or a fee. formance of the algorithms on complex models. In Section © 1996 ACM-0-89791-746-4/96/008...$3.50 8, we discussion possible future extensions. 171 2 Previous Work A simple algorithm for ®nding the overlap status of two OBBs tests all edges of one box for intersection with any Interference and collision detection problems have been of the faces of the other box, and vice-versa. Since OBBs extensively studied in the literature. The simplest algo- are convex polytopes, algorithms based on linear program- rithms for collision detection are based on using bounding ming [27] and closest features computation [14, 21] can be volumes and spatial decomposition techniques in a hier- used as well. A general purpose interference detection test archical manner. Typical examples of bounding volumes between OBBs and convex polyhedron is presented in [16]. include axis-aligned boxes (of which cubes are a special Overall, ef®cient algorithms were not known for comput- case) and spheres, and they are chosen for to the simplicity ing hierarchies of tight-®tting OBBs for large unstructured of ®nding collision between two such volumes. Hierar- models, nor were ef®cient algorithms known for rapidly chical structures used for collision detection include cone checking the overlap status of two such OBBTrees. trees, k-d trees and octrees [31], sphere trees [20, 28], R- trees and their variants [5], trees based on S-bounds [7] etc. Other spatial representations are based on BSP's [24] and 3 Hierarchical Methods & Cost Equa- its extensions to multi-space partitions [34], spatial repre- sentations based on space-time bounds or four-dimensional tion testing [1, 6, 8, 20] and many more. All of these hierarchi- cal methods do very well in performing ªrejection tests", In this section, we present a framework for evaluating hier- whenever two objects are far apart. However, when the archical data structures for interference detection and give two objects are in close proximity and can have multiple a brief overview of OBBTrees. The basic cost function contacts, these algorithms either use subdivisiontechniques was taken from [35], who used it for analyzing hierarchical or check very large number of bounding volume pairs for methods for ray tracing. Given two large models and their potential contacts. In such cases, their performance slows hierarchical representation, the total cost function for inter- down considerably and they become a major bottleneck in ference detection can be formulated as the following cost the simulation, as stated in [17]. equation: In computational geometry, many theoretically ef®cient T = N C + N C ; v p p v (1) algorithms have been proposed for polyhedral objects. Most of them are either restricted to static environments, where convex objects, or only polyhedral objects undergoing rigid motion [9]. However, their practical utility is not clear as T : total cost function for interference detection, N many of them have not been implemented in practice. Other v : number of bounding volume pair overlap tests C approaches are based on linear programming and comput- v : cost of testing a pair of bounding volumes for overlap, N ing closest pairs for convex polytopes [3, 10, 14, 21, 23, 33] p : is the number primitive pairs tested for interference, C and based on line-stabbing and convex differences for gen- p : cost of testing a pair of primitives for interference. eral polyhedral models [18, 26, 29]. Algorithms utilizing spatial and temporal coherence have been shown to be effec- Given this cost function, various hierarchical data struc- tive for large environments represented as union of convex tures are characterized by: polytopes [10, 21]. However, these algorithms and systems Choice of Bounding Volume: The choice is governed are restrictive in terms of application to general polygo- by two con¯icting constraints: nal models with unstructured representations. Algorithms based on interval arithmetic and bounds on functions have 1. It should ®t the original model as tightly as possible N N p been described in [12, 13, 19]. They are able to ®nd all (to lower v and ). the contacts accurately. However, their practical utility is not clear at the moment. They are currently restricted to 2. Testing two such volumes for overlap should be as fast C objects whose motion can be expressed as a closed form as possible (to lower v ). function of time, which is
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages10 Page
-
File Size-