Shawn,
Not copying the transform data would open up all sorts of problems.
Besides, the copying of the 16 values for the matrix isn't the source
of any performance problems (it's down in the noise). I would look
elsewhere.
One possibility is the creation of the Transform3D objects. If you
create a Transform3D from a vecmath Matrix4 object, the matrix has to
be classified. The current classification method is inefficient. If
you use quaternions or the setScale, setRotate, setTranslate methods of
Transform3D, then the classification is more efficient.
Another possibility is that Java 3D 1.2 currently has some performance
problems with changing transforms in the scene (as opposed to those
above the view platform). Java 3D 1.2.1beta1 should improve the
performance of setting transform nodes. If you have a test case,
please send it to [EMAIL PROTECTED] and we'll take a look at it.
--
Kevin Rushforth
Java 3D Team
Sun Microsystems
[EMAIL PROTECTED]
>Date: Mon, 9 Oct 2000 17:06:58 -0400
>From: Shawn Kendall <[EMAIL PROTECTED]>
>Subject: Re: [JAVA3D] serious performance problems when setting Transforms
>To: [EMAIL PROTECTED]
>
>Hey quick question to add to this one....
>In a TransformGroup and Transform3D...
>when we use the set() calls, the data is copied.
>Is there any way that we can just set the handle to the Java Matrix or
>Transform3D object instead?
>It seems like that would help speed things up, I could be wrong. Is
>there some reason why we can't?
>Sorry if this one was asked on the list before.
>
>Syrus Mesdaghi wrote:
>
>> Hello everyone, A few of my students are using one of our Java3D
>> based engines in order to make a game but we have noticed that setting
>> transforms in the scene are to expensive. these guys are animating
>> their "entities" by computing their transforms every frame (as opposed
>> to using animation engine that is keyFrame based) and even though
>> there are not too many transforms, we are having serious performance
>> issues. they have animated an ATAT that has 28 TransformGroups. we
>> tried loading 3 models and attached a behavior to each but the
>> behavior thread runs at only ~23 Hz on a PIII 450 with 128MB Ram. Even
>> though the Models are expensive, our tests show that we are NOT
>> suffering from the render, and the memory foot print does not pass the
>> 35MB line. I have to mention that their computations are done on the
>> native side and after each behavior computes the TGs for each model I
>> pass the data as 12 doubles to java side and stick them in a matrix,
>> t3d and then the scene. If I get the data they compute every frame and
>> just skip t3d.set(m) and tg.setTransform(t3d), I get more than double
>> the performance (eventhough their behaviors are very expensive). do
>> you have any suggestions on how I can improve the
>> performace?
>-------------------------------------------------------------------------------
>>
>> Syrus Mesdaghi Fullsail Real World Education
>> Real Time 3D instructor Winter Park, FL
>> [EMAIL PROTECTED] www.fullsail.com
>>
>> ------------------------------------------------------------------------------
>
>--
>___________________________________________________________
>
>Shawn Kendall Full Sail Real World Education
>Course Director 3300 University BLVD
>Real Time 3D for Gaming Winter Park FL 32792
>[EMAIL PROTECTED] http://www.fullsail.com
>___________________________________________________________
>
===========================================================================
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".