From BlenderWiki

Jump to: navigation, search

Building the lower body armature

We'll add the lower body onto the existing upper body armature. Now that you've had some practice with armatures on the upper body, we can get into a slightly more complex leg setup. Keep in mind this is a purposefully simple rig, see BSoD/Introduction_to_Rigging/Leg_Rigs for more advanced rigs with better control.

Also see [1] for an older version of arm/leg rigs, but it is much easier to understand and it's a finished document.

  • Select the armature and switch to Edit mode (⇆ Tab).
Armature panel settings.
  • Switch the draw type back to Octahedron. This will allow us to better see which direction the bones are facing.
  • Double check that X-Axis Mirror is still selected.


Select the root of spine1.
  • Select the root of the spine1 bone.


Symmetrically extrude the hips.
  • Symmetrically extrude the hips using ⇧ ShiftE.

The hips were just extruded from the root of the spine1 bone. The other extrusions we've made have all been extruded from the tip of bones. When you extrude from the root, of a bone, the new bone has no parent by default. The hips need to be parented to the spine1 bone.

  • Select hip.l and make it the child of spine1. Leave the Con button off. If this button were turned on, the hip would snap to the tip of spine1, which we don't want to happen.
  • Do the same for hip.r (make it a child of spine1 and leave Con off).


Symmetrically extrude the upper legs.
  • Symmetrically extrude the upper legs with ⇧ ShiftE.


Symmetrically extrude the lower legs.
  • Symmetrically extrude the lower legs.


Symmetrically extrude the foot.
  • Switch to side view (3 NumPad).
  • Extrude a foot bone . . .


Symmetrically extrude the toe.
  • . . . and a toe bone.


Give a little bend to the knee.
  • In Side view, select the tip of the upper leg/bottom of the lower leg and move it forward a little to give the knee some bend. This will make the IK setup we're about to make work better - it will be difficult to get it to bend the knee backwards if it initially has some bend in the right direction.


Extruding the foot controller.
  • Select the tip of the lower leg, and extrude it downward. This bone won't deform the mesh, but it will act as the "handle" for the leg's IK setup. This will all become more clear later.


Bone names, lower body.
  • Name the bones. I named them
  • hip.l
  • upper_leg.l
  • lower_leg.l
  • foot.l
  • toe.l
  • leg.l

and

  • hip.r
  • upper_leg.r
  • lower_leg.r
  • foot.r
  • toe.r
  • leg.r


Settings for the toe.l bone.
The toe.l bone, parented to leg.l


The bones are all set up now. It's time to adjust some settings. Remember that settings will not automatically update on the other side like extruding bones did, so we'll have to make changes to the settings on each side separately.

  • Select toe.l.
  • In the Armature Bones panel, first deselect the Con button to disconnect the bone from its current parent.
  • Then make it the child of leg.l by selecting "leg.l" from toe.ls Armature Bones panel. If you don't disconnect it first, when you make it the child of leg.l the toe bone will snap to the tip of the leg.l bone. If this happens, undo with CtrlZ and disconnect the toe.l first.
  • After parenting, notice that there's a dotted line that goes from toe.l to leg.l, indicating that toe.l is parented to leg.l.


Settings for foot.l.

Select foot.l and do the same thing:

  • Disconnect foot.l from its parent by clicking the Con button, then make foot.l a child of leg.l. You can't see the dotted line connecting child and parent because it's hidden by the bones.


Make the leg.l bone be parented to none.
  • Select leg.l and make it the child of "none", or the blank spot at the bottom of the "child of" menu. The "Con" button will disappear . . . if there's no parent, there's nothing for this bone to be connected to.

By making leg.l have no parent, it means that no bone higher up in the hierarchy will move leg.l. The only way it will move is if we move it directly. As you'll see, this is useful for keeping the feet on the ground.

Add an IK Solver constraint to the lower_leg.l bone.
  • Switch to Pose mode (⇆ Tab).
  • Select the lower_leg.l bone.
  • Add an IK Solver to lower_leg.l. To do this, in the Constraints panel under the Edit buttons click the Add Constraint button and choose IK Solver. This adds a constraint to the selected bone. Note that in the Constraints panel, there are now settings for the IK Solver constraint.
The lower_leg.l IK Solver constraint.
  • In the Constraints panel, type in "Armature" in the OB: text box.
  • Type in "foot.l" in the BO: text box. We just told the constraint that the target will be the foot.l bone in the armature object called Armature.


A constraint is a way of sort of programming how a bone should act. For example, one type of constraint on that menu is a Track To constraint. You tell the constraint what object you want the bone to track, and then whenever you move that object, the bone will point to it.

Well, the IK Solver constraint is similar. We'll tell the constraint what its Target should be, and it will try to point the bone and its whole chain at that target by solving lots of equations. You'll have to wait and see till it's set up to see the advantage over Auto-IK . . .

IK Solver doesn't work right with the default settings . . .
  • Important: Make sure Auto IK is OFF in the Armature panel.
  • Try moving leg.l, the controller for the leg. The whole armature moves along, spine and everything attached to it. That's not right! Remember we had a similar problem with the arms, and fixed it by disconnecting the shoulder in order to break the chain. This time, though, there's a setting in the IK Solver constraint made for fixing just this sort of thing.


Changing ChainLen to 2.
  • Select the lower_leg.l bone again.
  • In the Constraint panel under the IK Solver constraint, change ChainLen to 2. By default, ChainLen is zero, (or undefined) meaning that the IK Solver involves the entire chain no matter how long it is. By changing it to 2, we told the IK Solver that the chain is only 2 bones long - in other words, only the lower_leg.l bone and the upper_leg.l bone.


Now moving leg.l works correctly.
  • Try selecting the leg.l bone again and moving it. Just the leg should move now.

Now do the same thing to the right side of the body:

  • In Edit mode, disconnect toe.r and make it the child of leg.r.
  • Disconnect foot.r and make it the child of leg.r.
  • Make leg.r the child of none.
  • Switch to Pose mode.
  • Add an IK Solver constraint to lower_leg.r. Make the target foot.r in the object Armature. Alternative: a faster way to add an IK constraint is by selecting the Target (foot.r), then shift-selecting the bone (lower_leg.r) and pressing ⇧ ShiftI.
  • Change the ChainLen to 2.

Weight paint the lower body

From working on the upper body, you know how to weight paint. Let's do the same thing for the lower body.

  • In Pose mode, clear the location and rotation of all bones with A-A-AltR-AltG.
  • In the Armature panel, change the draw type back to Stick.
  • Select the character mesh.
  • Ctrl⇆ Tab to get into Weight Paint mode.
  • Double check:
    • X-Mirror is selected (important!)
    • All Faces and Vertex Dist are unselected
    • Weight is set to 1.0
    • Opacity is set to 1.0
  • Select each bone and start weight painting, remember to rotate the view around to paint all vertices. I ended up not using the hip bones directly - the character was deforming fine without them, so there are no weights shown here.
upper_leg.l weights.
lower_leg.l weights.


foot.l weights.
toe.l weights.


Test poses

Try out the new functionality with some test poses, and render with F12.

Test pose


Summary
We constructed the lower body armature, added IK constraints, and weight painted it. Next we'll tweak the rig to make it easier to control.


Next: Final rig adjustments

Previous: Upper body: weight painting

Back to Index