Hi Roland,

You might want to take a look at the Java 3D Fly Through demo application
which is available at http://java.sun.com/products/java-media/3D/flythrough.html

This application includes a Collision Avoidance architecture based on the
Java3D PickTools. Full source of the application is available on the web,
and the license terms are such that you can use the code in your own
projects (check the LICENSE file for full details).

I've used this system to move around large models, following the 'floor' and
avoiding collisions with other objects in the world.

Rgds

Paul

>Delivered-To: [EMAIL PROTECTED]
>Delivered-To: [EMAIL PROTECTED]
>Date: Thu, 4 Oct 2001 05:04:27 -0700
>From: Roland Sarrazin <[EMAIL PROTECTED]>
>Subject: [JAVA3D] Collision avoidance, bounds & co
>To: [EMAIL PROTECTED]
>
>Hello,
>
>I'm really sorry to get to this topic again (collision avoidance), but I have
been relatively disappointed of all what I have found until now about it, as
well as I haven't been convinced about my own programming trials!
>
>As a matter of fact, the problem is not that I haven't been able to set up my
own collision avoidance method; no, the problem is in fact towards performance
issues: This is all so slow!
>
>What I am doing is using Java3D structures to store and display all what
concerns geometry and so on, but rather than using Java3D's behaviours and
picking (I have never been able, though, to use PickTool and PickResult within
my program - always returned no intersections when trying to pickIntersect - see
older e-mail to this list), I have implemented my own procedures (using for
intersection computation j3d's pieces of code) to traverse the scene graph,
comparing my PickSegment first with the bounds, and then if necessary with the
geometry.
>
>Functionnaly it works all fine; I get the right intersection point. The problem
is, as said, that performances are bad. I test about 1000 segments against a
model with 17000 faces, and it's slow.
>
>I had thought that I would "manually" arrange the scene graph so that the tree
is sort of a binary tree where bounds would be better arranged and would speed
up everything (classical collision avoidance algorithm with space division), but
the only results I got were a significant loss of performances, which was not
exactly what I was seeking. I think that this is due to the considerable
overhead implied by using the scene graph to "store" this multi-level bounds.
>
>My question is then: Who has ever implemented an efficient collision avoidance
method, and how? Does Java3D use intern multi-level bounding volumes? If yes,
how on earth is it possible to use PickTool, PickIntersect and PickResult
together to get a result (Is there a piece of tutorial about it? The SUN Java3D
tutorial mentions deprecated classes to be used for picking (Intersect), so I'm
not convinced!)? I'm very close to get totally away from Java3D structures to
implement my own one for collision avoidance, and so that I can "control"
performance, even though I think I won't be able to achieve such a good
efficiency as with native code (and Java3D is written in native code, no?).
>
>Another nearly linked question: How good are Java3D's bounds' autocomputation?
How often does the computation take place? At every geometry change?
>
>Thanks a lot for your attention, and thanks in advance for your answers!
>
>Roland
>
>===========================================================================
>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".

----------------------------------------------------------
Paul Byrne                      Email : [EMAIL PROTECTED]
Sun Microsystems                Phone : (650) 786 9926
Visualization Software Group    Fax   : (650) 786 5852
----------------------------------------------------------

===========================================================================
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