# Arbitary axis rotation with particle instancer

 01 January 2014 Marink gnisbet   portfolio Gary Nisbet Hayes, United Kingdom 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, Marink share quote
 01 January 2014 Als Expert portfolio Aleksandar Stiglic digital artist, 3D United Kingdom 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. Thanks Als __________________ "No Bucks, NO Buck Rogers!" VFX rule no. 387 # Just redo it! share quote
 01 January 2014 Marink gnisbet   portfolio Gary Nisbet Hayes, United Kingdom 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 Als 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. Thanks, Gary share quote
 01 January 2014 CGTalk Moderation Expert 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. share quote

 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 CGSociety Society of Digital Artists www.cgsociety.org Powered by vBulletinCopyright ©2000 - 2006, Jelsoft Enterprises Ltd.