Hi guys,

I have performance problem with editing a live scenegraph. The problem is described 
below.

Problem : I have 2000 shape3d nodes which I need to update three times in the scene.

Approach 1 : I creat a new BranchGroup along with Shape3D and a new Geometry object 
and "add"( rootBranchGroup.addChild( newBG)) the new BranchGroup to the SceneGraph. 
After this I "detach"( OldBG.detach()) the old BranchGroup which was holding the last 
geometry. This addChild() and detach() calls are taking lot of time.

Approach 2 : I find out the Geometry nodes and update the Geometry reference by 
executing MyShape3dObj.setGeometry( newGeometryObj). This also is taking almost the 
same time.

Approach 3 : I tried to stop the renderer of the Canvas3D by calling 
Canvas3D.stopRenderer() and use the Immediate mode rendering to draw the geometries 
directly with the 3dGraphicsContext from the Canvas3D object. This also did not give 
me any performance benifit.

Analysis : I have seen the java 3d code of addChild() and detach() methods. These uses 
a MasterControl lock in the VirtualUniverse class for rendering threads( Behavior 
Scheduler, Renderer, UserInputHandeler, Geometry change handler etc) which makes the 
whole process of editing a live scene graph very slow.

So as it looks like manipulation of a live scene graph has a major performance 
problem. Am I missing something? Any suggestions? How the game writers are handling 
these scenarios in Java3d?

Hope somebody writes back !

thanks
Anir

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