|
Just a simple test for a crowd that's performing a mexican wave. First off I created some particles.
Then I created a heartshaped collision object, inverted the geometrie, made a "die on collision" event and had some heartshaped particles. Next step was bringing in some randomness. So with the help of a little expression all the particles moved a little bit in their x,z axes. The more frames you played, the greater the randomness would become. Yes, could have been done with a turbulance field, too, but I liked my code way better for this situation.
Now it was time for some testing. I created a simple cube, made several versions of it for the particle instancer and played with the parameters and code. Instancer is totally useless without mel. Ok, maybe if you want to simple dumb loop, then it can be used, but for everything else, you have to play with mel. So basically my code records the position of the particles in the z direction, subtracts a certain value and adds the frame number every frame. The particles in the back that will have their hands lifted first get by this the number 0 on the first frame while the particles at the front will have something like -100. So when coming to frame 100 the particles in the back will have 100 and the particles in the front will reach 0. With this simple method I just added an if condition. So when the value reaches 0 the instancer is played until the value reaches 13, then it stops. As my animation contains 14 shapes, this value has been chosen.
Enjoy watching and thanks for read ing :)
Techdemo Mexican Wave
|