PDA

View Full Version : particle rotations expression help


bluehonda
10-25-2007, 06:52 AM
good day everybody. need help on my expression.

i have leaves falling using maya particle instancing. at creation i have a random function. i also have fields that move the leaves around. i alos placed a rotPP attribute. which calculates rotation according to particle velocity. so when my particles hit the ground they stop. and have random rotations. like arrows stuck on the ground. i was able to let my leaves fall flat on the surface randomly. using a particle collision event. that if event == 1, rotPP = <<0,rand(0,360),0)>>. thou you will see a certain popping as the particle changes rotation as it hits the ground.


i need help on making my leaves fall flat on the ground like in real life. with accordance to its previous particle rotation before hitting the ground or before event = 1.

hope you guys understand what im trying to achieve. thanks for all replies.

mandark1011
10-25-2007, 10:29 PM
Just a thought here but could you query your rotY after your rotation solves then plug that into another att.

meaning if event == 1 rot = <<0,new rot att,0>>;

id have to play with it to be sure but i think its sound reasoning.

Als
10-25-2007, 10:47 PM
Check this one:
http://www.learning-maya.com/258-0-how-to-create-falling-leaves-with-randomly-rotation-part-2.html



Als

natsheh
10-26-2007, 11:09 PM
Hi,
I think using a ramp may work. You may try to use something around the following approach:
_ Create a per particle vector attribute "rotationMod", and attach the ramp to it.
_ To drive the ramp you may use the height of the leaf above the ground from the moment it's born or from a fixed point, depending on your setup. Create a nermalized hight per particle attribute "nHightPP" = (current altitude / total hight), assuming your ground will be always at altitude equals zero.
_ create a new vectorPP attribute "leavesRot" which will multiply your rotations values, with "rotationMod".
_ Making your ramp white for most of the falling time, and changing it to black will make the particles settle down at ground.
_ Now we'll end up with 0, 0, 0 rotations at the ground, which is kind of impossible to get in real simulation, this may be solved by a random offset added to "leavesRot".

I didn't try this before, this what came in my mind . .. good luck

CGTalk Moderation
10-26-2007, 11:09 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.