Sign in to follow this  

Particle system control/movement

This topic is 4820 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm tired of the same old equations to push my particles around, I need some variety. [grin] My current particle system works quite nicely and so far I've been generating different effects with different emitters (which spew out particles in various shapes with various colours). However after that they all just use a simple controller which is just your basic velocity & gravity movement. Anyone any ideas for more interesting methods to control the movement after creation? I'm not really going for realism here, just some extra eye candy.

Share this post


Link to post
Share on other sites
If you think about it, everything in the "real" world is driven by the kinematics laws (okay, so maybe not entirely...but we can "assume")...so any effects you are looking for can be done the way you are doing them.

But what I want to know is what kind of effects are you looking for? A cool snow storm effect is pretty different than an explosion effect, or a whispy smoke effect.

Share this post


Link to post
Share on other sites
I'm not really after realistic effects, as you say most of them end up using pretty standard movement equations. I'm kinda at a loss for idea, hence the post. At the moment I'm thinking more about effects with particles strung together (lightning perhaps, or forcefields).

Share this post


Link to post
Share on other sites
You need a specific gravity per emitter, rather than use regular gravity. The reason is that things like exhaust is warm, and rises, rather than falls.

You should probably have a dampening factor for velocity, so that you negate current velocity by a FACTOR * curVelocity.

I find it useful to support (camera-aligned) spin of particles; possibly with different spin speeds/directions per particle.

Most higher-end particle systems support some form of collision with reality, although it might be as simple as casting one ray when you spawn the particle, and remembering an "infinite plane" aligned to whatever that ray hit.

To shape the flow of particles, many systems support attractors and repulsors. These are points in space that have gravity or anti-gravity on particles, proportional to distance, or distance squared (d-squared is cheaper, AND more physically accurate, but may make your artists unhappy).

Note that half of the benefit in a particle system comes from using good textures, and good blending modes (i e, ONE, ONE_MINUS_SRC_ALPHA is useful, as is ZERO, SRC_COLOR and SRC_ALPHA, ONE_MINUS_SRC_ALPHA, and the classic additive: ONE, ONE). As an example: A diffuse blob in the middle is NOT a "good texture". A diffuse blob of alpha in the middle overlaid by gaussian noise that's blurred with a radius of about 2 pixels makes for a better texture (for cloud-like effects).

Share this post


Link to post
Share on other sites
Quote:
Original post by hplus0603
You need a specific gravity per emitter, rather than use regular gravity. The reason is that things like exhaust is warm, and rises, rather than falls.

Gravity is definatly a controller thing, not emitter. And yes, at the moment I can plug in different controllers and configure them with different gravity strengths. I could add damping here as well, but thats still firmly in the regular movement area. :(

Per-particle spin and attractors sounds like a good idea though. Are there any particular uses of attractors/repulsers that you're thinking about?

Share this post


Link to post
Share on other sites
In general, partical systems are divided into state preserving and state less particle systems.
State less particle systems are the most used on today's widespread hardware (hardware that does not support Vertex shader 3). These particle systems the particle's position is just a function of time, and each frame you don't care for the particle's previous velocity or state.This is the particle system used to make most of the particle effects in today's games (exposions, fire, water falls).
If you are trying to make a more advanced particle effect, then first define why do you use it, as it is not easy to implement and its impact on the performance will not be small.
For making a state preserving particle system, you should be storing the state (position,velocity and forces ) affecting each particle each frame, because these variables will affect the particle in the next frame.
This storage will be in textrues, so you will have a texture for velocity, a texture for accelatation and a texture for position, and of course the size of these texture depends on the number or particles in your system as each pixel will be used for one particle.you can decrease the number of textrues by using verlet integration to get rid of the velocity texture.
Vertex shader 3 is needed, to read the accelaration and position of the particles in the previous frame from the textures.This is a limitation on PC hardware.
for more details see the "Building a Million particle system" article on gamasutra.

Share this post


Link to post
Share on other sites
A fun thing might be to get the particles to attract to one another rather than a central attractor. They'll sort of gloop together into clumps. Maybe they could stick and form a bigger particle; maybe they could stick to walls?

Share this post


Link to post
Share on other sites

This topic is 4820 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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