Kinematics allow joints moving up the line to depend on a single joint to move themselves. As an example, when you lift your foot, your knee naturally bends with the upwards motion, you generally don't keep your leg stalk straight. With Kinematics, we can make it so that our joints have proper bending points. Thankfully, we can make this effect automatic, so that with a small control rig, posing our character's feet will also bend the knee in a logical manner using kinematics or inverse kinematics, depending on the joint relationship and how it needs to bend. It's kind of hard to explain and I'm pretty rusty but I have tutorials from my last computer animation class so let's jump into it and I can relearn while I do it!
Also, while testing my rig, I realized I made an error in how I created joints. Because The Horror is a shapeshifter, he can manipulate his limbs in normally impossible ways, so I wanted to give him extra joints in his arms and legs. What this ended up doing however was making his skin weights distribute strangely, and the several joints weren't working right at all. Here's rotating the stomach joint:
Sometimes Maya does things that make very little sense and this was one of those instances. Because of this, I unbound the skin, deleted the extra joints, and redid the weight painting process a few times. Now, we've got a more efficient rig that will better serve our purposes. I also took the opportunity to make the model slightly taller, because his legs were a tad on the short side. Here's what we've got at this point:
No big changes overall, but the joints bend more naturally now.
Let's get on to implementing some IK Handles! Head on up to the Skeleton tab again, and drop down to "Create IK Handle, this will show up a new crosshair similar to when we were creating joints.
Now, we're going to select the topmost joint we want affected by the IK handle, followed by the bottom joint that will do the affecting of each joint up the line. In our case, we want to start with the hip joint, followed by the ankle joint.
Once you've selected the two joints in that order, you'll have two new hierarchy objects, an IK handle (which I've renamed to LF_ankle_IK_handle) and an effector which is a child of the knee joint.
First let it be clear that we don't want to touch that effector at all, it's fine where it is and is doing what we want it to do. Second, we haven't actually changed the properties of the joints themselves, but rather have created a new object that affects the joints based on their relationship in the hierarchy. By selecting the hip (beginning) and ankle (end) of the hinge joint (the knee) we've told the handle that when we move the ankle, the knee should readjust and bend in a logical way between ankle and hip. This makes movement such as walking much easier for us to animate.
See? By translating the ankle up, the knee bends forward automatically. You do have a limitation on this handle however, as if the ankle is raised too high, your joints will become volatile quickly.
If you run into this issue when animating, remember to give your joints enough space, this occurs because we're squashing the space between the hip and ankle joints, and in trying to orient itself the knee joint goes crazy trying to accommodate and does not maintain its frontward orientation. To fix this while mostly maintaining the height of the ankle, we can move the ankle forward as well to open up more space between it and the hip, and the knee will fall in line.
Much better! You can see already how much control this gives to a part of your model, which is exactly what we want. Let's do the same thing to the other leg, then we'll talk about controllers.
Oh! We also need to consider this situation, depending on the orientation of your leg joints, that white orientation arrow may not point forward. Let me demonstrate on our second leg, On our first IK handle, the knee sat slightly forward from the hip and ankle joints, but what if the knee was oriented furthest to the back?
The stretch/distortion of the leg is because I moved the knee joint while bound to the model's skin, but the main point of interest is that the white arrow now faces backwards. Let's try lifting the leg and see how it bends now.
Either we've made a centaur or that's a very broken knee. There's an old Adult Swim show called Xavier: Renegade Angel that this is giving me flashbacks of...
That's the spice.
Anyways, my point being, be careful how your orient your joints when you're planning on creating handles with them. I had this issue to a more frustrating extent because my knee was offset from the hip to the side, and the arrow pointed out at a 45 degree angle which made the way it bent much worse. A good lesson here is to keep your joints as straight as possible in relation to one another except for putting the hinge joint at a slight bend of what direction you'd like it to bend in via the IK handle.
So at this point we have two properly bending IK handle legs. We could cover the arms but they should be a relatively simple matter, just reapplying similar logic to new joints. The elbows for instance, would want to bend to the front, not the back, so we'd create a hinge from shoulder to wrist. That said, we still need Controllers. As I discovered however, it's a pretty involved process, so we're goiing to save it for its own post.










No comments:
Post a Comment