Jump to content
Hash, Inc. Forums
rusty

How do I rotate a sphere evenly and continiously...

Recommended Posts

Hi,

 

I can't seem to remember a good way to rotate a sphere at a constant speed. I seem to recall that there are several ways...can anyone help?

 

Rusty

Share this post


Link to post
Share on other sites

Hi Rusty,

 

Hmmm... if precision is required I would recommend using an expression.

 

The key to rotation can (usually) be to make sure we change the rotation to Euler.

With an expression you might not have to do that (I'll have to check). Edit: No we don't.

The plus is that you are after a simple rotation where gimbal lock won't be a problem so... likely don't need to change to Euler.

 

Try:

 

Enter an expression on the Y Rotation of your object.

Your 'constant' will likely be your frame rate so take that into consideration.

Assuming 30 frames per second your expression might be

 

=GetFrame()*30

 

Where you replace the number 30 with how fast you want the object to rotate.

30 would be rotating 30 times in one second so... way too fast for a rotating planet.

 

If we want the object to rotate slower than 1 rotation per second then we divide:

 

=GetFrame()/2

 

This would result in having the object rotate half way around in one second.

 

This isn't to say you can't do this another way.

For instance, because it's a simple rotation you could just rotate the object in an Action, drop that Action on the Model in the Chor and then set the number of repeats.

In this way you can determine how long the shot will be in the scene and adjust the speed to taste (by adjusting how many times the object rotates or how much of a partial rotation is in the scene.

 

I'll note that I almost always change the rotation driver to Euler as that allows me to specify the number of rotations in increments of 360 (360=1 roation, 720=2 rotations, 1440=4 rotations, etc.)

The trick to changing the driver to Euler is often to change the setting to Time Based rather than the default but anything that establishes a keyframe should suffice to allow you to change the driver to Euler (via Right Click>Change Driver>Euler).

 

And there are other ways...

Share this post


Link to post
Share on other sites

In the chor, force a rotation key on the bone.

 

Then do Object's Properties>Transform>Rotate RMB>Convert Driver To>Euler

 

 

With Euler drivers you can set one start rotation and one end rotation of any angle. For example from 0° to 720° would be two rotations.

 

 

 

ConvertToEuler.png

 

 

Share this post


Link to post
Share on other sites

Robert is correct.

 

It seems like this is one of those questions that continually surfaces again and again.

 

Every time I have to get that function to work, I have to look back and remember how it's done.

Share this post


Link to post
Share on other sites

The next question that may come up in user's minds is... why not use Euler all the time since it is so much simpler to keyframe large rotations with it?

 

Large rotations, however, are rather rare in character animation and Euler does a poor job of interpolating between the multi-axis angles that one might typically create when animating a shoulder or head.

Share this post


Link to post
Share on other sites

Robert is correct.

It seems like this is one of those questions that continually surfaces again and again.

Every time I have to get that function to work, I have to look back and remember how it's done.

 

That's okay. We'll keep answering and answering and answering.

At least it brings folks back to the forum now and again. :)

Share this post


Link to post
Share on other sites

Thanks guys! In truth I haven't used A:M in a while...not since the book trailer for my first book. I'm working on book 3 now and BTW my second book got an awesome review from Kirkus.

 

 

Book Two Front Cover raw.jpg

  • ____ 1

Share this post


Link to post
Share on other sites

thanks! I'm always looking for an easier way to rotate images so that the motion is fluid. It seems like it would be such a simple task but it gets me every time !

 

 

adam

Share this post


Link to post
Share on other sites

Here's yet another means of achieving a constant speed and rotation.

It's not a method likely to be used often but has some advantages in that a keyframe can be used to target specific frames so that the rotation within a sequence plays out 'perfectly'.

The method is one of Post Extrapolation.

 

The main process is to set up a simple rotation consisting of two keyframes (a start position and a controller).

The way rotations play out by default in A:M is that once a set rotation is accomplished the rotation stops. The default being to hold that value in the future.

But by changing the curve method we can tell A:M we want that rotation to continue... to reverse... to ping pong back and forth... etc.

 

So we set our first Y axis rotation key to 0 and the second to any number (as we will change it later by moving the actual keyframe).

Then we select those two keyframes, Right Click and change the Curve setting's Post Extrapolation to Linear (Accumulate gets similar results but not quite).

We can then see where the rotation will continue into the future via the dotted lines of the channel (that were plateaued off before but now carry on linearly into the future.

 

In this way we can visually target a specific frame where the rotation 'ends' for all practical purposes and just make sure that ending isn't within the frame range... so our object doesn't suddenly stop rotating.

This can be a quick way to test various rotations to adjust performance in light of the scene as a whole. For instance, we may have a spaceship in the scene we want the audience to focus on but still want a subtle turning of our planet to enhance our story. Of course this Post Extrapolation approach can also be used to purposefully stop a rotation with constant speed and rotation on a specific frame.

PostExtrapolation.gif

  • ____ 1

Share this post


Link to post
Share on other sites

Great thread!

 

Wasn't aware of that Euler thing... GREAT knowledge!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...