Jump to content
Hash, Inc. Forums

Gymbal Lock


robcat2075

Recommended Posts

Euler angles represent successive rotations about three different axes. Which axes they are, and in which order, is a matter of convention (someone makes an arbitrary choice and everyone agrees, often for an advantage stemming from the math).

 

Real gimbal lock comes from a physical device. An old form of space measurement (the Apollo "IMU") actually used a device with three nested rings (each pivot point was one of the Euler axes) to measure the difference between the spacecraft's current pointing and an arbitrary reference. Usually the references were things like the direction to point for a rocket burn or the moon's landing site or something like that. A defect in the IMU's design allowed two of these axes to line up (just like in Euler drivers), and suddenly, the same rotation could be represented as many different sets of Euler angles!

 

http://www.hq.nasa.gov/alsj/gimbals.html

 

Now, there was a well-known way to avoid this by using a fourth, and redundant, axis. Even the Apollo guys knew, but since this was a race, they grabbed something that worked well enough (remember, these were the nation's finest pilots - avoiding gimbal lock wasn't a major task for them).

 

AM's default mode is to use Quaternions to represent rotation. They have a fourth axis like the magical lock-proof IMU.

 

To the original question, see attached. I want to make sure to explain this right.

 

If you specify a set of Euler angles for an angle, you are fine. Euler angle -> rotation is unique in *all* circumstances.

 

Now, if you want to solve for Euler angles from a rotation, that is when you get screwed. See what happens to the Expression-driven Bone2 when Bone1 goes to the pole. Then play with the roll handle and watch it freak out.

 

EDIT: Well, to be honest, quaternions actually only have one axis, but four parameters. They are actually pretty complex mathematical objects.

GimbalLock.zip

Link to comment
Share on other sites

  • Hash Fellow

thanks for all the replies!

 

but, why would one want to produce Gymbal Lock?

 

I was curious to see what it looked like in the graph editor. I think I've been able to create gymbal lock since then.

 

I thought that if I set some bones to euler rotations, the channels would be easier to edit than with quat.

 

But I've noticed that interpolation between keyframes can be very weird in Euler even when gymbal lock isn't the issue, so Euler isn't necessarily a solution for my animation goals.

Link to comment
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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...