29
$\begingroup$

I have read the Wikipedia page on gimbal lock, and am still confused about the entire matter. My understanding is that, using a local coordinate system, if you rotate a model about its X axis then its Y and Z axes experience gimbal lock, and become "locked" together. However, my understanding is that if you rotate the X axis, then both the Y and Z axes rotate with it, and as such remain separate. Wikipedia, as always, while a good resource is difficult to understand on this topic. Could someone please endeavor to explain this to a person who does not have a Master's in physics or mathematics?

$\endgroup$

2 Answers 2

16
$\begingroup$

I gather that it's an inherent weakness of just storing three axial rotations (Quaternion, on the other hand, also evaluates orientation value).

(Per ideasman42's comment): We can easily see this for any object using Euler rotational system, by manipulating the rotation widget with transformation orientation set to Gimbal. It turns out to be easy to reproduce, by manipulating 2nd axis in the evaluation order (Z for XZY, or X for ZXY, etc.). I get the following condition on XYZ order by just manipulating Y axis:

Gimbal lock on Euler with XYZ evaluation order, by manipulating Y axis.

Here's an article and a video for alternative explanations of the condition.

$\endgroup$
7
  • 2
    $\begingroup$ Suggest trying the Gimble manipulator Orientation Mode and enable Rotate, then you can see the problem that happens when 2 axis line up. $\endgroup$
    – ideasman42
    May 30, 2013 at 12:43
  • 2
    $\begingroup$ @ideasman42: That's a good demonstration tool. I think what's not readily apparent is why those axis can line up. One tends to picture Euler rotational axis as one rigid body with three perpendicular lines, rotating in unison, while the implementation is not that simple. $\endgroup$
    – Adhi
    May 30, 2013 at 13:05
  • 2
    $\begingroup$ Gimbal lock does not arise because the axes are calculated sequentially. It has been proven that any rotation representation with three numbers will have a lock or singularity somewhere. You seem to imply that in the 3rd sentence too but it contradicts the 2nd? $\endgroup$
    – brecht
    May 31, 2013 at 10:41
  • 1
    $\begingroup$ I don't have a good simple explanation, and it's not really wrong to state that gimbal lock specifically happens because the axes are evaluated sequentially. The way it is contrasted with evaluating the axes all at once just seems a bit misleading, doing that would come with its own unintuitiveness and locks. Rotations are just inherently difficult. $\endgroup$
    – brecht
    May 31, 2013 at 12:02
  • 1
    $\begingroup$ I'll just erase the problematic sentence, then. Thanks, Brecht :) $\endgroup$
    – Adhi
    May 31, 2013 at 12:09
7
$\begingroup$

First, I recommend looking at the Guerilla CG video that explains The Rotation Problem as it relates to 3d animation. This is important because it explains why Euler and Quaternion rotations are different. Unfortunately the only available copy has very poor A/V sync.

Cut to the chase in Part 2: Euler (gimbal lock) Explained

4:18—All together there are 6 parenting combinations to choose from. In each case gimbal lock occurs on the parent when the middle axis is rotated too far. 6 combinations of axes parenting, all in a state of gimbal lock: XYZ, ZXY, YXZ, XZY, ZYX, and YZX

$\endgroup$
2
  • 2
    $\begingroup$ excellent video, highly recommend others check it out, though the web.archive link is broken. $\endgroup$
    – ideasman42
    May 31, 2013 at 13:24
  • 1
    $\begingroup$ Still works for me. Anyway, I just realized that the first answer already linked a YouTube version which actually does have synced audio. So my answer is kind of useless. $\endgroup$ Jul 10, 2013 at 14:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .