Easy MEL question about randomizing rotation

Become a member of the CGSociety

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

Thread Tools Display Modes
  04 April 2009
Easy MEL question about randomizing rotation

I've set up this simple script for the rotation on each access to happen every 10 frames with values of -10, 10:

if (frame%10==0)
scanner.rotateZ = rand(-10,10);

The problem I have is the object pops to the next rotation when it hits that 10th frame versus animating over time to the next rotation. What do I need to add to this to make it animate over time, if it's at all possible? I'm assuming it needs to come up with the randomized values first then plot a course using all 3 axis to get to the next value @ the next 10th frame?

  04 April 2009
that depends on what you need as your result... you have two options:

1. create an animation and set keyframes with random values.

2. you can script an procedural animation, which implements some kind of counter and updates the rotation each frame.
  04 April 2009
Don't use expressions. Write a script to keyframe the random values.
  04 April 2009
Originally Posted by Robert Bateman: Don't use expressions. Write a script to keyframe the random values.

ahh didn't think of that. I'll have to noodle through how to do that. Thanks.
  04 April 2009
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 05:42 PM.

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