Sign in to follow this  
noNchaoTic

Particle System (Particle Geomentry)

Recommended Posts

noNchaoTic    343
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

Share this post


Link to post
Share on other sites
m4gnus    240
in most of all cases you use a screen aligned quad...i have never seen a game engine that uses something else.

regards,
m4gnus

Share this post


Link to post
Share on other sites
Syranide    375
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)

Share this post


Link to post
Share on other sites
stroma    218
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..

Share this post


Link to post
Share on other sites
noNchaoTic    343
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?

Share this post


Link to post
Share on other sites
Syranide    375
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?

Share this post


Link to post
Share on other sites
noNchaoTic    343
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 ;-)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this