Particle System (Particle Geomentry)

Started by
7 comments, last by noNchaoTic 18 years, 9 months ago
Just a quick and easy question, I was just wondering what geomentry you should use to represent a particle in a particle system. Obviously as there will be alot of particles its best to keep it low poly. Right now I'm using 2 intersecting planes that are perpendicular to one another, im just wondering if that is ok, or what anyone would say is a better approach to it. Regards, Ste
Steven ToveySPUify | Twitter
Advertisement
in most of all cases you use a screen aligned quad...i have never seen a game engine that uses something else.

regards,
m4gnus
"There are 10 types of people in the world... those who understand binary and those who don't."
The most often used approach is a simple quad for each particle. A variation of that is a 'screen aligned quad' (also known as a 'billboard').
I did think that, cheers (*starts reading up on billboarding*)
Steven ToveySPUify | Twitter
Then there is the possibilty to use pointsprites, meaning, that instead of drawing quads, you specify a point where to draw the image as-is, only require one point of data and very little processing making it very fast, however, many tend not to use it because of the common problems involved, such as scaling... and with slightly newer hardware it is possible to scale them above 1.0 (or at all, can't remember).

(Thought you might want to know/consider it)


using point sprites will increase your performance (which is a must with lots of particles) and using them is really easy task.
todays engines can make lots of types of sprites, like quads/triangles, aligned quads, meshes, points... etc and i recommend you not to build your system static, use subclasses..
+-+-+-+-+-STR
I have a cParticleSystem class, which contains a pointer to a cParticle class, in the cParticle has a pointer to cParticle called Next, and it just iterates through when drawing/updating. cParticleSystem has a Type, which can be either say PARTICLE_SYSTEM_EXPLOSION or PARTICLE_SYSTEM_SMOKE. And when you create the system, you just called like

cParticleSystem(PARTICLE_SYSTEM_SMOKE, 500);

Or whatever. I switched now to single billboarding Quad's. Is it unwise to provide a facility to allow texture mapping on the Quad's used for the particles? Will this just kill speed, etc.?

Cheers

EDIT: As was wanting to provide some sort of alphablending as per a recommendation by a friend. Apparently this makes it looks like there's alot more geomentry involved that there really is, etc. What does everyone think to this?
Steven ToveySPUify | Twitter
Having preset definitions is something I really don't see the use for (unless you are talking about creating a set of particles by a scheme) as a particle would just as well be declared as anything, but taking a texture as parameter, as the quad should have the same properties regardless of which one you select (except for blending etc which could be another parameter).

As, drawing a smoke puff or a flame would have the very same quad, just different textures, and possibly different blendingmodes...

And regarding to alphablending, do I misunderstand you now or... using alphabledning would be the only way to achieve smokeclouds etc without having solid sprites?


Hey,

I've sorted the alphablending and have supplied a handle to the Image class I have for textures for the particles. The reason I have it defined that way so you can initialise an entire system as being a certain type, etc. The particles are then given their initial conditions based on the flag passed to the cParticleSystem::Start() method.

So yeah I basically agree with you have a type for the particle but not the particle system :-D Cheers for the help... now then does anyone have some good initial conditions for some neat effects ;-)
Steven ToveySPUify | Twitter

This topic is closed to new replies.

Advertisement