For very dynamic geometry you would want to use geometry by reference, then
write a GeometryUpdator and in an elapsed frame (0) wakeup call the
geometryArray's updateData() method.

In response to your other question: Other than field of view culling, which
Java3d does automatically, you would have to implement some kind of
visibility algorithm and then turn the scenegraph object invisible if it
failed your test.  To set it invisible you could use switches,
AlternateAppearance (renderingAttributes.setVisible(false) or remove the
node from the scene graph.  If you have a limited number of these types of
objects you could write a behavior that casts a pickray from the corners of
the bounds of the sub-graph to the eye of the image plate.  If none of the
rays can get there, then it is occluded.

Hopefully someday Sun will be real nice and write some occlusion culling
code which you can optionally enable.  Since they already store the scene in
an internal format which is a spatially organized tree, this would be easier
for them to do than us.

Dave Yazel

----- Original Message -----
From: Artur Biesiadowski <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 30, 2001 7:28 PM
Subject: [JAVA3D] Dynamic geometry


What is an optimal way to draw very dynamic geometry ?

For all kinds of simple tranforms I would modify a parent TransformGroup
from behaviour. For geometry oscillating between few precomputed states
I would use Morph node. But what if I want vertices to be truly dynamic
- computed every frame ?

I can create new GeometryArray for each frame, but I suppose a lot of
wasted cpu time would go into it - set up everything, translate between
encodings, prepare optimized internal format for just single frame.

What is a performance-sane way to do such thing ?

Second question, partially tied to first one - is there a wakeup
criterion 'if visible' ? I would like to have bound region, without any
geometry/shapes and to draw something in immediate mode if it is
visible. I can just iterate through all such regions by hand in
postRender and check if they are visible, but if retained loop does
visiblity bound testing anyway, maybe I can use existing stuff ? I want
to use this for particle effects - enclose every source in given bounds
and then render it by hand in immediate mode.

Third one - if second is not possible. What is an easy way to determine
if give bound region is visible ? This is more or less checking for
intersection of given bounds and shape defined by camera (front/back
clip plane + angles given by fov). Is there a ready method like
View.isBoundVisible(bounds) ? Or at least View.getVisibleRegionShape()
so I can intersect it with bounds ?


Artur

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

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