Elsevier

Computer-Aided Design

Volume 42, Issue 1, January 2010, Pages 50-57
Computer-Aided Design

Efficient collision detection using a dual OBB-sphere bounding volume hierarchy

https://doi.org/10.1016/j.cad.2009.04.010Get rights and content

Abstract

We present an efficient algorithm for collision detection between static rigid objects using a dual bounding volume hierarchy which consists of an oriented bounding box (OBB) tree enhanced with bounding spheres. This approach combines the compactness of OBBs and the simplicity of spheres. The majority of distant objects are separated using the simpler sphere tests. The remaining objects are in close proximity, where some separation axes are significantly more effective than others. We select 5 from among the 15 potential separating axes for OBBs. Experimental results show that our algorithm achieves considerable speedup in most cases with respect to the existing OBB algorithms.

Introduction

Collision detection is one of the most important geometric queries, with diverse engineering applications in areas such as robotics, computer graphics, animation, computer games, virtual reality, simulation and haptic rendering [1]. Because of their importance, collision detection algorithms have been studied for decades [2].

Among many different approaches, the bounding volume hierarchy has proved to be the most successful in contemporary systems [1]. The computation time of this approach can be formulated as follows [3]: T=Nv×Cv+Np×Cp, where

T: total execution time,

Nv: number of bounding volume pair overlap tests,

Cv: time for testing a pair of bounding volumes,

Np: number of primitive pair overlap tests,

Cp: time for testing a pair of primitives.

This formula clearly shows that the performance mainly depends on two factors: the tightness of the bounding volumes and the simplicity of the overlap test for a pair of bounding volumes. The first factor is related to Nv and Np, whereas the second factor is related to Cv.

Spheres [4], [5] and axially aligned bounding boxes (AABBs) [6] allow the simplest overlap tests. On the other hand, oriented bounding boxes (OBBs) [3] and discrete orientation polytopes (k-DOP) [7] fit volumes more tightly. In this paper, we propose a dual scheme that combines the simplicity of spheres and the compactness of OBBs to produce an efficient algorithm.

van den Bergen [8] suggested a simple but rough separation test for OBBs known as SAT lite. By using only 6 of the 15 potential separating axes, SAT lite demonstrates a better performance than the original OBB algorithm that uses all 15 axes [3]. In this paper, similar to the SAT lite, we use a subset of 5 separating axes for OBB overlap test but after a preceding sphere test. The basic idea of our approach is that there are some separating axes which are more effective than others when two OBBs are in close proximity. Below we elaborate more on the geometric intuition behind the selection of effective separation axes.

In the example of Fig. 1(a), two spheres are separated and thus there is no need of OBB overlap test in this case. When two spheres overlap, there are two cases to distinguish. Fig. 1(b) is the case where two OBBs are separated even though two spheres overlap. (Thus there is no need of further collision detection among the object meshes contained in two OBBs.) On the other hand, in Fig. 1(c), two OBBs also overlap and we have to proceed with the remaining steps of collision detection. Now the question is how to efficiently distinguish the separation case of Fig. 1(b) (which allows early rejection from collision detection) from the overlap case of Fig. 1(c) in a situation where two spheres overlap and thus two OBBs are in close proximity.

Fig. 2 shows three orthogonal views of an OBB with a surrounding bounding sphere. As one can see in these views, there are significant differences in the void volumes around an OBB depending on the relative differences in the edge lengths of the OBB. An important observation here is that a bounding sphere has relatively large void volumes near the OBB faces determined by two longer edges (see the upper and lower voids of Fig. 2(a) and (c)). On the other hand, near the OBB faces determined by two shorter edges, the void volumes are relatively small (see the left and right voids of Fig. 2(a) and (b)).

Fig. 3(a) illustrates an example where two spheres overlap but two OBBs are separated by the plane determined by two shorter edges of the green OBB. Since the void volume is small, the penetration depth of two overlapping spheres is shallow. Consequently, when we move the blue box slightly to the left or to the right, the configuration changes immediately to the overlap of two OBBs (Fig. 3(b)) or to the separation of two spheres (Fig. 3(c)), respectively. Thus even if two spheres overlap, testing the separation of two OBBs along the longest edge direction of an OBB has a lower chance of early rejection than other separating axes.

To improve the efficiency of the overall algorithm, it is important to test first the cases of a higher possibility of early rejection. In Fig. 4(a), the relative configuration is similar to Fig. 3(a); however, the penetration depth of two colliding spheres is much deeper. Consequently, the relative configuration remains the same even if we move the blue box relatively far away from the green one (Fig. 4(d)). We can observe similar situations in Fig. 4(b) and (e) and also in Fig. 4(c) and (f). This means that when the sphere test reports an overlap, the cases of Fig. 4(a), (b), (c) have a higher possibility of OBB separation (and thus early rejection) than the case of Fig. 3(a). The separating plane of Fig. 4 is taken to be parallel to the longest edges of two OBBs. Though it is not visually obvious, there are other effective separation axes as well. We will elaborate more on the selection of these effective axes in Section 3.2.

The main contribution of this work can be summarized as follows:

  • A dual OBB-sphere tree is proposed, where each OBB node is enhanced with a bounding sphere. The more efficient sphere test is applied first to eliminate distant objects.

  • We propose a selection of five separation axes that are effective in separating objects which are very close but not overlapping. For a wide range of experiments, the performance improvement has been observed over conventional OBB algorithms.

