PDA

View Full Version : controlling individual particles position via expressions Q.


amckay
10-02-2002, 03:12 AM
Hey everyone, this is just a question which I was hoping someone might be able to help me out with.
So far with expressions and MEL I seem to have a grasp on most aspects of controlling particle systems at a basic level, except controlling particles individual positions, I can control particles as a group to move lets say through a sin or cos function runtime expression, although I haven't been able to work out how to control individual particles positions, so if I wanted some to randomly move off to the left, or slow down ect. I assume you'll have to control them via the particleId, although I have no idea how I do this.

Does anyone here have any tips on this? An example is that I'm working on a fairly large bee swarm sequence for a feature in Maya and my vfx supervisor wants some of the bees to slow down and hover for a while, whilst others decide to change direction ect. I want to do this through expressions, although I can't seem to control individual particles to do this, only as a group.

Anyway help would be greatly appreciated,

thanks.

Allan McKay

alexx
10-02-2002, 10:10 AM
some quick notes on that:

yes.. you have to use the particleId for that one i would say.

first off you have to decide which particles to use.. you can e.g. control every 10th particle with the syntax in your runtime expression:

if ((particleShape1.particleId % 10) == 0)
{
what to do;
}

but in your case i would think about mixing several particle systems: having a main system for the straight ahead bees and some smaller ones (less particles) that you control with different forces.. that should be much easier than taking out single particles and controling them.. i guess :)

cheers

alexx

amckay
10-03-2002, 04:32 AM
Hi Alex, thanks for the reply that helped a lot. It's at least opened up a few more doors for me.

what does the == 0 at the end do? (I'm blonde!)

Just out of curiosity, and thanks again for your help,

Allan.

Razvan
10-03-2002, 06:51 AM
It checks if the statement '(particleShape1.particleId % 10)' equals zero.

CGTalk Moderation
01-13-2006, 06:00 PM
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.