Skip to main content

[JAVA3D-INTEREST] Scene updates

2 replies [Last post]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Mike Pilone


One option is to do all of your updates in a behavior, which garuntees that
the updates are applied in the next frame. There are some gotcha's to this,
such as Appearance updates taking one frame and geometry updates taking 2.

I would suggest using a behavior to force 2 frame updates before any
capture. This can be done with a WakeOnElapsedFrames condition.


-----Original Message-----
Sent: Sunday, August 29, 2004 6:25 AM
Subject: [JAVA3D-INTEREST] Scene updates

In my code I'm applying modifications to the Appearance and/or the
transforms of various objects in a scene through a Swing gui.
The scene is attached to an offscreen Canvas which I use to take snapshots
of the scene.

Probably due to the asynchronous design of Java3D (or maybe it's my
mistake), quite often I do not get my snapshots up-to-date with the params I
set with the gui.

Is there a way to wait for the completion of the scene updates before taking
a snapshot ?

Suggestions welcome.
[Message sent by forum member 'MikOfClassX' (MikOfClassX)]

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

Joined: 2003-07-02

Thanks for the hint Mike.

Anyway I would say that all my scene synch troubles vanished automagically by adding the following line to the scenegraph construction:

objRoot.addChild(new Box(.0000001));

I also set the priority of java3d to 1:


Now everything works very well. Do not ask me how it can be possible. It is most likely an issue of Java3D when it renders offscreen.