Hi Uma,

>>  (1) use .compile() - Java3D will internally combine Shape3D when possible

This is what we do, in fact "compile" or "not compile" does not change the
timing.
It looks like despite all the appearances are identical (i.e. null) the internal
bookkeeping is still performed.

>>  (2) specify multiple geometries per Shape3D thereby reducing the number of
Shape3Ds in the scene.

This is not possible because each Shape3D has to be moved independently
(transform).


A friend of mine suggested to use AlternateAppearance Node, do you think it
would resolve the problem?

Could you confirm that the internal bookkeeping you refer to is solely performed
by the hardware (i.e. save/set/restore color)?

Thanks.

Here is an exerpt of our benchmark code:

    public BranchGroup createSceneGraph() {
     // Create the root of the branch graph
     BranchGroup objRoot = new BranchGroup();

     // Create the TransformGroup node and initialize it to the
     // identity. Enable the TRANSFORM_WRITE capability so that
     // our behavior code can modify it at run time. Add it to
     // the root of the subgraph.
     TransformGroup objTrans = new TransformGroup();
     objTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
     objTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
     objRoot.addChild(objTrans);


       // Add our Shape3D nodes.
       for (int i=0; i < shapes.length; i++) {
          objTrans.addChild(shapes[i]);
        }

     // Create a new Behavior object that will perform the
     // desired operation on the specified transform and add
     // it into the scene graph.
     Transform3D yAxis = new Transform3D();
     Alpha rotationAlpha = new Alpha(-1, 4000);

     RotationInterpolator rotator =
         new RotationInterpolator(rotationAlpha, objTrans, yAxis,
                         0.0f, (float) Math.PI*2.0f);
     BoundingSphere bounds =
         new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);
     rotator.setSchedulingBounds(bounds);
     objRoot.addChild(rotator);

        // Have Java 3D perform optimizations on this scene graph.
        objRoot.compile();
        return objRoot;
    }






Uma Sabada <[EMAIL PROTECTED]> on 02/07/2001 02:43:18 PM

Please respond to Uma Sabada <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:    (bcc: Jean-Marie R Dautelle/RES/Raytheon/US)
Subject:  Re: [JAVA3D] Shape3D Performance.



Jean-Marie:
        There is internal bookkeeping needed to render each Shape3D which
results in increase in memory footprint and affects performance when there are
several thousand  dynamically changing Shape3Ds in a scene. There are couple of
ways to reduce the number of Shape3Ds in a scene:

        (1) use .compile() - Java3D will internally combine Shape3D when
possible
        (2) specify multiple geometries per Shape3D thereby reducing the number
of Shape3Ds in the scene.


-Uma
Java3D Team


> X-Lotus-FromDomain: RES
> Mime-Version: 1.0
> Content-Disposition: inline
> Date: Wed, 7 Feb 2001 12:10:14 -0500
> From: Jean-Marie Dautelle <[EMAIL PROTECTED]>
> Subject: [JAVA3D] Shape3D Performance.
> To: [EMAIL PROTECTED]
>
> Hi,
> For our project we have thousands of Shape3D with very small geometry. When
> rendering (using nVidia Quadro, Linux-86 800Mhz), our benchmark indicates that
> each Shape3D is taking 20 microseconds (no appearance) and up to 30
microsecond
> when an appearance node is used to set different colors.
> This has to be compared with the geometry rendering: 15 nanoseconds per
vertex!
> It seems there is a huge penalty in breaking the geometry in Shape3D.
> This doesn't make any sense!
> The cost of a TransformGroup is 16 microseconds. Why is a Shape3D more
expensive
> than a transform (at least the transform is doing something, i.e. save
> transform, multiply transform, restore transform)?
> Any explanation is welcome.
> Thanks.
> Jean-Marie Dautelle.
>
> ===========================================================================
> 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".

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