 Inverse kinematics, or IK, is one of the most common bone constraints, as it helps make moving limbs and other joints very intuitive and easy to animate. But what is IK? Well, inverse kinematics is the opposite, or inverse, of forward kinematics, or FK. So let's figure out what FK is first. To do this, I'm going to demonstrate using a simple arm rig. You can find this base arm rig in the same character mesh file available in the description down below in the collection called ArmBaseRig. Now, let's talk about what exactly FK is. FK is simply how bone parent chains work by default. In other words, moving the parent moves the child. The reason why it's called forward kinematics is because the transformation of the bones only influences bones that are further forward down the chain of bones. Which way is forward? Well, if you pretend the tails of the bones are like arrows, then forward down the chain is simply the direction the bones are pointing. You can also see that moving the child right now will not affect the parent at all. Great. Now we know what forward kinematics is. So what is inverse kinematics? Well, we know it's the opposite, but what does that mean? Well, instead of influencing bones forward down the chain, inverse kinematics allows for the transformation of a bone near the end of a chain to influence bones that are further up the chain of bones. Basically, it's when a child bone has influence over the parent bone in some way. To demonstrate this, I want to quickly show you the auto-ik option. Let's open the right hand side menu by pressing N or clicking this arrow here. Then go to tool and you'll see the auto-ik option. This is a simple checkbox Blender has that doesn't permanently change your armature at all, but rather helps when you want to pose bones very quickly. By enabling this, you can very easily move bones at the end of chains to influence the transformation of the entire chain itself. This is especially handy when animating hands or feet. In real life, when we raise our hands, we don't think, oh, I'll move my upper arm and then extend my forearm quickly so that it allows my hand to travel upwards. No, we tell our hands to move upwards and our upper arm and forearm act accordingly to accomplish that movement. It's this kind of natural thinking that IK allows for animators to do with their rigs. With IK, by simply telling the hand bone to move upwards, the upper arm and forearm bones will automatically determine where they have to be to accomplish that movement. Likewise, it's also very helpful for making sure feet stay glued to the ground when needed. Great, now that we understand what IK is, let's figure out how to apply it to our rigs. The Auto IK feature is nice for quick posing, but it doesn't give us full control over the IK and it doesn't work for animation. So instead, what we want to do is use the inverse kinematics bone constraint to set it up properly. The first step is simple. Let's go into pose mode. Select our forearm bone and add the inverse kinematics bone constraint from the bone constraints tab indicated by this wrapped blue bone icon in the properties editor. From there, you'll notice that we have a few input fields to fill. The target object will be the armature itself, even though what we really want is to target a specific bone, but that's within that armature, so let's select armature from the dropdown. Then we can select the bone we want in the bone input field. This works in a similar way to the track 2 and stretch 2 constraints where our target bone is where we want our active bone to point to. So in this case, we'll want to choose the hand bone. However, when we select our hand bone now and try to move it, it doesn't actually seem to do anything. In fact, it's not translating at all as it's still connected to the forearm bone. Let's simply go into edit mode and disconnect our hand bone from the forearm bone, but keep it parented. Now, as you can see, we can translate our hand bone and it influences the forearm bone, but it also influences the entire rig. This is not what we want, we only want the arm to bend, so let's go into our inverse kinematics bone constraint and go to our chain length option. The default is 0 and this simply goes up the entire bone chain the active bone is parented to. So in our case, it goes all the way down to the bottom of the spine. This is indicated by the yellow dotted line here. By changing the chain length value, our yellow dotted line will show how far up the chain our inverse kinematics will take effect. You might see a bit better in wireframe mode. However, the only bones we want influenced by the inverse kinematics constraint are the forearm and upper arm bones. So we want a chain length of 2. Now, when we move our hand bone, it correctly influences only the forearm and upper arm. But I don't think we want it to be freaking out like this. It doesn't seem like it's very animatable or stable, so what's happening here? Well, quite simply, remember in the parenting video when I said you can't form a loop in the parents? Well, we sort of just did here. If you think about it, the forearm is pointing to the hand, but the hand is parented to the forearm. This means that when the hand moves, the forearm will try to point to the hand, but if the forearm moves to point to the hand, the hand will have to move because it's parented to the forearm, thus moving the hand further, which will move the forearm further to point to the hand, which will move the hand further because it's parented, which will move the forearm to point to the hand, etc. This is called a cyclic dependency, and we don't want that. So let's go ahead and un-parent the hand entirely so that we can move our hand independently from our forearm. Nice! As you can see, moving our hand now bends the elbow in a very natural way. The only issue we have now is because the hand is no longer connected to the forearm, we can now stretch the hand out away from the forearm, which isn't ideal. So the most common workaround for this is to simply go back into edit mode, re-parent the hand to the forearm, then duplicate the hand bone and un-parent the duplicate. Now we have an independent controller bone that we can point to instead. Let's call this bone hand underscore IK. Going back into pose mode, we can select our forearm, go into the bone constraints tab, and change the bone target from hand to hand IK. Now as we move our hand IK bone, the forearm and upper arm deform nicely, and we can move this hand IK controller out without stretching the hand itself. However, now to rotate the hand bone itself, we would have to switch between animating the hand IK and the original hand bone. That's a bit tedious for our animators, so let's add a simple copy rotation constraint for the original hand deformation bone to follow the hand IK bone for easy animation. I'm also going to make the hand IK bone a bit bigger in edit mode, so it's easier to differentiate from the original hand bone. Although giving it a nice custom bone shape is an option as well. Great, now we have a nice basic IK rig, except you may notice that sometimes when we move the hand bone around, the elbow sort of bends the wrong way. This is not ideal and some of you may remember that there is still one more input field in our inverse kinematics constraint. Let's go back into it and see what it is. Yes, the pole target input field. This will be helpful for solving the issue of joints bending the wrong way during inverse kinematics. A pole target is simply a reference object or bone that the elbow joint or inverse kinematics joint will try to point to as the bones bend. For this, we can simply create a new bone by duplicating the hand IK bone and moving it behind the elbow. I'm going to rotate it so that it points away, but it doesn't matter because only its location is actually referenced. Let's rename this to elbow underscore target. Now, we can go back into our inverse kinematics constraint settings and simply input the armature again for the object field. For the bone input, we'll want to select elbow underscore target. And now, as you can see, when we move our hand IK bone, the elbow never bends in the wrong direction anymore. Except that's because the elbow doesn't bend at all. This is because quite simply, our bones were created too straight and it doesn't know which direction to start bending. So let's very quickly go into edit mode and just drag our elbow joint slightly backwards. Now, as you can see, our elbows bend just fine, except it's still in the wrong direction. But don't worry, that's because we forgot to set one more value in the inverse kinematics constraint. Let's go ahead and keep our elbow bent and then select our forearm bone again. We can go into the inverse kinematics constraint and click and drag this pole angle value until it points to the pole target correctly. And that's it! We now have a working inverse kinematics rig in Blender.