Think about how you would animate a character. You definitely wouldn't want to move each vertex, frame by frame. Instead, we'll create a skeleton, complete with bones, and then move the bones in order to move the character. This process is called rigging.
In Blender, the skeleton is called an Armature. The idea is this:
- An Armature is composed of many Bones.
- Each Bone can have some vertices assigned to it.
- When you move a Bone, just the vertices assigned to it will move, and all the other vertices will stay still.
- The goal is to set up the Bones in the Armature so that neighboring Bones move neighboring vertices smoothly and naturally.
Just to give you a heads up, first we'll create the upper body armature, and once that's done we'll move to the lower body. Legs and feet take a little more work to do right, but hopefully by the time you get there you will be experienced from working on the upper body.
For "real" armatures . . .
This, by design, is a very simple armature to demonstrate the basics. If you are interested in making your character easier to control, see the Rigging BSoD project. There you will find lots of information on rigs suitable for the most demanding applications. Here we're just doing a simple rig to illustrate Blender's tools.
Apply the Mirror modifier
Up until now, we've been operating on one side of the mesh, and the other side has been automatically updated by the Mirror modifier. The Mirror modifier created virtual vertices on the other side of the mesh, and before we can attach an armature to the mesh we need to make those vertices real.
Important: Make sure the character mesh is the way you want it. We're about to leave the Mirror modifier behind for good. You can always change your mesh later, but it won't be as easy as using the Mirror modifier.
- With the character mesh selected, go to the Edit buttons
- In the Mirror modifier, click Apply (Applying the Mirror modifier to make the mirrored vertices real)
- You may get an error message like "Modifier is not first" ("Modifer is not first"). This refers to the stacking order of the modifiers; just click on the message and the Mirror modifier will automatically be moved to the top of the stack for you.
- The next message you see is "Applying will delete mesh sticky, keys, and vertex groups" (Second warning message). Click on that message to accept. We haven't made any such groups yet, so it'll be OK. We're about to make a LOT of vertex groups, though -- this is why we're applying the Mirror modifier now instead of later!!!
Time to add the Armature. In order to take advantage of symmetrical modeling tools, we want the center of the armature to be on the centerline of the character mesh. To do this,
- Select the mesh and enter Edit Mode.
- Select a vertex on the center line of the mesh.
- ⇧ ShiftS for the snap menu
- Cursor to Selection to snap the cursor to the selected vertex
- The cursor is now on the center line (3D Cursor on centerline of mesh).
- Switch to Object Mode and Front View (1 NumPad).
- Add an Armature object with Space>>Add>>Armature.
IMPORTANT: For many of the armature tools to work, the armature object has to have a rotation of (0,0,0) in X, Y, and Z. Depending on what view you added the armature in, your armature may be in a different rotation or location. To reset the armature object back to its default orientation,
- Switch back to the armature's Object mode.
- Use AltR to clear the rotation of the armature object.
- Now switch back to the armature's Edit mode. Any further rotating or moving should be done in Edit mode.
We've just added an armature, and it's composed of a single bone. Just like with meshes, Armatures have Object and Edit modes, and when you add an armature you automatically enter Edit mode. You can tell you're in Edit mode when you see yellow (selected) or pink (unselected) endpoints of bones.
- Each Bone has a ROOT (the blunt end) and a TIP (pointy end) (Anatomy of a Bone). At least, that's how they are represented in the default Octahedron draw type. We'll use other draw types later, where the root and tip aren't so obvious.
There are a couple of settings to make before we start building the rest of the rig. With the Armature still selected, these settings can be found in the Edit Buttons.
- Important: In the Armature panel under the Edit buttons, make sure X-Axis Mirror Edit is selected. This will allow us to symmetrically extrude bones to make the skeleton.
- Also make sure X-Ray is selected. This makes the bones visible through the mesh, and makes editing easier - we don't have to keep switching to wireframe view to see the bones inside the body (Bone display settings).
Extruding the spine
- Select the bone you added. You select an entire bone by clicking on the middle of it. You can also select a bone by selecting its root and then shift-selecting its tip.
- Switch to Side View and move the bone so it's closer to the pelvis and near the center of the body, roughly aligned with the neck.
- Select just the tip.
- Grab the tip and move it up a bit to enlarge the bone in the Z-axis (G and Z) as in Lengthening the spine1 bone.
- With the tip still selected, do a constrained extrude along the Z axis with E,Z to make the second bone in the chain (Extruding the spine 1).
- Do three more Z-constrained extrudes so you have a total of 5 spine bones (Extruded spine). The rib cage doesn't bend in a human, so this spine is a little more flexible than it would be in a real human.
- Extrude a neck and a head bone. Note the head bone extends out the top of the head a little bit. That's so we can easily select the bone even if X-Ray is turned off for the armature.
We should name these bones. The names will appear in other parts of the interface, so it's useful to give them meaningful names now to avoid confusion later.
- With a bone selected, you can change the name of the bone in the Edit buttons Armature Bones panel (Armature Bones panel in the Edit buttons). I selected the bottom bone and changed the name to spine1.
- Select each of the other bones in the spine and name them something meaningful. I named them, from the bottom, spine1, spine2, spine3, spine4, spine5, neck, and head. When they are all selected, they all show up in the Edit buttons (Named spine bones).
Extruding the arms symmetrically
- Go back to Front View (1 NumPad)
- Select the tip of spine4.
- Something new: ⇧ ShiftE to symmetrical extrude and create a shoulder bone, as in Symmetrically extrude the shoulder bones. Symmetrical extrude only works if we have X-Axis Mirror Edit mode on, which we (conveniently enough!) turned on a couple steps back.
- With the tip of the shoulder still selected, do another ⇧ ShiftE symmetrical extrude to make an upper arm bone (Symmetrically extrude the upper arm bones).
- Continue symmetrically extruding to make the lower arm . . .
- . . .the hand bone . . .
- . . .and two fingers bones.
We have all the arm bones, now lets position them a little better. It's easiest to do this if we can see roughly where the vertices are in the mesh. Since we're working in the Armature's Edit mode, we can't view vertices in the mesh's Edit mode as well. Instead,
- ⇆ Tab to exit the armature's edit mode.
- Select the character mesh.
- Turn off "Subsurf in interactive view" in the Subsurf modifer. This will allow us to see the true base mesh, and line up the bones accordingly (try Wireframe mode without doing this step to see what I mean).
- Switch to Wireframe view with Z.
- Select the armature again, and enter Edit Mode (⇆ Tab).
- Adjust the elbow so that it falls within the three elbow vertices in the mesh (Adjusting the elbow from Front View)
- Do the same from Top View (Adjusting the elbow from Top View).
- While you're in Top View, make sure all the arm bones fall within the mesh (Top view of arm bones).
- ⇆ Tab, select character mesh, turn Subsurf back on in interactive view, hit Z again for shaded mode
- Select the armature again and enter Edit Mode.
Naming the bones
Now for some naming. We have to be careful about naming these bones.
Bone naming conventions
In order to have some very handy X-Axis mirror tools work, we need to name symmetrical bones something like "bone.L" for the left bone, and "bone.R" for the equivalent right bone.
You could also use "bone.l" and "bone.r", or "Left.Bone" and "Right.Bone" . . . the symmetrical tools are pretty smart that way ONLY as long as both symmetrical bones have the same naming convention.
To be consistent, I'm going to use:
- All lowercase letters for the bone names, including "l" and "r" for left and right
- Two-word bones will have an underscore separating the names (upper_arm.l)
- The LEFT side is the CHARACTER'S left side. In front view, this often means you have to think a second before deciding which is left or right.
- Change the names of the bones to something that makes sense. Just make sure that the left and right bones are symmetrical. Under the Edit buttons (same place you turned on X-Ray and X-Axis Mirror Edit), you can turn on Draw Names. This will display the names of the bones, and is helpful to see if you missed naming any bones.
Bone names, below, is a screenshot of the names of the bones I used. You'll probably have to click on the image to view it full size and see the bone names. It's at a strange angle so that all bone names are clearly visible. The names I used were:
Testing the rig and adjusting the arms for Auto-IK
By now, you're familiar with Object mode and Edit mode. We're going to use another mode that's specific to armatures: Pose mode.
- With the armature selected, press Ctrl⇆ Tab. This essentially substitutes Object Mode for Pose Mode. In other words, you can now press ⇆ Tab and switch between Pose mode and Edit Mode. If you need to get Object mode back, press Ctrl⇆ Tab again, and you can then switch between Object and Edit mode with ⇆ Tab. You know you are in Pose mode when you select a bone and it is outlined in light blue.
For armatures, Edit mode is used to construct the armature. Object mode is to move the entire armature as a whole. Pose mode is used for, well, posing. In Pose mode, you can grab, rotate, and scale each bone individually.
- Try selecting the upper arm in Pose mode and rotating it in Front view. Notice how all bones "downstream" of it rotate as well.
- Now select the lower arm and rotate it in Front view. The upper arm stayed in place, but the lower arm and everything "downstream" rotated. This is the essence of parenting.
That is, the upper arm is the parent of the lower arm. The lower arm is in turn the parent of the hand bone. Another way to say that is that the hand is the child of the lower arm. These parent-child relationships were automatically created when we extruded the bones. The extruded bone becomes the child of whatever it was extruded from. That's the reason we started from the lower spine and extruded upward, as well as starting at the shoulder and extruding toward the fingers.
- Clear the rotation of all bones by using A twice to select all, then AltR to clear rotation. The bones are now reset to their original rotations. You'll end up using this command a lot, along with the related command AltG, which clears location.
- Turn on Auto IK in the Armature panel, under the Edit buttons.
- Select the tip of the arm and move it with G. Note that it moves much differently now!
A little explanation: Forward Kinematics, or FK, is the way of moving bones that we first used. That is, rotate the upper arm, and its children (and children's children!) follow along. The opposite of FK is Inverse Kinematics (IK), where we move a child and the parents follow along. In reality, there is some fancy math going on in the background that tries to point the chain of bones toward the target. What's the target? For Auto-IK, it's whatever bone you have selected. In this case, the target is the finger2.l bone. What's the chain? It's the lineage of bones going all the way back to the great-great-great-(etc)-grandparent.
In our armature, when we moved the finger bone, all the bones in the chain tried to point to wherever we moved it. An orange line showed up, connecting the finger2.l bone to the spine1 bone. The orange line points to the root of the chain: spine1 is the highest parent of finger2.l, and the chain is everything between spine1 and finger2.l.
It would be nice if the spine didn't move so much when we moved the arm. We'll fix this by essentially breaking the IK chain at the shoulder so only the arm moves and the spine stays still.
- Go into Edit mode of the armature with ⇆ Tab. Note that even though you may have just moved some bones around in Pose mode, upon entering Edit Mode everything goes back to the way it was. In Edit Mode, you're viewing the bones as they are in Rest position, and once you go back out to Pose mode, your posed armature will return.
- Select the upper_arm.l bone in Edit mode.
- In the Armature Bones panel under the Edit buttons, deselect the Con button. In this panel, the child of: menu indicates that this bone, upper_arm.l, is the child of shoulder.l. We want to keep that relationship, but we'd like to allow upper_arm.l to be disconnected from shoulder.l . . . and therefore break the IK chain. Con stands for Connected. By deselecting this button, we disconnected the upper_arm.l bone from the shoulder.l bone.
- To test this new setting, switch to Pose mode (⇆ Tab).
- Reset the armature by pressing A twice to select all bones, AltG to clear locations, and AltR to clear rotations.
- Now, move the finger2.l bone again. Much different! The orange line now points to the root of the chain, which is the upper_arm.l bone.
While we were able to extrude bones symmetrically, we have to make changes to the settings separately. To disconnect the upper_arm.r bone from shoulder.r in the same way,:
- Switch to the armature's Edit mode
- Select upper_arm.r.
- Deselect the Con button.
- Test the armature.
Add an Armature modifier to the Mesh
Now that we have an armature, it's time to attach it to the mesh. To do this, we'll add an Armature Modifier to the mesh.
- Select the character mesh, in Object Mode
- In the Edit Buttons, choose Add Modifier>>Armature
- Important: move the Armature Modifier to the top of the modifier stack with the up arrow. If you don't, then your mesh might deform in weird ways later on.
- In the Ob: text box, enter the name of the armature object (Enter the name of the armature object into the armature modifier). The default armature name is, logically enough, "Armature". To double check the name of your armature, select the armature and look for the OB: text box in the Edit buttons, like in Checking the name of the armature.
- In the Armature Modifier, make sure only Vertex Groups buttons are selected. We will not be using Envelopes in this tutorial.
Now Blender knows that we want the armature to affect the character mesh. Next, we need to tell Blender exactly what vertices to move when we move, say, upper_arm.l.
We added an armature object, and sequentially extruded bones to make an armature for the upper body. We made some changes to allow for the use of Auto-IK, should we choose to use it later on. Next up: weight painting!
Previous: Materials and textures