An Improved Fast Collision Detection Algorithm for Human Models Based on Hybrid Bounding Boxes

An Improved Fast Collision Detection Algorithm for Human Models Based on Hybrid Bounding Boxes

Xuezhi Yue, Ye Fan, Yuan Zeng, Weitao Fan, Luhui Zhou
DOI: 10.4018/IJCINI.345655
Article PDF Download
Open access articles are freely available for download

Abstract

This article analyzes the commonly used collision detection methods in game engines and designs a hybrid bounding box structure that is more suitable for human models based on their motion characteristics. In addition, this article also optimized the collision response algorithm after the system detects collisions, making the collision response process faster. Through experimental analysis, this approach has a good effect in addressing the problem of model penetration caused by continuously changing the model posture in shooting games; it also avoids the game fairness problem caused by model penetration and improves the realism of the game's virtual environment.
Article Preview
Top

Principle And Implementation Of The Collision-Detection Method

Overview of the Collision-Detection Problem

The collision problem involves both collision detection and collision response. There are moving objects in the virtual environment that may collide with each other during their motion, and the accurate detection of these collisions and the correct response have a crucial impact on the realism of the virtual environment. Among them, the hierarchical bounding box algorithm is more widely used because it is very suitable for collision detection in complex environments. The hierarchical bounding box method is further divided into the sphere-detection algorithm, the axis-aligned bounding boxes (AABB) detection algorithm, the oriented bounding box (OBB) detection algorithm, the discrete orientation polytopes (k-DOP) detection algorithm, and other methods. These algorithms have their own characteristics and are widely used in different applications (Garcia et al., 1994). A simple illustration of the above types of bounding boxes is shown in Fig. 2.

Figure 2.

Four Common Types of Bounding Box in a Two-Dimensional Plane (Note. The construction method of bounding boxes in two-dimensional and three-dimensional spaces is slightly different, and the effect in the two-dimensional plane is only used as a demonstration in the figure)

IJCINI.345655.f02

The different bounding boxes require different system resources because of the different construction and detection methods (Chen et al., 2005). The cost of collision-detection algorithms based on the hierarchical representation of bounding boxes can be expressed in general terms by the following cost function:

T=Nv×Cv+Np×Cp+Nu×Cu+Cd(1)

In (1), T is the total collision-detection cost equation, Nv is the number of pairs of bounding boxes involved in the overlapping trials, Cv is the cost of a pair of trials with overlapping envelopes, Np is the number of geometric basis element pairs tested, Cp is the cost of testing a pair of geometric basis elements, Nu is the number of wrappers that must be updated when an object is rotated, Cu is the cost of updating a bounding box, and Cd is the cost of updating the tree of the bounding box when the object is deformed into a shape. Table 1 compares the comprehensive performance of the bounding boxes.

Table 1.
Comparison of Four Common Functions of Bounding Boxes
TypeDifficulty of ConstructionCompactnessTime Consumption
Sphere
1
1
1
AABB
1
2
2
OBB
3
3
4
k-DOP243

Note. The larger the number in the table, the more difficult, dense, and time-consuming it is to construct this type of bounding box.

AABB and sphere detection are less difficult to construct but less compact. Sphere detection does not need to be updated when the object is rotated or displaced, while AABB needs to recalculate the enclosed set of objects to update the new bounding box. In addition, both sphere and AABB detection need to be recalculated and updated when the object is deformed. In contrast, OBB and k-DOP are relatively difficult to construct. OBB needs to find the optimal direction before constructing the bounding box, while the direction of k-DOP is fixed in the k axes. In the case of object deformation, both OBB and k-DOP must reconstruct the bounding box, so OBB has some disadvantages for complex polygonal objects.

Complete Article List

Search this Journal:
Reset
Volume 18: 1 Issue (2024)
Volume 17: 1 Issue (2023)
Volume 16: 1 Issue (2022)
Volume 15: 4 Issues (2021)
Volume 14: 4 Issues (2020)
Volume 13: 4 Issues (2019)
Volume 12: 4 Issues (2018)
Volume 11: 4 Issues (2017)
Volume 10: 4 Issues (2016)
Volume 9: 4 Issues (2015)
Volume 8: 4 Issues (2014)
Volume 7: 4 Issues (2013)
Volume 6: 4 Issues (2012)
Volume 5: 4 Issues (2011)
Volume 4: 4 Issues (2010)
Volume 3: 4 Issues (2009)
Volume 2: 4 Issues (2008)
Volume 1: 4 Issues (2007)
View Complete Journal Contents Listing