Thanks for all the suggestions on possible ways to do particles.
We have settled on a technique that will use one Shape3D, using one TriStripArray and
will only have to transform two points to the view for all the
particles as a whole, not each individual particle. We should have a simple example
next week and will post our results such as frame-rate vs.
particle count etc. for those interested.
Jon Barrilleaux wrote:
> If you do decide to pursue approach 2) that you describe below, you
> may want to take a look at the "display facing" technique covered in
> "3D User Interfaces with Java 3D". The latest version of the code
> that comes with the book, available free at
> www/manning.com/barrilleaux, has a revamped version of a view change
> detection system that does not rely on behaviors. It is intended to
> drive such view dependendant actions as display facing, constant size,
> and display overlay. Take a look at the DisplayFacing example and its
> attendant code.
>
> --jon
>
> > From:
> > Shawn Kendall <[EMAIL PROTECTED]>
> >
> Thu 11:19 AM
> >
> > Subject:
> > Improving our Particle System - third repost
> >
> >
> >
> > We have a very basic particle system running for Java3D.
> > I have a question on how to improve it's performance but first here are few things
>we learned that may be of some use to others out there.
> >
> > 1) OrientedShape3D's can not always be used for Particles. When we first started
>this, we use OrientedShape3D's, but it turns out that
> > because the orienting effect happens at the Shape3D level, you can not also have a
>Z rotation of the Shape3D because any and all
> > rotations higher in the scene are overwritten by the OrientedShape3D. This is of
>course the point of using OrientedShape3D's, they
> > always turn to face the view. The problem is that we need local Z rotation and
>turn-to-face the view rotation. For smoke effects in
> > particular, you need it to get a "billowing" effect. So we tried using the
>Billboard behavior with worked fine because we could set the
> > behavior higher in the scene than the Z rotation. But it does not always update
>in the same frame as the view so it looks jittery from time
> > to time. This is a known problem and one of the reason OrientedShape3D was
>created. Alas, it's great for trees but not so for all particle
> >
> > effects.
> >
> > 2) We are using separate TransformGroups, Shape3D's and Appearances for each
>particle! This is the most expensive way, but for the
> > test pass, we agreed it would be OK. However, now we wish to give a try at
>improving this by combining all the particles for a single
> > system into one Shape3D and Appearance. Color/alpha, coords, and texture-wise
>this works out fine because TriStripArray give us
> > enough variation to get a good particle effect, i.e. changing position, color,
>alpha, but same texture. The problem is the orientation of the
> > primitive. It needs to always face the camera, just like a Billboard behavior or
>OrientedShape3D. Now we are thinking of writing our
> > own view transformer that would xform each triangle when it does the particles
>update. This isn't too bad, still not that cheap, but I can't
> > even think of another way. So....
> >
> > The question is, what is the best/fastest way to xform all those triangles to the
>view? Is there some "cheat" we can do to just tell it to
> > draw them right to the screen without doing any world to view transform, bypassing
>the need to xform them back to the view. Or maybe
> > the Raster Geometry is an option? We considered doing a few tests with that but
>we except it doesn't really do what we want. Can
> > Rasters scale and rotate?
> > Thanks for any help.
> >
>
> --
> __________________ JMB and Associates, Inc. ___________________
> Jon Barrilleaux 3800 Lake Shore Ave. Consulting for 3D
> [EMAIL PROTECTED] Oakland, CA 94610 Web Applications
> 510.444.0231 vox & Tech Industry
> 510.444.0231 fax www.jmbaai.com Management
>
> ===========================================================================
> 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".