Controll the random spin of particle Instaces?

Become a member of the CGSociety

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

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  07 July 2008
Controll the random spin of particle Instaces?

Hey all,

I'm building a space scene right now. It's a POV flight through a asteroid field. I realized it over a Particle field, the instancer and a little PP Array Attribute.

Under Creation it's:
Asteroiden_GroßShape.RandomSpinPPBIG = rand(-1,1);

under runtime before dynamics it's:
float $spin = Asteroiden_GroßShape.RandomSpinPPBIG;
Asteroiden_GroßShape.BigAsteroidRotation += 0.6*$spin;

The asteroids are now spinning randomly in all 3 possible spinning directions. The result is a really strange rotation movement. It looks like a force is changing the rotation direction from time to time. In space as far as I know such a force doesn't exist, so i want to get rid of it.

I'm new to Maya Dynamics and don't really know how to get the asteroids spinning in one or two directions only.

Hope my english is good enough to make you understand what's my problem.

greetz
Ben
 
  07 July 2008
the way I would go about this would be to create a creation expression that assigned a random spin-vector to each particle:

RandomSpinPPBig = sphrand(1);

The value in the brackets controls the speed of the rotation. Then as a runtime-before expression you could write something like this:

BigAsteroidRotation += RandomSpoinPPBig;

This should about do it and should work fine.


And a small tip: don't use non-standard characters like ß or ä,ö,ü in Maya.
 
  07 July 2008
Thank you!
I'll try it tomorrow.

greezt from Cologne
Ben
 
  07 July 2008
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
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:15 AM.


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