High performance collision schemes
often use a multi-leveled approach with lots of cheap tests to weed
out
obvious misses and saving the expensive tests for last.  The
particular
kinds of tests and number of levels is application dependant.  It
depends
on whether you are dealing with a static world and a single dynamic
player
(the user avatar) or whether you have lots of "players" moving about.
This is true in general, not just Java 3D.

The cheapest test to perform amongst multiple dynamic players is time
to collision estimates on all objects based on their current speed
(not velocity).  If there is no way an object can hit another object
given its
present speed no matter which direction it is going then eliminate it
as a
collision candidate.  Unless all players are in the same general area
this
will significantly cull the collision list.  Testing bounding sphere
overlap between
pairs of dynamic players and large simple bounding shapes and planes
for
static world objects (e.g. the ground plane) is a good next test.  The
next level of collision test might be axis aligned bounding boxes or
non-axis aligned bounding planes, which are easy to intersect.  The
final
test is against the actual geometry of the two colliding objects,
which
can be pretty expensive.  You can also consider doing a partial
collision
test between porcupine-like "quills" on one player and the polygons on
each of its candidate collision target.  You also have to start
worrying
about the possibility that objects may have passed through one another
between frame times.

I don't think java 3D is setup to handle such a multi-tiered collision
scheme out of the box.  You'll probably have to help it along a fair
amount if speed is of the essence.

Hope this helps.

--jon

> Date:    Mon, 26 Jul 1999 13:35:13 +1000
> From:    "Leung, Sunny" <[EMAIL PROTECTED]>
> Subject: Optimising collision detection in J3D
>
> Hi all,
>
> Is it possible to perform collision detection only on a certain volume
> around an object. For example, I have a large virtual universe with many
> objects (two of them are fairly complicated with around 3000 faces each).
> I
> have attached a collision detection behavior nodes on one of the object
> and
> report collision if it collide with any other objects in the scenegraph.
> At
> the moment, this collision behavior nodes is detecting collision with all
> objects in the scenegraph and this really slow down my program. (actually,
> it's taking 8 min per point its travel).
>
> So is it possible to tell the collision detection node to detect collision
> only within a certain radius (volume) around the object which the node is
> attached onto?
>
> Please comments.
>
> Sunny Leung
>
>

____________________ Peculiar Technologies ____________________
Jon Barrilleaux       3800 Lake Shore Ave.         Purveyors of
[EMAIL PROTECTED]        Oakland, CA 94610      Alternate Reality
510.444.4370 voc                           Augmented Simulation
510.444.0231 fax        www.augsim.com         and 3D Solutions

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to