The rest of this paper is organized as follows. In Section 2, we briefly review the previous work on collision detection. Section 3 presents the basic idea of our approach. In Section 4, we show the performance improvement over conventional algorithms by using several experimental results. Finally, in Section 5, we conclude this paper with discussions on future work.

Section snippets

Related work

In this section, we will briefly review related work on collision detection. The most basic type of collision detection algorithm deals with rigid bodies in static poses. However, many recent studies have looked at more complicated problems, including detecting collisions between deformable models rather than rigid models [9], [10], [11], [12], [13], [14], collision detection in the continuous time domain rather than static pose [15], [16] and collision detection algorithms which can run on

Collision detection algorithm

We will now present an efficient collision detection algorithm for static rigid bodies. We will first describe the construction of a dual OBB-sphere tree and show how the problem can be reduced to a situation of close proximity using a sphere test. Then we will go on to describe the selection of an effective set of axes to deal with the remaining problem.

Experimental results

We have implemented our collision detection algorithm in C++ on an Intel Core Duo 1.66 GHz PC with a 1.5 GB main memory. To demonstrate the performance of our algorithm, we used three heterogeneous scenarios, each applied to different input meshes and position/orientation configurations.

In Scenario I, we employed two Happy Buddha models, each constructed with 15,536 triangles, and located the two models in 229,824 different configurations of relative position and orientation. The different

Conclusions

We have presented a fast OBB-based collision detection algorithm that uses both OBBs and spherical bounding volumes. We have shown how to combine the compactness of OBBs and the efficient overlap test for spheres. Out of the 15 possible separation axes for two OBBs, we have selected 5 axes which detect separation most effectively. Experimental results show that our scheme makes favorable speed up with respect to existing algorithms based on OBBs.

In future work, we plan to introduce a general

Acknowledgment

The authors would like to thank anonymous reviewers for their invaluable comments. The work of Wenping Wang was partially supported by the National Key Basic Research Project of China (2004CB318000), the Research Grant Council of Hong Kong (HKU7178/06E), and the Innovative and Technology Fund of Hong Kong (ITS/ 090/06). This research was also supported in part by the Korea Research Foundation under the Grant KRF-2008-313-D00923.

References (22)

  • T. Akenine-Moller et al.

    Real-time rendering

    (2002)
  • Lin MC, Gottschalk S. Collision detection between geometric models: A survey. In: Proc. of IMA conference on...
  • S. Gottschalk et al.

    OBB-tree: A hierarchical structure for rapid interference detection

  • P. Hubbard

    Collision detection for interactive graphics applications

    IEEE Transactions on Visualization and Computer Graphics

    (1995)
  • I. Palmer et al.

    Collision detection for animation using sphere-trees

    Computer Graphics Forum

    (1995)
  • Beckmann N, Kriegel H-P, Schneider R, Seeger B. The R∗-tree: An efficient and robust access method for points and...
  • J. Klosowski et al.

    Efficient collision detection using bounding volume hierarchies of k-dops

    IEEE Transactions on Visualization and Computer Graphics

    (1998)
  • G. van den Bergen

    Efficient collision detection of complex deformable models using AABB trees

    Journal of Graphics Tools

    (1997)
  • D. James et al.

    BD-tree: Output-sensitive collision detection for reduced deformable models

    ACM Transactions on Graphics

    (2004)
  • L. Kavan et al.

    Fast collision detection for skeletally deformable models

    Computer Graphics Forum

    (2005)
  • Larsson T, Akenine-Moller T. Collision detection for continuously deforming bodies. In: Proc. Eurographics. 2001. p....
  • Cited by (109)

    • The use of virtual reality and augmented reality in oral and maxillofacial surgery: A narrative review

      2024, Oral Surgery, Oral Medicine, Oral Pathology and Oral Radiology
    • Screw rotor manufacturing via 5-axis flank CNC machining using conical tools

      2023, Computer Aided Geometric Design
      Citation Excerpt :

      Conceptually a better solution would incorporate the collision avoidance as a part of the optimization algorithm. However, such an approach would require a special datastructure for fast computation of the footpoints, see e.g. (Chang et al., 2010; Redon et al., 2005), and also an efficient approximation of the point-surface distance, which goes beyond the scope of this paper. Gaps between strips.

    • A novel approach to investigating 3D fracture connectivity in ultrahigh steep rock slopes

      2023, International Journal of Rock Mechanics and Mining Sciences
    • Modeling of short-range interactions between both spherical and non-spherical rigid particles

      2022, Modeling Approaches and Computational Methods for Particle-laden Turbulent Flows
    • Creation of hierarchical structure for computerized ship block model based on interconnection relationship of structural members and shipyard environment

      2022, International Journal of Naval Architecture and Ocean Engineering
      Citation Excerpt :

      However, these configurations are rare in ship block assemblies. Studies related to the bounding volume hierarchy for efficient ray tracing or collision detection have been conducted in the field of computer graphics (Andersen, 2006; Larsson and Akenine-Möller, 2006; Chang et al., 2009). In particular, the hierarchical structure of a 3D object scene was expressed using graph theory and the node clustering concept (Garcia et al., 1999; Zhao et al., 2020).

    View all citing articles on Scopus
    View full text