Norbert Schöpke wrote:
Have you tried to randomize spherical instead of cartesian coordinates? In this system a point on a sphere (or a direction vector) is described by two angles and a radius.
I haven't looked at this because I want to avoid the CPU costs of the cos and sin calculations. These are some heavy particle systems that I'm running (upwards of 1000 particles each system, running 10 or more systems). Now that I've done the normalisation, I'm applying a bit of randomness to the initial velocity and it gives a fairly nice effect. I've attached a small pic using 1000 particles and no textures to give you an idea of what it looks like. In this setup, I'm getting around 200 FPS on this new machine (Dual Athlon 2200, Radeon 9700) but it starts to bog down once you put a lot of them in and also throw in terrain etc.
I was going to post a demo applet today, but just got a call from a mate and we'll be heading out clubbing shortly so, maybe tomorrow... :) BTW, all this code is in the j3d.org code repository for those that are interested in having a play. Still needs some more cleaning up though. -- Justin Couch http://www.vlc.com.au/~justin/ Java Architect & Bit Twiddler http://www.yumetech.com/ Author, Java 3D FAQ Maintainer http://www.j3d.org/ ------------------------------------------------------------------- "Humanism is dead. Animals think, feel; so do machines now. Neither man nor woman is the measure of all things. Every organism processes data according to its domain, its environment; you, with all your brains, would be useless in a mouse's universe..." - Greg Bear, Slant -------------------------------------------------------------------
<<inline: sphere_particles.jpg>>