Kevin Rushforth wrote:
> 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.
But don't most Transform3D operations (including set() which is the one we use most)
always do a
"classify" operation. I believe that is part of the performance problem. We are in
the process
of testing the theory right now. We have our own implementation of Transform3D class
that we are
setting up in our Java3D that can have it's classify disabled during execution. That
way the
internal Matrix gets classified correctly at creation, etc. then later you can cut off
the
checking to boost performance at the cost of incorrect Matrices causing problems.
Will post to the list our performance results...
> 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.
We can not use the Transform3D methods in this case because the source Matrix4d is
coming from the
JNI. That is exactly why I wish I could just set the handle to a Matrix4d we
maintain. We never
use setScale, setRotate, setTranslate, etc in this particular case, and never will.
If we mess-up
the Martix4d, let Java3D blow up, it's our fault, but we feel to pay the
classification cost
everytime we make a change is too closed a system. We know when we are just making
translations
and rotations to our Matrices. Maybe we there could be a set "autoClassify" in
Transform3D's or
something similiar somday.
> 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
BTW, the 1.2.1beta1 did increase performance in our test case from about 30hz to 50hz.
But the
baseline without the setTranform is around 150hz! I will get hard figures soon.
> 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.
If Syrus hadn't already sent the test case, I will have him sent it today.
> --
> 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".
--
___________________________________________________________
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".