Skip to main content

Optimal Animation

3 replies [Last post]
Lavender81
Offline
Joined: 2006-02-17

On a scene graph, there is about 1000 TransformGroups on which hing 1000 spheres. Within a loop, the position of these 1000 spheres is re-calculated (approx.10,000 times)to produce some sort of animation. What's the optimal way of re-positioning the spheres? resetting their transfor3Ds ? Using an interpolator ? ...

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Lavender81
Offline
Joined: 2006-02-17

Thank you for your reply, Alessandro.
The system is a quasi-particle system. That is, the spheres do NOT own properties of mass, velocity,...etc. The only property they posess, is their position on the virtual universe. For that each sphere has its own position which differs from its partners, I cannot go about reducing the number of transform Groups (and hence # of tranform3D's). And since the spheres need not change their positions cyclically, I'll exclude the interpolator solution to my poblem. This leaves out the exaustive re-setting of transform3D values solution ?

Anonymous

I had a similar problem. I solved it by generating all the sphere geometries individually into a large float[], while maintaining the indexes into each sphere so I could manipulate their position and scale, then using the array as data for a call to setCoordRefFloat for a single Shape3D. Much like you would approach a particle system, but with spheres.

I was using 1200 spheres with 16 divisions (2,764,800 floats 16*16*9*1200) and the performance was pretty good, but I was also updating a color array for the vertices and each sphere was pretty inefficient because I was using individual triangles instead of strips because I needed to be able to blow the spheres appart as well. If you don't need access to each triangle you can save alot of data and gain faster rendering using triangle stips. A nio buffer can also be used because its all a giant array reference.

Alessandro Borges

Is this a particle system ? In this case, did you check the J3D.org example ?

>What's the optimal way of re-positioning the spheres?
Depends on what you plan. The ideal is to minimize the number of transformGroups and/or transform operations. On some systems is possible to use a few transforms, and others not.

>resetting their transfor3Ds ?
Why not just update the transform3D ?

>Using an interpolator ?
If your event is time based or cyclic (I mean : use Alpha) a interpolator can help you. Of course you can write your own behavior without using interpolators...

Alessandro

java3d-interest@javadesktop.org wrote:
On a scene graph, there is about 1000 TransformGroups on which hing 1000 spheres. Within a loop, the position of these 1000 spheres is re-calculated (approx.10,000 times)to produce some sort of animation. What's the optimal way of re-positioning the spheres? resetting their transfor3Ds ? Using an interpolator ? ...
---
[Message sent by forum member 'Lavender81' (Emilie)]

http://www.javadesktop.org/forums/thread.jspa?messageID=38440è•

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

---------------------------------
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora!
[att1.html]