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.
--
___________________________________________________________
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
___________________________________________________________