Jump to content
  • Advertisement
Sign in to follow this  
pcwlai

How to make particle system in stable state when first seen?

This topic is 3633 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

Take an example, when you first see a fountain created by particle system, you will find it flowing normally instead of starting to flow from the origin. So, there must be some way to make this particle system becomes stable. Here are 2 methods I am implementing but, I am seeking for comments, some better solutions or faster one. And if possible, wanna to know how other commercial games are doing it. 1. Create 2 camera for visibility culling. One is the real camera space and the other is much larger for predicting and pre-loading some near future object inclusion during scene management. When a particle system come into the large camera space, start simulating. 2. When creating the particle system, run through a set steps of simulation depending on the system and artist test out before rendering. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
1. Instead of 'growing' the view frustum, grow the particle volume.

2. Instead of simulating a number of frames before rendering how about passing a larger time delta for the first frame, this way all particles should begin rendering at p0 + t rather than p0.

Share this post


Link to post
Share on other sites
1) view test as normal. start the system once it is in view/range. but fade up the alpha of the system as a whole over some set time.

2) Make particle systems where the particle position is directly correlated to time by formula. So your particles just step through time, and aren't simulated, so you can spawn one at any time you want. So picking random spawn times will fill in your system when it first becomes visible.

3) Unfortunately, lots of games just don't care. Depending on how much time you have to spend on this aspect of the game. Maybe it isn't that important.

Share this post


Link to post
Share on other sites
Thanks for the replies. Really useful.

I would like to know any game (so I can have a look) with particle systems are starting up instead of in a stable manner.

Share this post


Link to post
Share on other sites
Pre run the particle system either on export or level load, save particle data

Reduce size of saved data by quantising and or only storing every 2nd particle and interpolating particle data / velocity to invent all the other particles

Share this post


Link to post
Share on other sites
The last time I had to work with particle systems, I implemented them as a closed function of time. As such, you could look at the state of the particle system at time "t" and it would look the same whether or not you had been looking at it beforehand.

Let's consider the example of a flowing fountain. Particles start from its center with a fixed speed and angle and follow a parabolic path, then die by fading out after a fixed duration. Then, the function of time for the particle I would be:

particle(i,t,ori,g,lifespan):
offset = hash
start = offset + lifespan * floor( (t - offset) / lifespan )
vel = { hash[i,start,1], hash[i,start,2], hash[i,start,3] }
acc = { 0, 0, -g }
life = t - start

pos = ori + life * vel + life / 2 * acc
alpha = 1 - life / lifespan

return (pos,alpha)

fountain(n,t,ori,g,lifespan):
particles = new array
for i = 1 to n do
particles.push(particle(i,t,ori,g,lifespan))
return particles


The use of a hash (instead of a random generator) ensures that the noise values are perfectly deterministic.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!