CGTalk > Software > Autodesk Maya > Maya Dynamics
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 01-17-2014, 12:11 PM   #1
Marink
gnisbet
 
Marink's Avatar
portfolio
Gary Nisbet
Hayes, United Kingdom
 
Join Date: Apr 2010
Posts: 25
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
 
Old 01-17-2014, 08:10 PM   #2
Als
Expert
portfolio
Aleksandar Stiglic
digital artist, 3D
United Kingdom
 
Join Date: Apr 2003
Posts: 1,922
I guess you added a particlePP attribute first,
then you need some starting expression, something like this.
Creation expression:
Code:
particleShape1.rotationPP = << 0, rand(360), 0 >>

And then in runtime expression
I've used 3 as some decent visible rotation speed.
Code:
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!

 
Old 01-18-2014, 05:39 PM   #3
Marink
gnisbet
 
Marink's Avatar
portfolio
Gary Nisbet
Hayes, United Kingdom
 
Join Date: Apr 2010
Posts: 25
Quote:
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:

Code:
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
 
Old 01-18-2014, 05:39 PM   #4
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 12:41 AM.


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