PDA

View Full Version : help on particle rotation!


clarix
12-23-2005, 02:18 AM
Hi guys, I got a simple scene and placed a few particles in a scene with the particle tool and added a per particle Attr to the emitter to have some rotation on the particles.

"particleShape1.rotPP = rand (0,360);" was added to the creation and "particleShape1.rotPP += 0.001;" was added to the runtime after dynamics


Since the particles start to rise from frame 100, I still have rotation starting from frame 1 which I dont want. I want them to start rotating once they rise. Since I am not that familar with writing scripts and exprerssions, any help is appreciated.

Thanks


Oh by the way there is a vortex, terbulance and air field connected to the emitter.

clarix
12-23-2005, 04:30 PM
Looks like no one wants to help me out :`(.

Ok I added this line to the creation and now I dnt have any rotation from frame 1-100. At frame 100 it starts the rotation, but it does not random :( urghhhhhhhhhhhhhhhhhhhhhh.

if (time <= 100)

particleShape1.rotPP = 0;

else

particleShape1.rotPP = rand (0,360);

Bonedaddy
12-23-2005, 05:06 PM
Either do it based on velocity...

$velo=(velocity);
$threshhold=0.1; //tweak this to taste

if (mag($velo)>$threshhold)) {
//do whatever rotation adding you want
}


or by time

$time=frame;
if ($time>=100) {
//rot code
}

clarix
12-23-2005, 07:17 PM
Hi there, unfortunatly none of them worked:(.



Thanks anyways

eddyx
01-11-2006, 07:50 PM
first I want to assume that rotPP is a PP attribute you created to drive the rotation of a particle instance object, otherwise you won't be able to see the rotation of individual particles anyway even your expression works(I could be wrong if there IS another case though, but rare).

Try create a particle object attribute that you can keyframe, e.g. "release".

In Creation Expression, still keep your lines:

rotPP = rand(0,360);

In runtime:

//animate "release" as a switch to zero out or initate the rotPP;
rotPP += 0.001 * release;

Hope this helps.

CGTalk Moderation
01-11-2006, 07:50 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.