Euler (gimbal lock) Explained
Vložit
- čas přidán 13. 01. 2009
- In this video we explore Euler Rotations, the most common method for orienting objects in 3d. It's by-product "gimbal lock" can cause headaches for animators because the animated motion can move in strange ways. Here we learn how euler's "rotation order" is a bit like hierachies, and how changing this order can help us to avoid gimbal problems. This is demonstrated with a solution to a common camera problem, by finding the correct rotation order.
Despite being made almost 10 years earlier, this video is a great follow-up to 3blue1brown's video on "Quaternions and 3d rotation"! I was curious about why gimbal lock was such a problem for Euler rotation, but this describes it perfectly
Nice to see you here! And yeah, I want to see more treasure like this on CZcams...
So basicly the axis have to be in such an order that the gimble lock doesn't hapen in an real environment
oh hi cary didnt expect you here
I also saw them in that order
Yea, I think I am starting to get it.
Oh, THAT's why that didn't work 30 years ago! At university, studying computer science, I was doing some recreational programming one night trying to make a flying game, but whenever the plane got vertical, strange, physically impossible things happened. I always meant to revisit that and try to figure it out. (Was writing in pascal for PC)
That's one of the few situations this happens with. It also occurs when map building and wanting and object at a specific angle, that is be gimble locked out. Also causes issues with physics. Adding a 4th ring (almost like a locked 4th dimension) can fix the issue. Imagine the object gets stuck at an angle b/c of gimble lock and you basically spin the world around it haha.
Lol dude I'm here because I'm making a jet in Unreal Engine 4 and it spazzes out when it looks directly up or down.
@@kirkhamandy Quaternions won't help. Advantage of Euler angles is that you can make mechanical device that sets all the angles to orient something in space. For example camera.
@@kirkhamandy I have haha. I couldn't remember what they were called though, so I tried to give the best explanation I could.
No you need 13 rings to gimble lock and then it opens a portal to hell.
Even twelve years after its release, this video is still the best way to understand how works the Gimbal Lock. And with satisfying sounds on top of that !
best explanation on the internet about gimbal lock thx
Absolutely
I went on a journey to figure out what happened to the presenter in this video in the ten years after he made this. Apparently he went on to work on Avatar and Gravity.
Thats freaking cool
@@gerrardsoutham2841 If I could afford it I would totally take that course holy crap.
6 years old and still the best damned explanation out there
+ArraySix Holy crap array I watch your videos.
+Mechanical Orchards this is old but its aray six
I thought you were bragging about being 6 years old and understanding this video. Then I checked the video's date..
@@mattgoodrich7571 me too lol
One possible slightly cheaty solution is to simply break the motion into steps, calculate a very small change in angle and teleport the camera there, then repeat these very small steps until you are at a target angle, this is usually unnoticeable because computers tend to not bother with angular precision below thousandths of degrees so you can use that rounding as a 'blind spot' for in which to undo a gimbal lock.
I found this video years ago, and and it's honestly one of the best introductory videos on this.
Out of all the tutorials I've watched/read that attempted to explain gimbal lock to me, this one was the one that did it. Awesome video!
Man, I love that "Ohhhhh THAT'S how that works" feeling when you finally find a good explanation of a topic. Especially after watching several other videos that didn't manage to clear up my confusion.
Thanks!
This tutorial is incredible. You're an amazing educator and an amazing tutorialist.
Best video on Gimbal Lock I've ever seen. Thank you for putting the time into making this!
+
+
I have to agree, it's the best video on why "Gimbal Lock" is a problem. Knowing the problem makes it much more rewarding and relevant knowing the solution (in my case, Quaternions).
I was gonna write the exact same comment, but instead, I'll just throw myself to yours :D
Another benefit of the camera gimbal you suggest is that the gimbal lock occurs in the same place for your camera and a human cameraman. If you're holding a camera pointed straight up, it's a lot easier to lower it in the direction you're facing than in any other direction.
Those sounds are SO satisfying!
He also has a very nice voice.
This video made me realize why certain things have messed up for me throughout the years and gave me a brief moment of respite before the dread of realizing I HAVE to learn quaternions set in.
I'm trying to learn Quaternions and keep hearing Gimbal Lock mentioned, but this is the first time anyone ever bothered to explain it. Luckily, it was a very good explanation!
Hilarious thing, In Blender Gimal Lock is often not a thing because many things are defaulted to Quaternion. That is why for years I never encountered gimbal lock. But than when I was working at a company on a cinema4d project I know that I totaly got run over by this. It was like the Programm was freaking out!. Because it rotated via euler by default so I was really dumbfounded and that was the first time I've heard about gimbal lock.
This is a great video and tells me to avoid euler basically.
I don't understand why don't they use quarternions and convert to Euler just for the UI manipulation.
@@totoze1956 I wonder why the program doesn't use quaternions natively, then convert to Euler coordinates. Quaternions never run into gimbal lock. Transforming quaternions into Euler coordinates doesn't have the same problem as going in reverse.
Well in Blender, possibly Armatures are defaulted to Quaternion, but not common objects, such as cameras. The Blender camera is initialized pointing down. If you try to emulate the suggested rotation order illustrated in this video, (yxz in Blender) you run into gimbal lock as soon as the camera is oriented forward and level to the ground. You may have assumed you never experienced gimbal lock if you were rotating everything in Global mode, but trying to decipher rotation animation graphs like that is a nightmare.
I don't necessarily thin the video is suggesting you should avoid using euler angles, but that you have to find the correct angle pairing so that the rotation does not lock. Having said that, I do thin it would be easier, as funny as it sounds, to use the ugly quaternion
I've literally been searching for a clear explanation of this since the first time I saw Apollo 13 in 1995 and this is the first time I've really understood it, thank you!
Perfectly made video that explains about Gimbal Lock and Rotation Order while using Euler rotation. Thank you!
So happy I found this explanation. All the other ones I found left out how the parenting system works between gimbals and thats what I was confused on. Thanks!
Man you took a lot of efforts to make this complicated video in very easy way, you really mean it what happens , this is called mentality of scientist / Dr. , love to watch it
i have no idea what's going on, i just somehow ended up here
...and actually found this interesting
SAME haha
Looked all over the internet including youtube before hitting this video. finally understand gimbal lock's problem. THANKS A LOT
oh, so that's why Unity uses quaternions. I still hate quaternions, but at least I know why.
+Steven Quaternions are much more intuitive when you understand how it works. Someone compared it to mixing colors. In stead of using blue and red to create purple, you're using x and z to create a new rotation.
+Steven What's wrong with quaternions? It's a beautiful algebra.
***** I never said quaternions weren't impressive, but they're just so hard to use. Thank god for Quaternion.Euler
+Jiří Bednář the thing is a quaternion's (X,Y,Z,W) values don't intuitively map to pitch/yaw/roll (with euler x = pitch, y = yaw, z = roll)
so it makes quaternions harder to use in that way
But they do intuitively map to the axis and angle of single rotation.
Man... This is the best explanation I find so far. Thanks very much!
стихи блока слушать фффф
I'd say 2:35 is a very nice hint about why quaternions are so useful to describe rotation. It's true you just need 3 parameters to describe rotations but having a fourth one makes things nicer.
14 years after this video was posted, i learn why we need to study and use quarternion in houdini. awesome video.
Finally after so many painful years I could understand the gimbal lock issue .Thank you so much .
This is fantastic! Finally a physical analog to what seemed like a lot of mystical mumbo-jumbo! Great job!
It’s crazy how a 14 years old video can still be so helpful to me
Try read a book xD
I promise you there's nothing crazy about that. As you grow up you will find information much, much older than this which can still be so helpful to you.
Amazing, I've been doing CGI since 1983 and this is a very well presented explanation of a problem that can drive people mad.
Good thing to know, since so many programs exclusively use euler angles.
With real world gimbals, especially critical ones used in say, a navigation gyro, great care is taken to avoid gimbal lock for obvious reasons. However a solution that largely prevents it (I don't think it entirely eliminates it, but it does help a lot) is to use a gimbal with 4 axes.
In computer programming of course, the best solution is to use a quaternion.
However, understanding quaternions is pretty difficult.
The concept behind what they do isn't so difficult, but understanding how and why they work is a bit less straightforward.
In terms of rotation, a quaternion defines a rotation, and an arbitrary axis oriented in 3d space around which to perform the rotation.
Of course, the reason why it's so confusing to understand quite how a quaternion accomplishes that task, is because strictly speaking a quaternion is a geometric operation that works in 4 dimensional space, NOT 3d space.
(note meanwhile that euler rotation in 2d space cannot suffer from gimbal lock, thus you don't have to resort to stuff like quaternions or the like.)
Actually, in purely geometric terms it's possible to interpret rotation as linear motion on a surface one dimension lower than the one you are working in.
in 0 and 1 dimensions rotation is not a meaningful operation.
In 2 dimensions you have one axis of rotation, and one of the peculiarities here is that this axis of rotation is perpendicular to the 2d surface itself. (in other words, the axis of rotation in 2d space points in a direction that would be physically impossible in 2d.)
However, if you project a point onto a circle - (the distance doesn't matter,) then you can define rotation in terms of how far a point moves along the perimeter of that circle - and this is by definition 1 dimensional linear motion (albeit on geometry that isn't flat, and thus wraps around itself.)
Similarly, in 3 dimensions you can determine 2 axes of rotation as being 2 coordinates on the surface of a sphere, which is, again, a 2 dimensional surface.
of course, that leaves you with a third rotational axis that is undefined. However, the definition of a single axis of rotation is simply that of the 2d case.
(technically I suppose 1 and 0 dimensional rotation also have to be accounted for, but those have no real meaning, so it's a moot point.)
OK, so I probably won't win any prizes in mathematics with this explanation, but you might see how this can help explain a few things.
It also provides a way to define operations that are equivalent to rotation, but happen in higher dimensions.
In 4 dimensions it follows that there is a rotation defined as the position of a point inside the volume of a 3d sphere, plus the definitions for the 3d and 2d cases.
Indeed in terms of euler angles, if you label 4d space as being XYZW, then rotations can happen along XY, XZ,YZ, XW, YW and ZW, but there should also be some rotation-like operation that operates along 3 axes at a time XYZ, XYW, YZW - whatever this operation might look like, it's going to be hard to visualise, since it's going to be an operation that doesn't make much sense in 3d space... (and visualising 4d geometry, much less 4d geometric operations is pretty difficult...)
IIRC quaternions aren't a 4D rotation, though. They're a rotation _with a resize._
Also, I don't think you're correct that 3D rotation can be specified with only 2 numbers? Every method of notating 3D rotation that I can find seems to require at least 3 numbers. (Including the not-commonly-used ones of "Axis angle notation but use the magnitude of the axis as the angle", and "Axis angle notation but specify the axis via longitude and latitude" [the latter of which you mentioned in your comment].)
Wow, I always wondered why some games have weird camera behavior at extreme angles, and it seems like this would have been the cause. Great video!
These explanations are amazing with these visualizations! Your work is very, very much appreciated. You should make some videos about more complex topics. One could benefit a heck of lot with your way of teaching!
Greetings and all the best to you!
The rotations used in 3D softwares are actually not stored in the Euler angles format but in the form of quaternions (or their matrix interpretations).
This is why your rotation tool is not an Euler axes ruler, but one with 90° separated independent axes.
These softwares will always allow you to use Euler angles because we, as humans, can't really intuitively use quaternions. It will however instantly convert them, thus preventing multiple problems (quicker to compute, only one representation opposed to the 6 Euler ones, and no gimbal lock).
So, to recap, the camera problem is due to the interfacing you choose with the inputs (Euler in this case). There are other interfacing implementations available, directly using quat or matrices which can solve this.
Awesome description of the principle of Euler angles and the concept of gimbal lock btw.
i think that at the time that this video was made, software didnt convert to quaternions internally yet
Probably the best educational video I've ever seen. Great job!
Thank you for releasing this video helped me 11 years later with a unity issue.
Not an animator but I've noticed something like this happening when building stuff on SecondLife. I even called it 'gimble lock' without realizing this was the actual term for it. SL programming also uses quaternians for the rotations but I find it's better to just think of them as 'black boxes of rotation' -- convert to Euler angles, adjust those, and convert back but don't look at or manually adjust the quaternian values inside. That way leads to madness.
This video is really amazing ! The animation and sound effect just make the gimbal lock live !
That's really interesting - and sheds a little light on a problem I've been dealing with. Thank you.
the visual representation made it so clear. nice job!!
I need to copliment this guy for the effort he has made to explain the "GIMBAL LOCK"...AN AWESOME VIDEO....Grt Work Mr Andrew Silke....
That presentation was simply 2 good...
absolutely brilliant animation; perfectly describes the phenomenon of gimbal lock!
Absolutely excellent explanation. Great visualizations. Thanks for this a ton.
i never understood why gimbal lock was that big of a problem until this video, thank you
how can anyone dislike this video? Seriously, this is great.
Fantastic video! I found it very helpful.
ok
Thank you for the explanation, the video is so clean and on point.
This video is by far the best I've found on explaining the Gimbal Locking problem.
Gimbal solution note points:
- there's a maximum of 6 rotation order combinations
- all rotation orders HAVE gimbal lock
- Axis order in maya is displayed inverted like so: child
Fantastic explanation of gimbal lock. I have been trying to find a good one for a while. Now, if you don't already have one, please make a very similar video explaining quaternion rotations! :D
Finally now I understand it, thanks for the great explanation!
Thanks for the wonderful explanation!
Very good video, makes it completely easy to understand.
whoa. I didn't even know I needed to know this. great explanation! thanks
Best explanation of Gimbal Lock that ive seen!! Cheers :)
Wow, that was an amazing explanation that helped me big time in my code. I appreciate it!
this is the best video on the topic ! It really saved the day !
Thanks!
Great explanation, I'm studying SO(3) right know and this helped me a lot to understand euler rotations and gimbal lock's problem
This amazingly well presented, thanks so much for sharing.
This was illuminating!!! AWESOME!!
FANTASTIC video! Outstanding!
I have nothing to do with 3d animation, but I have always wondered about gimbal lock in air and space craft. Thank you for the explanation.
What a clear explanation! Superb
I have no idea why youtube recommended this to me but it was interesting and informative.
Brilliant explanation. A pedagogical model.
Beautifully done. Thank you.
This is priceless !! So nicely explained. Thank you !! :) :)
superb video, so detailled and with a lot of effort put into it, it's amazing
What an excellent video! thank you
im self taught, and i really wish i'd seen this sooner. wouldve prevented so many headaches
Very well explained, thanks!
check out the z-fighting on those axes (6:36). Great explanation it definitely helped me understand, but don't get fooled I spend quite some time on this, also used an interactive program to test it, made a paper gimbal, read on wikipedia and programmed a simulation from bare opengl. Also on many train rides I tried to simulate this problem in my brain: It can't be done, at least, I can't do. My brain doesn't have enough working memory for this.
Things you want to keep in mind: there is a given hierarchy of axes, yes Euler angle can represent any orientatinon in euclidean space and finally, my personal last insight needed, gimbal lock is a problem of contiuous movement. If we try to orient an object, when it is already in a certain orientation, such as, best example, in gimbal lock, we can't perform straight forward transformation because we lack a degree of freedom. We need to backtrack the rotation where the degree of freedom is restored and approach the orientation we wanted all over again. This backtracking is what is bad for animatiors as between keyframes there will be discontiuous or deviant movement from the path of 'apparent least resistance'.
I wonder if this helps anyone, I am just ordering my thoughts here.
Thanks for your awesome explanation! It did help me. My rain can't simulate that neither.
Yes! I agree to you opinion. I think that Euler angle can represent any orientatinon in euclidean space
Thanks for the video! Really nice explaining!
Amazing explanation of Gimbal Lock!
This is a very well done video. Thanks!
This video is a fever dream, but it’s an informative one!
This is an amazing animation an explains the problem perfectly.
what a great explanation, thanks man!
Amazing video!!! Very understandable.
Dude, you're the best ever! Many thanks!
Never use euler rotations. Use quaternions.
+Giles Bathgate Have you found the video yet?
Never use Haskell. It's evil.
why?
Now I only need to understand quaternions.
Unless you are an animator and have to work with CURVES.
Here to learn about gimbal lock as it applies to spacecraft and surprisingly this helps a lot.
Finally I see the light. Thanks!!
Well done, awesome visual explanation.
Really clear and well explained. Thanks for that ^^
Brilliant, really well explained.
Great explanation. God bless such people. Thank you! ;)
excellent explanation. i couldn't follow the concept at all until I watched this video.
In about 1985 I wrote motor control software for a Huber cradle for X-ray crystallography work at Brookhaven labs. A DEC microvax computer was used to run the fortran code, that controlled a CAMAC rack of electronics, with a circuit board for each stepper motor. This was before computer graphics. I had not heard the expression gimble lock and am not sure what I did when the axes lined up.
I also did some texture / orientation function work on ordinary X-ray diffractometers. I had never even heard of quaternions either. Now I think the math I used was obsolete. Quaternions are the way to go. The whole subject of geometric algebra is blowing my mind. I used to work in related fields, that can all be revolutionized by this.
Excellent video!
Best video on Gimble Lock. Next explanation.
some sincere work.....thank you
truly best explaination on gimbal lock thanks
I love this video. Thank you!
I had this problem in blender. I had found the axis I wanted to rotate on was Y, so I just locked the Z and X axis. This solved the problem in my case.
Thx for making me understand what was gimbal lock
thank you harambe this was actually very interesting and nice
Amazing explanation !!!
Nice tutorial! I hope you keep doing it!
this is soo amazing very well explained