Particles and Fields


#1

Hello!
I’m working on a scene where a pack of letters are gradually (from top to bottom) blown away from a table in the room, through an open window.

My strategy was to animate particles with instanced geo and use some air and turbulence fields to move them around. To get the graduality (pack top to bottom) I ordered particleId-s top to bottom. The plan was to start the motion of particles with a air field but locking those particles which have others on top with setting the per-particle velocity to 0 with this runtime expression

if (particleShape1.particleId > frame) particleShape1.velocity = 0;

As I understand on every frame one particle should start moving.??? Instead all of them are moving, those which should be locked, very slowly, those that should be moving, are actually moving with the speed of the air field.

Does anybody know how to keep particles still until its their time ?

Thanks,
Simon


#2

Nobody has an idea?

Ha, and I forgot to mention, I’m using nParticles, but this shouldn’t be of any difference.

Thanks,
Simon


#3

Hey BlasT,
Cool idea! It looks like your code is really close. I mocked something up really quick that looks to be doing what your asking for. I set this expression to “Runtime after dynamics”.


int $tempName = particleShape1.particleId;
if( (($tempName + 1) * 10) == frame )
	particleShape1.velocity = 20;

I added 1 to the particleId because the array starts with zero and my timeline was starting on 1. I also multiplied the id by 10 to space out the action a bit. When I played the animation, the particles sat still and one at a time, took off along their vector.

Might be interesting to set the acceleration value instead of velocity so they don’t snap into action but gradually increase. Also, probably want to randomize the velocity or acceleration a bit so every book doesn’t act exactly the same.


#4

I think you need to use velocityPP instead of just velocity.


#5

You might get better results by controlling your Air field’s intensity per particle.

Checkout Maya User Guide -> Dynamics & fx -> Dynamics -> Fields -> Work with Fields -> Work with per-particle field attributes.

Hope this helps.

/r


#6

nvm sry for the spam xD.


#7

Hey guys thanks for the tips. Because I was in a hurry finishing the project, I did it by keyframing the field volumes position. Starting on top, moving the field down through the stack of particles to get the graduality. I had no problem with particles starting moving instantaneously, bcos of the field attenuation. It was a short shot, and the method was taken, although the movement was not so sophisticated as I would like it to be. Anyway I will try your suggestions, if not for the next project.

Thx and Bye,
Simon


#8

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.