You are on page 1of 10

A Simple and Efficient Method for Accurate Collision Detection

Among Deformable Polyhedral Objects in Arbitrary Motion

Andrew Smith Yoshifumi Kitamura Haruo Takemura* Fumio Kishino


ATR Communication Systems Research Laboratories
2-2 Hikaridai, Seika,-cho, Soraku-gun, Kyoto, 619-02, Japan
<asmith, kitamura. kishino>Qatr-sw.atr.co.jp

Abstract t,here is a collision [3]. The average time complexi-


We propose an accurate collision detection algonth- ty for this test (for R objects) is O(n’EF)! where E
m for use in virtual reality applications. The algo- and P are the number of edges and faces m the av-
rithm works for three-dimension,al graphical environ- erage object. As can be seen from this complexity
ments where multiple objects, represented as polyhedra figure, the problem lies in the necessity of having to
(boundary representation), are undergoing arbitrary perform such a large number of computationally ex-
motion (translation and rotation). The algorzthm can pensive intersection tests at every time instant, where
be used directly for both convex and concave objecis the number of such tests increases quadratically as the
and objects can be deformed (non-rigid) during mo- number and complexity of objects increase. For any-
tion. The algorithm works eficzently by first reducrng thing more than a simple world with a few objects of
the number of face pairs that need to be checked accu- a few hundred faces each, this method is untenable in
rately for interference by first localizzng possible collz- terms of maintaining real-time performance.
sion regions using bounding box and spatzal subdzvzsloll The main problem with the basic, naive collision
techniques; face pairs that remain, after this pruning detection method is that it requires such a large num-
stage are then accurately checked for rnterference. The ber of computationally expensive edge-face intersec-
algorithm is eficient, simple to amplement, and does tion checks. In an actual virtual world, the number of
not require any memory intensive avxilznry data struc- edge-face pairs that intersect at any time instant is a
tures to be precomputed and updated. Since polyhedral small percent,age of the total number of possible pairs
shape representation is one of the most common shape (in fact, much of the time there are no intersection-
representation schemes, this algorithm should be use- s). Thus, it is desirable to have a collision detection
ful to a wide audience. Performance results are grven algorithm which checks a number of edge-face pairs
to show the eficiency of the proposed method. proportional to the number that actually intersect. In
this paper, we present an algorithm that realizes this
1 Introduction and can be used for general (i.e., the environment can
contain both convex and concave objects), deformable
In a virtual environment, we can simulate various polyhedral objects undergoing arbitrary motion.
kinds of physical phenomena. An important example The remainder of the paper is organized as follows.
of this is being able to determine when moving objects The next section discusses other research efforts to-
collide; this is called the “collision detection problem.” wards efficient collision detection. After that, the de-
It is vitally important to be able to update a virtu- tails of our collision detection algorithm are described.
al environment at real-time rates to engender realism Next, experiments carried out using our algorithm are
for a user. Unfortunately, current collision detection described, and performance results, showing the effi-
algorithms, if used, are an enormous bottleneck and ciency of the approach, are given. Finally, the last
make real-time update impossible [l, 21. The difficul- section concludes the paper.
ty of collision detection for polyhedral objects can be
~ecn by examining the basic, naive way of perform- 2 Efficient Collision Detection Ap-
ing it. The basic method works by performing static proaches
intersection tests at discrete time instants; the time in-
terval between tests is assumed small enough so that There is much literature devoted to efficient colli-
collisions are not missed. Then, interference among sion detection approaches and this section discusses
polyhedral objects at a time instant is detected by this research. The first subsection simply describes
testing all combinations of faces and edges for the p- other approaches to efficient collision detection. Then,
resence of an edge of one object piercing the face of the last two subsections evaluate these other approach-
another object,; if such an edge-face pair exists then es, describing the problems with them which make
them not entirely suitable for practical, large-scale vir-
*Currently with the Nara Institute of Science and Technol- tual environments and how our algorithm addresses
ogy, Japan (takemura~is.aist-nara.ac.jp) these problems.

136
O-8156-7084-3/95 $04.00 0 1995 IEEE
Authorized licensed use limited to: Universitaetsbibliothek der RWTH Aachen. Downloaded on October 24,2023 at 21:28:50 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Virtual Reality Annual International Symposium (VRAIS '95)
0-8186-7084-3/95 $10.00 © 1995 IEEE
2.1 Related Collision Detection Research such as intersection, union, etc., on polyhedra by lo-
calizing the regions where faces are using spatial sub-
Much research on collision detection for polyhedra division techniques; a set operation for a face then
aims to drastically reduce the number of edge-face only needs to be done against the other faces inside
pairs that need to be checked for intersection. A com- the region that, the face is in. As a particular exam-
mon first step in many collision detection routines is an ple, the idea of intersecting faces with overlap regions
approximate bounding region (usually an axis-aligned of bounding boxes in order to localize the interference
box or a sphere) overlap test to quickly eliminate many region of two objects was first described in [23] and
objects as not interfering. An extension of this idea we use this idea effectively in our algorithm.
is to use a hierarchy of bounding regions to localize
collision regions quickly [a]. Related methods use oc- 2.2 Evaluation
trees and voxel sets. [4] stores a voxel data structure
with each object, with pointers from voxels to polyhe- We evaluate the above algorithms on the basis of
dra faces that intersect them. Collision is localized by four properties of a collision detection algorithm nec-
testing for intersection of voxels between two objects. essary for effective use in a practical, large-scale vir-
[5] stores an octree for each object and, at each time tual environment inhabited by humans. These are the
ability to handlle deformable (non-rigid) objects, the
instant, checks the interference of objects’ updated oc-
trees; face pairs from inside of interfering octree nodes ability to handle concave objects, not using excessive
amounts of memory for storing auxiliary data struc-
are then checked for collision. Other voxel and octree
methods include [6-lo]. tures, and having better than O(n2) complexity for n
objects in the world. None of the algorithms surveyed
Another method for collision detection involves
in the previous subsection has all four properties and
keeping track of the distance between each pair of ob-
some do not even have one of them. Our algorithm
jects in the world; if the distance between a pair goes can satisfy all four of these properties.
below some small threshold then the pair has collided.
A noteworthy use of this idea for collision detection of
rigid, convex objects is [ll], where coherence of object- 22.1 Deforlmable Objects
s between time instants (i.e., object positions change
only slightly) and the property of convex polyhedra In a virtual environment inhabited by humans, it is
are used to detect collisions among objects in roughly very important, to be able to perform collision detec-
constant time per object pair. Other research which tion for objects which deform during motion. For ex-
uses this distance based approach include [12,13]. ample, in plhysical-based simulations forces between
Briefly, some other approaches to collision detec- colliding objects are determined and the colliding ob-
tion are as follows. [14] uses a data structure called jects are then deformed based on these forces. In gen-
a “BRep-Index” (an extension of the well-known B- eral, a user should be allowed to deform objects in a
SP tree) for quick spatial access of a polyhedron in virtual environ.ment, which necessitates collision de-
order to localize contact regions between two objects. tection for deformable objects. Many of the above
[15] finds separating planes for pairs of objects; using algorithms require precomputation and computation-
object coherence, these separating planes are cached ally expensive updating of auxiliary data structures
and then checked at succeeding time instants to yield (e.g., octrees, voxel sets, BRep-indices, etc.) for each
a quick reply of non-collision most of the time. [16] object. This limits their usefulness because it means
uses ideas from the z-buffer visible surface algorith- that objects are essentially limited to being rigid; this
m to perform interference detection through rasteri- is because when an object deforms, its auxiliary data
zation. [17] uses back-face culling to remove roughly structures must be recomputed and this is usually an
half of the faces of objects from being checked for de- expensive operation. Our collision detection algorith-
tailed interference; the basic idea is that polygons of m handles deformable objects.
a moving object which do not face in the general di-
rection of motion cannot possibly collide. [18] uses a 2.2.2 Auxili.ary Data Structures
scheduling scheme, whereby object pairs are sorted by
distance and only close objects are checked at each In addition to being expensive to recompute, storing
time instance. [19] uses four dimensional space-time auxiliary data structures for each object can take up
bounds to determine the earliest time that each pair considerable memory. This limits the number of ob-
of objects could collide and does not check the pair jects for which such algorithms can be effectively used.
until then. [l] models objects as superquadrics and Our algorithm does not require any auxiliary data
shows how collision detection can be done efficiently structures beyond simple bounding boxes and arrays.
using the inside/outside function of a superquadric.
For coarse collision detection, [20] stores bounding re- 2.2.3 Concawe Objects
gions of objects in a stack of 2D structures similar
to quadtrees (to reduce memory use) and uses only Another pro’blem is that some of the above collision
bit rnanipulations to add or delete objects to this (to detection algorithms require objects to be convex [ll-
reduce computation). 13,151. However, it is clear that most objects of in-
Finally, our algorithm uses ideas from methods for terest in the real-world are concave and a virtual en-
localized set operations on polyhedra [21,22]. These vironment, to be useful, should allow concave objects.
methods attempt to perform efficiently set operations, To solve this; problem, the above authors argue that a

137
Authorized licensed use limited to: Universitaetsbibliothek der RWTH Aachen. Downloaded on October 24,2023 at 21:28:50 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Virtual Reality Annual International Symposium (VRAIS '95)
0-8186-7084-3/95 $10.00 © 1995 IEEE
concave object can be modeled as a collection of con- describes how this is useful for operator assistance)
vex pieces. While this can in fact be done for any among object,s [16! 1%201. While most of the algo-
concave object, it adds many fictitious elements (i.e.. rithms described above are clearly improvements over
vertices, edges, etc.) to an object. In addition, break- the basic. naive collision detection algorithm, none of
ing a concave object up into convex pieces means that them provide a solution to the problem that is as gen-
the one object becomes many objects; unfortunately, era!, efficient, and simple as ours. The details of our
this greatly worsens the complexity problem described colhslon detection algorithm are presented next.
in the next section (because each convex piece of the
concave object must be treated as a separate object 2.3 Proposed Algorithm
for the purposes of collision detection). Most impor-
tantly, however, any algorithm that requires objects to Our proposed algorithm is an extension of the
be convex or unions of convex pieces cannot be used methods for localized set operations for use in collision
to detect collisions for deformable objects; this is be- detection. In particular, we extend the ideas in [21~23]
cause, in general, deformations of an object easily lead to a world with multiple objects; these papers describe
to concavities. Our algorithm deals directly with con- algorithms for 2 objects but never precisely explain
cave objects in the same way as convex ones, with no how to extend their algorithms efficiently to handle
extra computational overhead. multiple objects (thus, direct use of these algorithms
requires O(~L~) complexity for n objects). In addition,
t,hese algorithms, in testing for intersection between a
2.2.4 Complexity face and an axis-aligned box (while performing spa-
The O(n2) complexity problem becomes apparent for tial subdivision), advocate using an approximate test
large-scale virtual environments. [l] discusses prob- between the bounding box of the face and the axis-
lems due to computational complexity in computer- aligned box; however, in developing our algorithm we
simulated graphical environments and notes that col- found that, using the exact intersection test described
lision detection is one such problem for which, in order in a later section (section 3.7) gave better performance
to simulate realistically complex worlds, algorithms (because it reduces the number of edge-face pairs even
which scale linearly or better with problem size are more; without much of an added computational cost).
needed. To understand the problem concretely, con- Also. these algorithms are used for performing static
sider a collision detection algorithm that takes 1 mil- set operations; we show how they can be used for col-
lisecond per pair of objects. While for very small en- lision detection in a dynamic environment with mul-
vironments this algorithm is extremely fast, the algo- tiple moving objects. Finally, we provide empirical
rithm is impractical for large-scale environments. For evidence to show the efficiency of the proposed algo-
example, for an environment with just .50 objects 1225 rithm. The next section describes the details of our
pairwise checks between objects must be done, taking proposed collision detection algorithm.
more than a second of computation; in this example,
real-time performance cannot be maintained for en-
vironments with more than 14 objects (being able to
3 Collision Detection Algorithm
compute something in 100 milliseconds or less is con-
sidered to be real-time performance [24]). All of the 3.1 Assumptions
distance based approaches [ll-131 and many of the All objects in the world are modeled as polyhedron
others [1,4,15] suffer from this complexity problem. (boundary representation). The faces of a polyhe-
In our experiments, we did use a bounding box test dron are assumed to be triangular patches without
among objects which is O(n2) for n objects. However, any loss of generality of range of representation. Ob-
the bounding box test between two objects is extreme- jects can be concave or convex. The objects are un-
ly fast and thus should not become a bottleneck unless dergoing motion which is not predetermined (e.g., a
there are many objects in the environment; for such user can move his graphical hand in a sequence of
an environment, however, the problem can be easily non-predetermined, jerky motions); object motion can
solved by using a bounding box check with better com- be both translation and rotation. Objects can be de-
plexity ([25] describes such a method) or by skipping formed during motion. Given this kind of environmen-
the bounding box stage altogether and going directly t,. the goal is to be able to detect the colliding objects
to the face octree spatial subdivision stage which is in the world and, in particular, the face pairs, between
O(n) for n objects. objects that arc interfering. Collision will be checked
for all objects at discrete time instants (i.e., at each
2.2.5 Other t,ime instant the new positions of objects will be deter-
mined, and collision will be checked for at that time
A few other minor problems with the surveyed alga instant before the computer graphic images of the ob-
rithms are as follows. Some of these algorithms [l: 71 jects are drawn to the screen). It is assumed that the
cannot be used for polyhedra, which limits their use- speeds of objects are sufficiently slow compared with
fulness for current graphical applications where poly- the sampling interval so that collisions are not missed.
hedra dominate as the object representation. Some of Finally, it is assumed that there is a large cube which
the algorithms do not provide accurate collision de- completely bounds t&heworld (i.e., that all objects will
tection (i.e., identify exactly which object,s are inter- stay inside of this cube); let the side length of this
fering and which faces of the objects interfere- [5] cube be L.

Authorized licensed use limited to: Universitaetsbibliothek der RWTH Aachen. Downloaded on October 24,2023 at 21:28:50 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Virtual Reality Annual International Symposium (VRAIS '95)
0-8186-7084-3/95 $10.00 © 1995 IEEE
3.2 Outline of the Method 3.3 Approximate Interference Detection
Using Bounding Boxes
Figure 1 shows the control flow of our method. Sup-
pose there are n objects in the workspace. The bound- At every time instant, axis-aligned bounding boxes
ing boxes for each object are updated periodically (at are computed for all objects and all pairs of objects
discrete time instants , ti-1, ti, &+I, .) using are compared for overlap of their bounding boxes. For
observed object motion parameters. Updated bound- each pair of objects whose bounding boxes overlap, the
ing boxes are checked for interference. For each object intersection between the two bounding boxes is deter-
with an interfering bounding box all overlap regions of mined (called an overlap region as shown in Figure 2)
the object’s bounding box with other objects’ bound- and put into ,a list of overlap regions for each of the
ing boxes are determined. Next, for each such object two objects. The overlap regions are passed to the
all faces of the object are checked for intersection with next step.
the overlap regions of the object; a list of the objec-
t’s faces which intersect one or more of the overlap
regions is stored. Then, if there is a list of faces for
more than one object, a face octree (i.e., an octree
where a node is black if and only if it intersects faces)
is built for the remaining faces (for all objects’ face
lists, together), where the root node is the world cube
of side length L and the face octree is built to some us-
er specified resolution. Finally, for each pair of faces
which are from separate objects and which intersec-
t the same face octree voxel (i.e., smallest resolution
cube) it is determined whether the faces intersect each
other in three-dimensional space. In this way, all inter-
fering face pairs are found. Note that the intersection
of faces with overlap regions and face octree stages
repeatedly test for intersection of a face with an axis-
aligned box; thus, we describe an efficient algorithm Figure 2: An overlap region
for testing this intersection.

3.4 Determination of Faces Intersecting


Overlap Regions
1
extraction of rotation and trawhtion For every object which has a list of overlap regions,
all faces of the object are compared for intersection
interference test using bounding boxes with the overlap regions. Once a face of an object is
determined to be intersecting with at least one overlap
region it is Iplaced in a face check list for the object. If
there are face check lists for two or more objects then
these are passed on to the next stage. Figure 3 shows
generation of overlap regions
an example of faces intersecting an overlap region.
, ..___.._. _. _______
.
determination of faces j
i intersecting overlap regions i

z
_.I
p;:.

,._..$.’ i
generation of face octree* i...’‘ -,,____
:
~ .._............ . .._.....1 _._...~‘~
; interference test using face octrees ; Y
X
~

Figure 3: Faces intersecting the overlap region

face pair interference test j


3.5 Face Octree Spatial Subdivision Stage
interfering? No j A face octree is built down to a user specified reso-
3tic lution for the remaining faces starting from the world
~~
: . v.!? ,.....................i “a!
cube of side length L as the root. To minimize com-
lI
putation, only as much ,of the face oct,ree as is nec-
essary for collision detection is built; in particular, a
Figure 1: Control flow of collision detection.
parent node is subdivided into its 8 children only if
it contains faces from two or more objects, and only

139

Authorized licensed use limited to: Universitaetsbibliothek der RWTH Aachen. Downloaded on October 24,2023 at 21:28:50 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Virtual Reality Annual International Symposium (VRAIS '95)
0-8186-7084-3/95 $10.00 © 1995 IEEE
the faces which were found to intersect the parent n 3.7 Efficient Triangular Patch and Axis-
ode are tested for intersection with the children nodes. Aligned Box Intersection Determina-
Also, there is no condensation of the face octree (i.e., 8 tion
bla.ck child nodes are not erased and replaced by their
single, black parent node). If there are voxels in the To determine whether or not a triangular patch in-
face octree, then in each voxel t,here are faces from two tersect,s with an axis-aligned box, we perform clipping
or more objects. For each voxel, all possible pairs of against 4 of the face planes of the faces that comprise
faces, where the faces are from different objects,, are the box: the 4 face planes are the maximum and mini-
determined and put into a face pair checklist. Howev- mum estents of two of the three x,y,z dimensions (e.g.,
er, a face pair is only put into this face pair checklist in our implementation we arbitrarily chose to clip a-
if it was not previously put there by examination of gainst the maximum and minimum x extents and the
another voxel. The face pair checklist is then passed maximum and minimum y extents). For the final di-
to the next stage. Note t,hat it is not necessary to al- mension, it is only necessary to check whether or not
locate memory and actually build a face octree; faces the remaining vertices of the clipped triangular patch
can simply be checked for intersection with the st,an- are either all greater than the maximum extent or all
dard cubes of an octree and checked recursively for less than the minimum extent; if either case is true
lower-level cubes (thus no memory, beyond the small then there is no intersection, otherwise there is inter-
amount used by the stack during recursion, for st,oring section. In addition, it is often not even necessary to
octrees is necessary). Also note that a face octree is clip against four planes. During clipping, whenever
built for only a very small portion of all the faces; the the intersection point of a segment with the curren-
previous stage eliminates most faces as not interfering. t face pla.ne is calculated this point can be quickly
checked to see if it is inside of the face of the face
3.6 Face Pair Interference Check plane; if it is inside, then the triangular patch and
A pair of faces is checked for intersection at a time box intersect and no more computation needs to be
instant as follows. First, the bounding boxes of the done. Finally, before performing any clipping at all,
faces are computed and checked for overlap; if there two quick tests are done. As a first step, a quick over-
is no overlap in the bounding boxes then the faces do lap check between the bounding box of the triangular
not intersect. Otherwise, the plane equation of the patch and the axis-aligned box can be done to quickly
face plane of the first face is computed and the ver- determine non-intersection in many cases. Second, the
tices of t,he second face are evaluated in this equation; three vertices of the triangular patch can be checked
if all vertices lead to the same sign (+ or -) then the to see if one of them is inside of the axis-aligned box;
second face is completely on one side of the face plane if so, then the triangular patch and axis-aligned box
of the first face and thus there is no intersection. The intersect.
plane equation of the face plane of the second face
is then determined and the vertices of the first face 4 Experilnents
are evaluated in it in the same way. If neither face is The algorithm and an experimental environmen-
found to be completely on one side of the face plane of t were implemented and run on a Silicon Graphics
the other face, then more detailed checks are done as Indigo’ (this has an R4400/150 MHz processor); ex-
follows. For each edge, in turn, of face 1 the intersec- periments were done to determine the efficiency of the
tion point of it with the face plane of face 2 is found proposed algorithm. In all experiments described in
and checked to see if it is inside face 2 (i.e., three- this section, face octrees were built to resolution level
dimensional point-in-polygon check-the method used 6.
is described in [26]); if the point is inside the face
then the two faces intersect. The case when an edge 4.1 Standardized Objects
and face plane are coplaner is handled by projecting For performance evaluation, sphere-like objects ap-
the edge and face onto the two-dimensional coordinate proximated by differing numbers of triangular patches
axis most parallel to the face plane and performing a were used; spheres were selected for testing because of
two-dimensional intersection check between the pro- their orientation invariance. Figure 5 shows some of
jected face and edge. In the same way, the edges of the spheres which were used in the experiments. The
face 2 are checked for intersection with face 1. If no basic experiment done was to have two identical sphere
edges of either face are found to intersect the other objects start at different (non-penetrating) positions
face, then the two faces do not intersect. and have them move towards each other (with both
translation and rotation motion) until they interfere.
This basic experiment was done with sphere object-
s having respectively 8, 10, 24, 48, 54, 80, 120, 168,
224, 360, 528, 728, 960, and 3968 triangular patch-
es. Figure 6 shows the computation time required at
each processing cycle from t = l(cycle), when there is
no interference, until t = 72(cycle), when faces from
the two sphere objects are found to be intersecting,
for four of t,he experimental sphere objects; at the last
Figure 4: Face pair intersection test. cycle, 70, 24, 16, and 11 milliseconds of computation
are required to determine the colliding faces for the

140

Authorized licensed use limited to: Universitaetsbibliothek der RWTH Aachen. Downloaded on October 24,2023 at 21:28:50 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Virtual Reality Annual International Symposium (VRAIS '95)
0-8186-7084-3/95 $10.00 © 1995 IEEE
spheres with 3968, 960, 528, and 168 faces. Final-
ly, figure 7 shows the computation required at the computation time (milliseconds)

last stage (i.e., when faces from the two objects are 70
found to be interfering-this requires maximum com-
putation and is the true measure of the efficiency of
a collision detection algorithm) of the proposed colli-
sion detection algorithm between two sphere objects
against the number of triangular patches of the sphere
objects.

0 1000 2006 3000 4000


number of faces

Figure 7: Computation time at the last stage of


the proposed collision detection between two identical
Figure 5: Examples of experimental objects sphere objects against the number of planar patches
dardized spheres with different numbers of of the objects.

computation time (milliseconds) jects. Specifically, 15 identical objects (space shuttles


with 528 triangular patches-see figure 9) were moved
70 (both translation and rotation) in the test environ-
I ment for many processing cycles and the computation
60
time required at each cycle to perform collision de-
tection was measured. At every cycle, many objects’
bounding boxes were overlapping; thus, many trian-
gular patches had to be tested for intersection with
overlap regions at every cycle. At the last cycle of the
test, faces from two objects were found to be interfer-
ing, taking 31 milliseconds of computation. Figure 8
shows the results of this experiment. Also in this fig-
ure, in order to provide a basis for comparison, are the
results for when only the two interfering space shuttle
objects are in the test environment; here, the last step,
where faces are determined to be colliding, required 16
milliseconds of computation.

4.3 Comparison Against Competing Al-


I gorit h:ms
0 20 40 60
In order to show that our algorithm is truly effi-
t (cycle) cient, we directly compared the performance of our
algorithm against two other competing algorithms. In
Figure 6: Computation time for each processing cycle general, it is difficult to make such direct comparisons
for two identical sphere objects with 168, 528, 960 and because authors of collision detection papers do not
3968 faces. normally give out the code that they used to get ex-
perimental results. Fortunately, however, we found
the C language code for the first competing collision
4.2 Multiple General Objects
detection algorithm in [27], and the second compet-
An experiment was also done with multiple gen- ing algorithm is a slight modification of the algorithm
eral (i.e., concave-a real-world type of object) ob- proposed in this paper.

141

Authorized licensed use limited to: Universitaetsbibliothek der RWTH Aachen. Downloaded on October 24,2023 at 21:28:50 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Virtual Reality Annual International Symposium (VRAIS '95)
0-8186-7084-3/95 $10.00 © 1995 IEEE
cached. If no new separating plane can be found then
computation time (milliseconds)
there is collision. Note that the complexity for this
15 shuttles
test (for n objects) is O(n’).
Lye compared our algorithm against this competing
algorithm for environments containing differing num-
bers of same sphere objects (528 triangular patches).
25 I In particular, we tested both algorithms in environ-
ments with 10, 20, 30, and 40 moving sphere objects;
at the last cycle of the tests two of the sphere ob-
20 ~’
jects were interfering. For 10 sphere objects, our al-
gorithm performed roughly the same as the compet-
15
2 shuttles ing algorithm; in particular, our algorithm required
16 milliseconds of computation at the last cycle, while
the competing algorithm required approximately 10
milliseconds per cycle. However, for 20, 30, and 40
objects our algorithm performed better. In particu-
lar, for 20: 30, and 40 objects, our algorithm required
21, 22. and 41 milliseconds at the last cycle; against
this. the competing algorithm required approximately
35, 76, and 140 milliseconds per cycle. The results of
these experiments can be seen in figure 10 (the com-
peting algorithm’s times are drawn with dotted lines,
while the proposed algorithm’s are drawn with solid
lines).
Figure 8: Computation time at each processing cy-
cle for 15 space shuttle objects-collision between two 4.3.2 Octree Update Algorithm
objects is detected at the last cycle.
The second competing algorithm [28] is a slight mod-
ification of the algorithm proposed in this paper, and
is representative of the bounding region hierarchy, oc-
tree and voxel approaches described in the section on
related work (section 2). Essentially, the modifica-
tion is to precompute complete face octrees for all of
the polyhedral objects, and to store a list for each
black node of the faces which intersect that black n-
Figure 9: The space shuttle experimental object (528 ode. Then, the proposed collision detection algorith-
triangular patches). m is modified as follows. Instead of determining the
polyhedral faces which intersect with overlap region-
s, the octree update algorithm determines the black
4.3.1 Separating Plane Algorithm nodes from the precomputed face octrees which inter-
sect with the overlap regions; these intersecting black
The first competing algorithm is based on ideas from nodes are then put into a “node check list” (as opposed
[la] and [15]. This algorithm can only be used for to a “face check list”). Then, in the next stage (face
convex, rigid objects and it does not return the list of octree spatial subdivision stage), instead of creating
face pairs that are interfering, as ours does. Thus. it is a face octree by testing for intersections between the
not completely fair to compare our algorit,hm against polyhedral faces in the face check list and the stan-
this algorithm because our algorithm is more general dard octree nodes, the octree update algorithm build-
and gives more complete collision analysis. Even so) s an octree by testing for intersections between the
however, our algorithm gives better performance for transformed (i.e., using the same transformation ma-
non-trivial virtual environments. trix as for the polyhedral objects) black nodes of the
The details of this competing algorithm are given node check list and the standard octree nodes. Final-
in [27]. However, briefly, the algorithm works by ini- ly, for each standard octree voxel which was found to
tially finding a separating plane between each pair of contain transformed black nodes from more than one
objects. A separating plane is found for two objects object, all unique pairs of faces, where the faces are in-
by finding the two closest vertices on the two objects side a precomputed face list of one of the transformed
(using the method in [la]); the vector between these black nodes and the faces are from different objects,
two points is the normal vector of the plane and the are enumerated and checked for intersection (using the
plane passes through one of the two points. Separat- method described in section 3.6). Basically, the octree
ing planes are cached between time instants and the update algorithm substitutes precomputed face octree
previous time instant’s separating plane is checked at black nodes for faces in checking for intersection with
the current time instant to see if it still separates the overlap regions and standard octree nodes. Note that
two objects; if it no longer separates then an attempt this algorithm can be used for concave objects, but
is made to find a new separating plane, which is then that objects must be rigid; thus, it is not as general

142

Authorized licensed use limited to: Universitaetsbibliothek der RWTH Aachen. Downloaded on October 24,2023 at 21:28:50 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Virtual Reality Annual International Symposium (VRAIS '95)
0-8186-7084-3/95 $10.00 © 1995 IEEE
as the proposed algorithm. we have made a start towards such research with our
We tested the proposed algorithm against this com- comparisons atgainst two competing algorithms. How-
peting algorithm for the environment of figure 12; ever, more comprehensive research, which does more
this environment contains a sphere (120 faces), a s- complete comparisons and which tests variations and
pace shuttle (528 faces), a chair (146 faces), and a combinations of the various algorithms in situation-
Venus head (1816 faces). The experiment that was s that mimic real applications, is necessary. For the
performed was to move the Venus head and the space time being, however, we feel that, considering the gen-
shuttle towards each other (with translation and ro- erality of our algorithm, its ease of implementation, its
tation) until they collided at the last cycle; the other small memory requirements, and its proven efficiency,
two objects also translated and rotated slightly (with- we have provided a practical solution to the problem
out any collision). The proposed algorithm performed of real-time collision detection.
much better than the competing algorithm for all cy-
cles after cycle 17 (when bounding boxes first over- 6 Conclmion
lapped); in particular, at the last cycle the competing In this paper, we have presented an efficient algo-
algorithm required 161 milliseconds of computation, rithm for a.ccurate collision detection among polyhe-
while the proposed algorithm required only 11 mil- dral objects. The algorithm can be used for both con-
liseconds (roughly 16 times better performance). Fig- vex and concave objects; both types of objects are
ure 11 shows the results of this experiment. dealt with in the same way and there is no perfor-
mance penalty for concave objects. The algorithm can
5 Discussion be used for objects whose motion is not prespecified,
As can be seen from the various graphs given, our and both translation and rotation motion are allowed.
collision detection algorithm is quite efficient. A com- The algorithm can also be used for objects that defor-
mon definition for “real-time” performance of a com- m during mot,ion. Thus, the algorithm is very gener-
puter graphics application is being able to render 10 al. The algorithm is fairly straightforward and should
frames per second [24]. Using this definition, our al- be easy to implement. The algorithm does not re-
gorithm is able to perform real-time collision detec- quire the precomputation and update of memory in-
tion for objects having up to approximately 5936 faces tensive auxiliary data structures, which some collision
(extrapolated from figure 7). Also important is the detection algorithms reauire and which can sap the
I

fact that the algorithm takes negligible compute time memory resources of an application, making it impos-
(rarely more than 10 milliseconds) when no objects in sible to nerform collision detection for a large number

the environment are interfering. In addition, adding of objects. And finally and most importantly, even
many objects to the environment increases computa- though the algorithm is very general it is extremely
tion time only slightly (i.e., for the case that only two fast; Adding many objects to the environment does
objects at a time interfere-if more objects interfere not require much more computation and the algorith-
at the same time then computation time will increase, m can run in real-time on a graphics workstation for
but not greatly). polyhedra containing several thousands of faces.
We did not implement the basic, naive collision de- We are currently exploring various optimizations to
tection algorithm in order to compare it to our al- this algorithm, such as using face bintrees instead of
orithm (because our algorithm is clearly better-see face octrees, using a more efficient bounding box check
B51 and [16] to see how ludicrously long the naive al- (to reduce the O(n’) complexity for n objects), and
gorithm can take for even very simple environments). determining the optimal level for face octree subdivi-
The important basis of comparison should be with oth- sion (the PM-octree [29] might be useful for this). In
er authors accurate collision detection algorithms for addition, we are implementing a parallel version of the
general, deformable polyhedra; as shown in the section algorithm, which should be quite effective because of
on related work (section 2), there are very few col- the many independent intersection calculations done
lision detection algorithms which providerevised this by the algorithm. The algorithm is already sufficiently
generality. We were not able to compare directly our fast for most .applications. However, with anticipated
algorithm against another competing algorithm which speedups from optimization and parallelization, our
is as general as ours; however, even against the more algorithm should be suitable for very large, practical
restrictive algorithms of the previous section our algo- virtual envi.ronments.
rithm gives better performance.
Based on these experiments, it seems reasonable References
to conclude that our algorithm would perform quite [l] Pentland, Al ex P. Computational complexity ver-
well in many applications. Unfortunately, however, sus simulated environments. Computer Graphics,
we cannot assert, based solely on these experiments, Vol. 241, No. 2, pp. 1855192, 1990.
that our algorithm is the fastest for all possible appli-
cations. There has already been much research into ef- [2] Hahn, James K. Realistic animation of rigid bod-
ficient collision detection, and many different efficient ies. Computer Graphics, Vol. 22, No. 4, pp. 299p
approaches have been proposed. We feel that, in addi- 308, 1988.
tion to exploring new collision detection approaches,
“comparative collision detection” would be a worthy [3] Boyse, John W. Interference decision among
new research topic. We feel that our proposed algo- solids and surfaces. Communications of the A CM,
rithm would fare well in such a comparative study, and Vol. 22, No. 1, pp. 3-9, 1979.

143

Authorized licensed use limited to: Universitaetsbibliothek der RWTH Aachen. Downloaded on October 24,2023 at 21:28:50 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Virtual Reality Annual International Symposium (VRAIS '95)
0-8186-7084-3/95 $10.00 © 1995 IEEE
[4] Garcia-Alonso, A., Serrano, N., and Flaquer. J. [l’i] Vanecek, George. Back-face culling applied to col-
Solving the collision detection problem. Comput- lision detection of polyhedra. Technical report,
er Graphics and Applications, Vol. 14: No. 3, pp. Purdue University Department of Computer Sci-
36-43, May 1994. ence, 1994.
[5] Kitamura, Y., Takemura, H., and Kishino, F. [18] Foisy, A., H a y ward, V., and Aubry, S. The use of
Coarse-to-fine collision detection for real-time awareness in collision prediction. In Internation-
applicat,ions in virtual workspace. In Interna- al Conference on Robotics and Automation, pp.
tional Conference on Artafkial Reality and Tele- 3388343. IEEE, 1990.
Existence, pp. 147-157, July 1994.
[19] Hubbard, Philip M. Interactive collision decision.
[6] Moore, M. and Wilhelms, J. Collision detection In Symposium on Research Frontiers in Virtual
and response for computer animation. Com.puter Reality, pp. 24-31. IEEE, 1993.
Graphics, Vol. 22, No. 4, pp. 2899298, 1988.
[20] Fairchild, K. M., Poston, Timothy, and Bricken,
[7] Turk, Greg. I n t*eractive collision detection for William. Efficient virtual collision detection for
molecular graphics. M.sc. thesis, Department of multiple users in large virtual spaces. In Virtual
Computer Science, University of North Carolina Realzty Software and Technology, 1994.
at Chapel Hill, 1989.
1211 Mantyla, M. and Tamminen, M. Localized set op-
[8] Zyda, M. J., Pratt, D. R., Osborne, W. D., and erations for solid modeling. Computer Graphics,
Monahan, J. G. NPSNET: Real-time collision Vol. 17, No. 3, pp. 279-288, July 1983.
detection and response. The Journal of Visual-
ization and Computer Animation, Vol. 4, No. 1, [22] Fujimura, K. and Kunii, T. A hierarchical space
pp. 13324, 1993. indexing method. In Visual Technology an.d Art
(Computer Graphics Tokyo), pp. 21~33, 1985.
[9] Shaffer, C. A. and Herb, G. M. A real-time robot
arm collision avoidance system. IEEE Transac- [23] Maruyama, K. A procedure to determine in-
tions on Robotics and Automatzon, Vol. 8, No. 2, tersections between polyhedral objects. Interna-
pp. 1499160, 1992. tional Journal of Computer and Information Sci-
[lo] Hayward, V. Fast collision detection scheme ences, Vol. 1; No. 3, pp. 2555266, 1972.
by recursive decomposition of a manipulator [24] Card, S. K., Moran, T. P., and Newell, A.
workspace. In International Conference on The Psychology of Human-Computer Interac-
Robotics and Automation, pp. 1044-1049. IEEE, tiol~. Hillsdale, NJ: Lawrence Erlbaum Asso-
1986. ciates, 1983.
[ll] Lin, M. C., M anocha, D., and Canny J. F. Fast
contact determination in dynamic environments. [25] Kirk, David; editor. Graphics Gems III. Academ-
In International Conference on Robotics and Au- ic Press Professional, 1992.
tomation, pp. 602~608. IEEE, 1994. [26] Arvo. James, editor. Graphics Gems II. Academ-
[la] Gilbert, El mer G., Johnson, Daniel W., and ic Press Professional, 1991.
Keerth, S. Sathiya. A fast procedure for com-
[‘27] Heckbert, Paul, editor. Graphics Gems IV. Aca-
puting the distance between complex objects
demic Press Professional, 1994.
in three-dimensional space. IEEE Journal of
Robotics and Automation, Vol. 4, No. 2: pp. 193p [28] Kitamura, Y., Smith, A., Takemura, H., and K-
203, 1988. ishino, F. Optimization and parallelization of
[13] Quinlan, Sean. Efficient distance computation be- octree-based collision detection for real-time per-
tween non-convex objects. In International Con- formance. In IEICE Conference 1994 Autumn.
ference on Robotics and Automation, pp. 3324p D-323, 1994. (in Japanese).
3329. IEEE, 1994. [‘L9] Hanan Samet. The design and analysis of spatial
[14] Bouma, W. and Vanecek, G. Collision detection data structures. Addison-Wesley, 1990.
and analvsis in a nhvsical based simulation. In
Eurographics Worksh”op on Animation and Sim-
ulation, pp. 191-203, September 1991.

[15] Baraff, David. Curved surfaces and coherence for


non-penetrating rigid body simulation. Computer
Graphics, Vol. 24, No. 4, pp. 19-28, 1990.
[16] Shinya, M. and Forgue, M. Interference detec-
tion through rasterization. The Journal of Vi-
sualization and Computer Animation, Vol. 2, pp.
132-134, 1991.

144

Authorized licensed use limited to: Universitaetsbibliothek der RWTH Aachen. Downloaded on October 24,2023 at 21:28:50 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Virtual Reality Annual International Symposium (VRAIS '95)
0-8186-7084-3/95 $10.00 © 1995 IEEE
computation time (milliseconds)

computation time milliseconc


1

120 i

proposed

0 20 40 60 60
t (cycle)

Figure 11: Computation time for each processing cy-


cle for the proposed algorithm and the octree update
competing algorithm for the environment of figure 12.

proposed method
(40 objects)

proposed method
(30 objects)

1
b 10 20 30 4b
t (cycle)

Figure 10: Computation time for each processing cy-


cle for the proposed algorithm (solid lines) and the
separating plane competing algorithm (dotted lines)
for 10, 20, 30, and 40 identical sphere objects (528
triangular patches each).

Figure 12: The experimental environment used to ob-


tain the data for figure 11.

145

Authorized licensed use limited to: Universitaetsbibliothek der RWTH Aachen. Downloaded on October 24,2023 at 21:28:50 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Virtual Reality Annual International Symposium (VRAIS '95)
0-8186-7084-3/95 $10.00 © 1995 IEEE

You might also like