Arbitary axis rotation with particle instancer

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  01 January 2014
Arbitary axis rotation with particle instancer

Hi all,

Just trying to see if someone has a simpler solution than writing a whole bunch of mel scripts or what have you to calculate the rotations.

So I've given the particles a rotation value, and from there I want all the rotations to happen about their current axis, and I was wondering if anyone had written a script or whether it's possible to do with the rotation options within the instancer?

Thanks for your help,

  01 January 2014
I guess you added a particlePP attribute first,
then you need some starting expression, something like this.
Creation expression:
particleShape1.rotationPP = << 0, rand(360), 0 >>

And then in runtime expression
I've used 3 as some decent visible rotation speed.

 vector $rot = particleShape1.rotationPP; 
 particleShape1.rotationPP = << $rot.x, $rot.y + 3, $rot.z >> 

This is just an quick idea, if you need more help please be specific as much as possible,

so I can help better.


"No Bucks, NO Buck Rogers!"

VFX rule no. 387
# Just redo it!

  01 January 2014
Originally Posted by Als: This is just an quick idea, if you need more help please be specific as much as possible, so I can help better.



Thanks for the help so far, in short what I've done is at the start I set a random rotation for the particles via a rotationPP attribute, I don't have it with me, but it was something like:

particleShape1.rotationPP = 180*sphrand(1);

This gives me a random amount of rotation for x,y,z with 360 degrees. What I then want to do is have the particle rotate around the axis that it is now rotated along, from the original rotation which was <<0,0,0>>.

It's more of a personal thing, as I was just looking at PP attributes, and how these could be manipulated, and wondered if it could be done easily without having to resort to matrices etc.


  01 January 2014
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 06:16 AM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.