[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Particle systems






>>- As soon as a particle is emitted, it's independend from the emitter.
>>- (Simple) Particels are defined by: x,y,z,direction,speed,mass, "looks",
>>timeToLife, (dieFunc)
>>- (Simple) "looks" are defined by type (pixel, image), color, size, map,
>>alphamap, animator
>>
>>All your FX are/can be particels (clouds, dust, fire, smoke, ...).

>Got all that stuff running.

Good.
btw:
Which language are you using ?!


>>There is usually no need for "local" and "global" particels.
>>Maybe I missed your point, but I didn't understand the real question.

>Well no ... the question was what people did. The reason for having local and
>global ones is merely for optimising the drawing: each system can be culled in
>one go based on its visibility.

Oh yes, now I got the point.
Well we've never needed this kind of optimization, but we never used more than
20K particles,
so it wasn't necessary.
"Zoning" the unneeded stuff out in the renderer sounds very efficient.

>{ I guess it doesn't even have to run if it's not visible... it could just be
>frozen until it shows up again... no-one would notice :-}

Yes, sure .... you shoot the plan left on you, look right, look back (after 30
seconds)
and see the explosion starting ;)


>I'm just concerned about the amount of effort in culling a huge list of
>particles... even if they can be done by regarding them pretty much as points.

It depends on what kind of engine you use as a base.

>Also I was thinking about cheating and using some of the particle emissions
>several times: instead of 16 fires all throwing off particles, you could have 4
>drawn 4 times, which quarters the amount of the physics to do, even if not the
>drawing... or am I being completely paranoid about this?

No you are not paranoid, but why not take an animation then ?
(Not all animation have to be flat "movies".)

>What would you do about particles that can themselves emit particles? I'm
>thinking of things like sparks that could break up when they land into smaller
>sparks or maybe the debris from an explosion which trails smoke particles
behind
>it.

That's for what we have the "die function".
As soon as a particle has reached it's timeToLife, it calls it's dieFunc.
This function then decides what to do.
(eg. if( mass>20 ) { child1.mass=child2.mass=mass/2; ... } .... )

ciao
Anti