Snuurtje
12-04-2012, 08:41 PM
Hi,
Im trying to create a bunch of objects that slowly fill a rectangular shape. They need to be realistically falling, and stacking onto eachother. So far ive discovered the following method to doing this:
Create my shape, create a particle emitter, added gravity, then create an instancer replacement, select the mesh, and the particle shape. Then select my rectangular shape i want to fill, select the particle and click make collide. For the particles to collide with eachothers ive added a radial field to them. Now they somewhat stack, but do not stay still at the bottom. This is a problem I will need to tackle later on. Then to make it more dynamic I want the falling shapes to be rotating, so I added an expression I found online (not good at writing expressions myself).
Added this to the per particle array attribute under creation:
seed(particleShape1.particleId);
float $rotRand=rand(180);
particleShape1.rotateMe=<<$rotRand,$rotRand,$rotRand>>;
and under runtime before dynamics I added:
particleShape1.rotateMe +=5
But now the particles keep rotating even when they arent falling anymore I need to stop this. Fumbled around with some if / else statements connected to speed but couldnt get that part to work. Hopefully someone can give me a helping hand on this one because im not very familiar on this matter.
Thanks in advance!
Im trying to create a bunch of objects that slowly fill a rectangular shape. They need to be realistically falling, and stacking onto eachother. So far ive discovered the following method to doing this:
Create my shape, create a particle emitter, added gravity, then create an instancer replacement, select the mesh, and the particle shape. Then select my rectangular shape i want to fill, select the particle and click make collide. For the particles to collide with eachothers ive added a radial field to them. Now they somewhat stack, but do not stay still at the bottom. This is a problem I will need to tackle later on. Then to make it more dynamic I want the falling shapes to be rotating, so I added an expression I found online (not good at writing expressions myself).
Added this to the per particle array attribute under creation:
seed(particleShape1.particleId);
float $rotRand=rand(180);
particleShape1.rotateMe=<<$rotRand,$rotRand,$rotRand>>;
and under runtime before dynamics I added:
particleShape1.rotateMe +=5
But now the particles keep rotating even when they arent falling anymore I need to stop this. Fumbled around with some if / else statements connected to speed but couldnt get that part to work. Hopefully someone can give me a helping hand on this one because im not very familiar on this matter.
Thanks in advance!
