Advertisement

Particle Systems

Started by April 21, 2009 03:53 PM
-1 comments, last by wforl 15 years, 6 months ago
I was wondering if any anyone could help clear this up. Im working on my own Particle system application, basing it off the one in 3ds Max. But im a bit puzzled into how the one in max is working. Take for example this system below. Photobucket The particles come in and are affected by speed 01, which gives them a direction to travel in, in this case some random 3d direction. So once the particle has passed through speed 01, its direction is pointing in some random direction in 3d. Next comes the Age test, and if the age is over 30, the direction is affected by a different node, speed 02, which gives a random horizontal direction. Now my question is. How come, when the particle is passed through the system the second time round, ie, frame 2, the direction is the same as the last frame. Not that you would want this, but seeing as the nodes are giving random directions, wouldnt that mean that its a new random direction each frame? This would obviously produce a horrible mess, but im wondering why its not occuring. Im thinking that the random direction is based off the nodes own unqiue ID, being used a seed for the random direction, so that the random direction is the same each frame, but random for other nodes with different IDs. But this brings another question, the way that i know seeding to work means that the sequence of numbers produced by rand() AFTER the seed has been reintialised with the same seed is the same each time. so if i was to seed rand() with the nodes id, unless i reseed rand() everytime i use it, im going to get horrible repetition in the rest of the application where i use rand() without seeding. The next system is the following: Photobucket You'll notice that all particles that were spawned from the spawn node go through Event2 evry frame, NOT just the frame they were spawned on. How is this occurring? How is the system directing the spawned items, that were created in previous frames, to still be passed to Event 2. How would you go about doing this?

This topic is closed to new replies.

Advertisement