View Full Version : Gimbal Question?
04-24-2003, 07:03 PM
Im busy reading up on some stuff about Gimbal Lock and I know this may sound kinda dumb, but I only realised now, that you only run into gimbal lock when rotating with gimbal. If you rotate with local or global, you dont run into this problem. Please correct me if Im wrong. Im really just assuming based on what I've read.
Anyway, my question is, what is the advantages of rotating with gimbal, why not just use local or global the whole time??
Sorry if I'm way off in any way. Thanks in advance!!
04-24-2003, 08:27 PM
Not sure but I think it has something to do with IK. When you move the end effector the bones are rotated using gimbal.
I'm sure somebody else will give you a better answer.
04-24-2003, 08:39 PM
If you animate with local or global, it will interpolate wrong. Just try animating a few rotations with Local or Global; you;ll soon see the object flipping around like crazy between keyframes.
In theory, you could use quaternions when animating to avoid gimbal lock, but Maya's implementation of quaternion rotations is pathetic, totally worthless and should be avoided at all costs. SHAME ON YOU, AW!
04-24-2003, 08:49 PM
I've never run into this problem when animating. How often does this type of thing occur? Even when trying to see what Local or Global does I cant seem to get it to mess up. Could you maybe post an example or something?
04-24-2003, 10:37 PM
It has to do with the way rotation works..
If you have, say, a spine and you bend forward and to the right.. then you want to straighten it up, if you are using local you'll see that the rotation is not correct, that it 'goes around'.
The advantage with gimbal is that Y is always Y..
Your curves are always nice and tidy, you can go and understand them a heck of a lot better.. since Y is Y and Z is Z... while if you are rotating in local, you'll see that if you rotate in Y or Z (depending on your rotation order) the values of X and Y and Z will change.. and that makes for a messy f-curve
something like that ;)
04-24-2003, 11:10 PM
Alright, now Im starting to get the picture. Any other explanations or points about gimbals???
So do most animators animate rotations with gimbal as opposed to Local or Global??
I know Jason mentions gimbals in his DVD, so if he feels like adding to this, it would be appreciated :bounce:
Thanks for all the awesome answers so far!!
04-25-2003, 02:29 AM
>I've never run into this problem when animating. How often
>does this type of thing occur?
Well, it depends on what youre animating, but with an fk arm, for example, id say within two minutes after youve started animating.
heres an excerpt from a very long mail i wrote on the subject on some mailing list years ago
I dont know much about the deeper technical stuff behind this, so I may be wrong about a lot of things, but IŽll try to explain. As far as I understand the problem, it all comes down to Maya not supporting qutarnions (internally it does, but not when manipulating and rotating objects). Euler rotations are bound to gimbal lock and have axes not follow as the object is being rotated. Quaternions, which is a more advanced way of calculating rotations, use a fourth axis, called W, and will rotate all four axes at once rather than one axis at a time the way euler does. The advantage of this is that the axes on the rotation gizmo follow the object, like when you use the Local rotation mode, the disadvantage is that the fcurves get unreadable, because more than one curve is affecting each axis.
Since Maya doesnt support quaternions, it needs to find other ways to avoid gimbal lock. You can see this when using the Local and Global rotation modes. This is kinda hard to explain, but try to rotate an object around a little with Local and notice that all three axes are changing at once. This is because Maya is rotating in XYZ like crazy to find a way to get the object into position, which is why Local doesnt gimbal lock like the Gimbal rotation mode does. The disadvantage is that if you try to keyframe these Local rotations, the interpolation will be totally wrong, because Maya is not rotating straight along the axis youve modified to get from the first key to the second, since that would leed to gimbal lock.
When it comes to IK, the same thing is actually going on. When the IK makes the joints rotate, again Maya needs to find a way to get the joints into the desired position without gimbal locking, but it canŽt just move the axes all over the place like with the Local rotation mode, because the joints need to interpolate correctly. What it does is actually switching the axes around, so for example when an IK joint gets to 180 in Y, it will flip around to -180 and go on rotating. Theres lots of things like this going on, all to avoid gimbal lock on the top joint in the IK chain.
Maya's quaternions, as mentioned, are useless for animating. They interpolate all over the place, and there is no tangent control in the graphEditor. Maya 5 does however FINALLY have quaternion orientConstraints, so at least AW is making sa little bit of progress
04-25-2003, 10:20 AM
Thanks for all the awesome answers. I've really got a good understanding of gimbals now. I really appreciate everybody's input.:thumbsup:
The solutions that I've seen to gimbals are create an extra control parented under your current control and when you get gimbal lock, you use that control to rotate in the axis that is locked. Also to set your rotation order according to what axis is going to be used the most.
Is there anything else??
Thanks again. This would have taken me a hell of a lot longer to figure out. :argh:
04-25-2003, 06:09 PM
Nope.. you've got it..
That's the best way I know of to solve gimbal lock problems..
The only deal with that is that some people don't like selecting an extra controller (or bone)..
I personally don't have a problem with it, and if it saves me from having to deal with gimbal lock, I welcome it!
04-26-2003, 12:24 AM
One more thing to do is to change the rotation order on the node you want to rotate. This makes the gimbal occur on another axis, so it won't help you if you need to rotate all three axes, like an fk arm, but in other cases it can solve the problem
01-15-2006, 12:00 AM
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.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.