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

Re: Particle systems



On 07-Dec-1999 Keith Lucas wrote:
> 
> 
> 
> 
> 
>>- 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.
> 
>>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.
> 

this assumes that the systems stay relatively contained. That'd really depend
on what kind of game you're writing and what the particle system is emulating.
If you're simulating debris then for a flight sim or car game, it might be
feasable, as the particle system will be well contained. However, smoke tends
to go all over the place, as does debris in a space sim. Culling systems
would have small peices of debris or smoke far from the systems center blinking
in and out of existance, no?

> { 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 :-}
> 

it'd be highly noticable I think, but someone else has already provided an
example.

> 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.
> 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?
> 
> 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.
> 

just have a function that can spawn a new particle... one a particle exists, it
is a single entity in the world with its own 3d location and velocity. An
emitter can be a particle, just write the function to do it :)
 

I know with opengl, if there's a large particle system to be displayed, like
smoke from a rocket blast in q3, a fairly small particle system is built. Each
particle is given a radius (or size) and a texture, then it's billboarded. To
simulate disepation, the size is increased and the alpha value changed so it
becomes more translucent until it's invisible, where the particle is deleted.
This gives a nice full smoke trail using an extremely small number of
particles, like <200.

for those who don't know what billboarding is... billboarding is when a polygon
is drawn so it's always facing the user and a texture drawn on it. If two
players are in a networked game, and they see a billboarded object, they will
both be looking straight at it. They're pretty useful for things like
explosions and very short term effects. yeah, yeah, I know my description is
sketchy, but it should be enough to give ya an idea where to dig for more info
:)

        -Erik <br0ke@math.smsu.edu> [http://math.smsu.edu/~br0ke]

The opinions expressed by me are not necessarily opinions. In all
probability, they are random rambling, and to be ignored. Failure to ignore
may result in severe boredom or confusion. Shake well before opening. Keep
Refrigerated.