Rigging 101 Part 2 -- Introduction to the Armature
This is a continuing of the BU rigging 101 tutorial. Part 1 can be found here:viewtopic.php?t=2107
Also, I am trying a new style. If you find this style better, let me know. The key to the style is as follows:Green
-- Topic Header. This is the overall topic I'm discussing. These are basically "stand alone" topics.Blue
-- Major Section. You can effectively skip sections from one blue to another and still have a working rig as long as you do at least one of the blue sections. For example, you can skip the envelopes section and go right to vertex group section and still have a working rig. You still need to do at least one of the blues to have a working rig.Brown
-- Sub-Topic header. This is required for the Major Section but needs to stand as a topic within the section. You can't skip these and have a working rig.
Before we get into armatures, it is necessary to cover some basic concepts related to armatures.Forward Kinematics:
Forward Kinematics, commonly shortened to FK, refers to the process of moving an object one joint at a time in the case of an armature or one object at a time in the case of non-armatured animation. It is one of the oldest forms of animation and one of the easiest to rig. Although you are more likely to refer to IK in the context of an armature, an armature isn't required to do FK animations. Consider the bouncing ball. This is a form of FK on the ball. The same process is involved with armatures. You move each bone and set keyframes much like the claymation character discussed in part 1. Remember that keyframes define key moments in motion such as the ball at the top of its bounce and again at the bottom.
Another way to visualize FK motion is to hold your hand out in front of you with your index finger pointing parallel to the ground. Grasp your index finger between the first and second knuckle and rotate it down slightly, Hold that pose. Now grasp it between the second and third knuckle. Further rotate that knuckle down a little and hold that pose. Repeat for the last knuckle. You have just posed your finger using FK. Inverse Kinematics:
Inverse Kinematics, commonly called IK, refers to the process of using one object to control a group of linked objects. IK is usually used on armatures but hooks and empties can also be IK drivers. By definition, an IK driver isn't part of the chain it is controlling. To visualize IK in action, lets go back to that finger example. Holding your index finger out again, grasp the tip and wiggle it up and down. Notice that the joints follow the movement you put on the tip. This is IK motion. As stated earlier, IK motion is best suited for organic modeling since bones in the organic model are designed to follow in a connected fashion. IK in Blender is achieved by a constraint applied to an unconnected bone in the "chain". It has to be unconnected to avoid becoming influenced by the constraint. All this will be explained when we get to the IK_Solver part of this tutorial. Armatures
The same principle we used in our bouncing ball can be applied to any object or material in Blender. This is all well and good but doesn't work very well on models which have joints that bend. Also, as the Dire Straits video has shown us, characters don't look natural when they move using IPO only methods. Another device was needed to give finer control to model deformation. Enter the armature! An armature is a modeling tool that is not rendered directly but its effects are. It is a modifier on the mesh whose layout has its roots in anatomy. So much so that the components of an armature are called bones. A bone is further broken down into 3 parts. The head is the little ball at the tip. The tail is the ball on the other end with the body in between. Bones can be connected or disjointed. They exert influence on the mesh in one of 3 defined ways. They can influence based on vertex groups or envelopes or influence other bones. Envelopes are simply spheres of influence with a surrounding falloff ratio. Vertex groups are defined vertexes that move when the bone moves. The amount of the influence is defined by the weight assigned to the vertex group. Blender's "Old" Method (AKA Manual Association)
In the early days of Blender, the only way to get an armature associated with a mesh was to manually add the Armature modifier. We can still do it this way today which means that tutorials that describe this method are still valid today. Below is a blend that we will use for this part of the tutorial. All it is is a cube that has been subdivided with its middle scaled down. This blend is part of the ManCandy FAQ tutorial series which I recommend to every Blender head. http://blenderunderground.com/files/use ... _004.blendArmature Creation
Armatures are created the same way you create any object in Blender, namely by using the "Add" feature. Let's add an armature to our simple mesh. SPACEBAR->Add->Armature will do the trick. It is important to note that when you add the armature, it will place the first bone at the 3D cursor location oriented according to your pivot mode settings. Like all objects, it has an object origin but unlike mesh objects, the origin can't be relocated using the "Center New" button directly.
When you add the armature, a few things happen besides the addition of the armature. First, a new panel appears in the button window:
The first section is the editing options. They are as follows:X-Axis Mirror:
This will allow you to add bones in a mirror manor the same as the X-Axis mirror modifier for meshes. You use the SHIFT-E KEY to start the mirrored bone extrude.X-Ray:
Allows the bone to show through the mesh. The default is off which means that if you are in any other mode besides wire view, then the bones will be "hidden" in the mesh. It is wise to turn this on during the rigging process.Auto IK:
This is a modifier to the armature that will try to guess the IK chain length in a logical fashion. It isn't recommended as I'll explain when we hit the IK part of this tutorial.
The next section deals with the display options. These are layers independent of the object layers. It allows you to "hide" bones to clear up clutter for the animator. They are used heavily for complex rigs but not so much with simpler rigs. The buttons are as follows:Octahedron:
this will make the bones in an octahedron shape with two balls on either end which I will be discussing in the next section. this is the default view.Stick:
This will give the bones a stick appearance. Stick is usually what animators prefer because they allow for easy manipulation without the clutter octahedron give.B-Bone:
Displays the bones as a "bending" object. This is handy to use in spines since spines bend at the vertebrae.Envelope:
Display the bones as cylinders with the tips and tails easy to get at. It also displays the influence a bone exerts on the mesh as well as fall-off radius.Axis:
Display the local axis of a bone. This will put an axis with each bone so you can see how they are oriented. It adds to the clutter so usually it is left off.Names:
Displays the name of the bone next to each bone. This too can get quite cluttered but does help in identifying bones by name.Shapes:
Draw any custom shapes as if the shape were the bone. This is only useful if you have custom shapes of course.Colors:
Change the bone color to match custom colors.
The last section is deform options. These options dictate how the mesh will deform and is often the cause of rigging troubles. The buttons are as follows:Vertex Groups:
Use defined vertex groups as the means to deform a mesh. Groups are created to match the bone names when either "bone heat" or weight paint methods are used. You can also create vertex groups from envelopes.Envelopes:
This uses a special modifier to determine influence and fall-off based on the envelope display option.Quaternion:
Quaternions extend the concept of rotation in three dimensions to rotation in four dimensions. This avoids the problem of "gimbal-lock" and allows for the implementation of smooth and continuous rotation. This is another handy feature in organic modeling. In effect, they may be considered to add an additional rotation angle to spherical coordinates ie. Longitude, Latitude and Rotation angles represented as [X Y Z W]. I don't cover Quaternions in this tutorial but if you are doing organic modeling, I recommend you look it up.Rest Position:
This puts the armature in the default or "rest" position. The rest position will differ from the posed position. Turning this on will halt any movement an animation has defined. For more on one use of the rest position, see my tutorial on BVH Motion Capture where it is used heavily:http://blenderunderground.com/forums/viewtopic.php?f=12&t=1664Delay Deform:
This disables the movement of children when the parent bone is moved in pose mode. I haven't found a use for this yet so I can't provide an example of its use. If you can come up with one, I'd be interested...B-Bone rest:
This disables the bending bones you have defined. Again, it removes any animations you have associated with the B-Bone allowing for manipulation of the mesh without the bone being bent.The Armature Modifier
Before an armature can control a mesh, we need to assign the armature object to the mesh object. Blender does this with an armature modifier. In the editing buttons (F9) go to the Modifiers panel and select "Armature" from the dropdown list:
When you add the armature modifier, it will bring up the modifier window:
Type in the name of the armature in the "Ob:" field (Marked in red below):By default, Blender will use both envelopes and vertex groups to determine the influence exerted on the mesh. This is NOT the most optimal because it allows both to influence the mesh which can lead to Blender getting confused and deforming the mesh in unexpected ways. If you are going to use envelopes turn off vertex groups and if you are going to use vertex groups then turn off envelopes to avoid the confusion.Blender's "New" Method (AKA Automatic Association)
Now that we know the long way to associate an armature to a mesh as well as what's involved in the process, it is time to learn a "new" method to automate the process. To do the association this way, start by adding an armature just like you did above (SPACEBAR->Add->Armature). Select the mesh the SHIFT-Select the armature in object mode and press CTRL-P. It will bring up a menu asking the following:
Select "Armature" to begin the association. Blender will then ask you how to associate:
The choices are as follows:Don't Create Groups:
This is the selection you will use for envelope only control. This option will NOT create vertex groups. TURN OFF VERTEX GROUPS IN THE ARMATURE MODIFIERS WINDOW IF YOU SELECT THIS OPTION. TURN ON VERTEX GROUPS AND TURN OFF ENVELOPES FOR ANY OF THE OTHER OPTIONS LISTED BELOW.Name Groups:
This option will create vertex groups with the same name as the bone that is within it's sphere of influence. The groups DON'T have vertexes assigned to them. You have to do that manually. Also, the groups DON'T have influences assigned to the groups. In short, this option only creates the groups with the names of the bones.Create From Envelopes:
This option will create vertex groups and assign the influence of any envelopes to those groups. It is meant to be used AFTER you have adjusted the envelopes properly. Most older tutorials on the net today describe this method of association since it was introduced early in Blender's development and for version previous to 2.46 was "the best way" to get vertex groups associated to an armature. The vertex groups were then further tweaked with weight painting.Create From Bone Heat:
This option is only available in Blender versions 2.46 and greater. This is the "latest and greatest" feature for armature association. It uses algorithms to determine vertex groups with proper weights without messing with envelopes. Most Blender users today will use this feature and further tweak with weight painting.
Once you choose the method you want to use (vertex groups or envelopes), Blender will create a virtual association that you must "make real" before you can finalize the association:
Hitting the "Make Real" button will finish your association:This procedure can be used at any time but be warned, when you do this method, any tweaks you made to the influence of vertex groups through weight painting will be irretrievably lost.Anatomy of a Bone:
A bone is created when you add an armature and has a head that allows you to adjust the top part of the bone. Grabbing the head in edit mode will position the top of the bone wherever you want to place it. The tail will remain stationary. The same is true for the tail. Grabbing it will leave the head stationary while you move the bottom of the bone. Selecting the body will in effect select the entire bone. Additionally, the pivot point of the 3D cursor when the bone was added will determine the pivot mode of the bone. This is important to remember as you rig your mesh because it will affect how the rig moves in edit mode.
Grabbing the bone in edit mode and moving it down to control the bottom half of our mesh will begin our first armature rig. Adding New Bones
There are three ways to add new bones to our rig. Spacebar->Add->Bone:
This will add a bone at the 3D cursor. The added bone will NOT be parented to any other bone but will be connected physically to the last bone we had selected. An offset is maintained if the 3D cursor is NOT touching a tip. This method is usually reserved when positioning of the bone needs to be exactly where the 3D cursor is. You can then manually parent it to another bone by selecting the newly added bone then SHIFT-Selecting the bone that is the parent and pressing CTRL-P to complete the task. You will then be presented with the option to keep the offset or connect the child to the parent.Extrude:
You can also extrude a new bone from an existing bone. To do this, simply use the E KEY and drag the new bone to position over the mesh were you want it. SHIFT-E will start a mirrored extrude with subsequent E KEY extrudes being mirrored left and right. Very handy to use this feature in organic rigging. Extruded bones create a parent / child relationship as well as a connected chain of bones. Subdivide:
Bones can also be added using the W KEY->Subdivide operation. Like the extrusion method, this will create a parent / child relationship and connected state.
I used the Spacebar->Add->Bone method and aligned my bones so that I had two connected bones as outlined above. I named the new bone "Head" and the bottom bone "Tail". I then used CTRL-P to parent the head bone to the tail bone and chose "connected" when asked.
When we added this bone, it created a armature bone window:BO:
text box is the name of the bone.It is advised to name bones as soon as you add them. The bone name has significance because it will be used to name any vertex groups that are associated with the bone. Also, an animator will thank you because they aren't having to deal with "bone", "Bone.001", etc. while trying to locate bones to animate. Lastly, named bones using the .R and .L denoting right and left sides will be used by the animator for some automated animation techniques. So please, do us all a favor and name your bones!Child of:
dropdown box is a parent relationship. It defines a parent bone. If this field is blank, then the bone is defined as a root bone. There should only be one root bone in an armature. Con Button
determines if the bone is connected physically to its parent or if an offset is in effect. This may also read "off" if you have an offset assigned.Segm:
is how many segments the b-bone has. This is only valid for b-bone operations and determines how many segments are used to bend a single bone. More on this later.Dist:
Bone deformation distance. This is the falloff in numerical form. (ALT-S will adjust this number visually).Weight:
The amount of influence a bone has on the mesh. This is a decimal number fro 0 to 1.Hinge:
Don't inherit the rotation or scale from the parent bone. This option will freeze the rotation and scale of children bones in effect turning the joint into a hinge. I have never used this option but I'm sure there is a use....Scale:
Don't inherit the scale of the parent bones. Like hinge above, this option affects the scale in children and like hinge I have never used it.Deform:
This option lets Blender know if the bone deforms the mesh or if the bone is merely a "helper" bone used to drive other bones that do deform the mesh. Not all bones deform the mesh directly and this is the option that determines if a bone does. By default, this is on so care needs to be used if you are working with driver bones.Multiply:
This option will multiply the influence of both envelopes and vertex groups. This is used when you have a hybrid armature that uses both envelopes and vertex groups. I don't recommend its use because again, it confuses Blender into weird deformations.Hide:
This will hide a bone which is handy to hide the "helper" bones that don't control the mesh directly. Armature Layer Buttons:
This is a means of reducing the clutter that can occur when you have complex rigs. It is a group of layers independent of the object layer controls. ManCandy for example uses these layers for control of things like arms, legs, facial, etc. with each set of controls being on their own layer. Stride Root:
This is a special control that will define a bone as the root for walk cycles. It allows for targeting where you want a character to stride. It is usually aligned to the grid and defines the "floor", or lowest point which a foot will hit.
Below is the outliner view of the parent / child relationship setup with two bones. Head is a child of Tail in this example. Note how it corresponds to what the armature bone window is telling you.Envelopes
Having the bones aligned to the mesh is not sufficient to animate it. Adjustments have to be made to the default influences that Blender has placed on the mesh. Enter the envelope. An envelope is a graphic representation of a bone's influences. Just like an octahedron bone, an envelope bone has a head, body and tail but it also shows the falloff. To see the envelope of a bone, you must select "Envelope" as the bone view type.
The falloff is decreasing values of influence with the strongest being closest to the bone. The bone itself has a value of 1.0 in the weight box of the armature bone window meaning that it influences at 100%. To adjust the influence the bone exerts, TAB into edit mode and select the head, tail or body and scale them to cover your mesh. Scaling just the head or tail will increase or decrease, depending on how you scale, the influence the top or bottom of the bone exerts on the mesh. Scaling the body will scale all three (head, body and tail). To adjust the falloff, use ALT-S. What you wind up with is the entire mesh covered by the influences you want. In our example, we want all the mesh to be influenced by the bone at 100%. The falloff is fine at the default since we aren't having a bone partially bending our mesh.
Applying a subsurface modifier to the mesh, ensuring the armature modifier is above the subsurface modifier, and posing the armature in pose mode, yields the following:
Using envelopes alone, you can animate a mesh very effectively. The drawback to envelopes is the fact that it is FK ONLY. You can't define IK using envelopes.Also, it isn't as precise as the next method we will discuss.Vertex Groups
A vertex group is a collection of points in the mesh that are defined in a named group. The armature bones then control those points to deform the mesh much more smoothly. If you consider the envelopes we discussed earlier, the influence was defined on the bones. In the case of vertex groups, the influence is defined on the vertex points of the mesh. Like everything in Blender, there are multiple ways define vertex groups. In fact, if you use the automated method of armature association, all the choices but the first will create vertex groups for you. You can also create them manually in the editing panel for the mesh (F9). In this section we will look at the various methods to create vertex groups associated with armatures. Vertex Groups Control Panel
In the "Links and Materials" panel of the editing buttons window (F9) you will find the following:
Highlighted in red are the vertex group controls (shown with association already made for discussion purposes). They are as follows:Vertex Group Name Dropdown Box:
This is the names of your groups. It allows selection of already defined groups or renaming of groups.Weight:
The default weight to be used for the group. This can be tweaked with weight painting. More on this later.New:
Create a new group. Manually creates a vertex group for the mesh.Delete:
Delete the selected group. Manually removes a vertex group from the mesh.Copy Group:
Copy the selected group to a new group in effect creating a duplicate of that group. This is mostly used for key frames which I go into in a later tutorial.
Further, in edit mode for the mesh four new buttons appear:Assign:
Assign selected vertexes in the 3D window to the selected group.Remove:
Remove selected vertexes in the 3D window from the selected group.Select:
Select the vertexes in the group and display them in the 3D window.Deselect:
Deselect the vertexes in the group in the 3D window.
It should be noted that selection and deselection of vertexes in this panel are to be used in conjunction with the mesh in edit mode in the 3D window. It can be tricky to work with groups because Blender doesn't clear selections made between groups. For example, in our test blend with groups assigned, selecting the verts in the head group will do just that, but changing to the tail group will still leave the head group selected. If you were to then select the tail vertexes, all the vertexes in the mesh would be selected. I'll be illustrating this pitfall later in this tutorial.Vertex Group Creation (Automated Modes)
As stated earlier, there are many ways to setup vertex groups in Blender many of which are automatic. One such way is to use the automated method of armature association described above and choosing any of the vertex group methods besides "Don't Create Groups". The default for the group names will be to use the same names you gave your bones. This is one reason it is very important to name your bones when you create them. It makes finding the proper groups easier.Weight Paint
Weight Painting is the process of defining an influence to a vertex group in a visual way. It is color coded with dark blue representing the least influence and dark red representing the most. Further, there are predefined weights that you can apply from the weight painting toolbox. They are 0, 1/4, 1/2, 3/4 and 1. These are approximations of the strength of the influence. 1/4 for example is an approximate .25 influence. I say approximate because there is a falloff which can be adjusted by scaling your brush size up or down using the scroll wheel. You select weight paint mode by choosing it in the 3D view type dropdown box outlined in blue below.
The tool outlined in red restricts painting to a selected area. The selection will be just like face selection in mesh edit mode. Holding the SHIFT key will select multiple faces. Once selected, painting only effects those cells.
The toolbox for weight painting Weight:
The bone deformation to assign to a vertex group. The scale is from 0 to 1 with 0 being the least and 1 being the most.Weight Presets:
The buttons below the weight slider is pre-selected settings for the weight slider. The choices are 0, 1/4, 1/2, 3/4 and 1. These pre-selectors allow quick definition of those weights.Opacity:
The amount of "pressure" applied to the brush. This will adjust how long it takes to go from dark blue to red allowing fine tuning of the weight painting. Like the weight slider, it is scaled from 0 to 1.Opacity Presets:
The buttons below the opacity slider is pre-selected settings for the opacity slider. The choices are 1/8, 1/4, 1/2, 3/4 and 1. These pre-selectors allow quick definition of those opacity.Size:
This is the size of the brush to use. The scale of the brush allows you to paint either wide areas of your mesh or fine details without hitting wrong areas. The scale is from 2 to 64. This is measured in pixels. Wire:
This turns on the wire-frame for the mesh. It shouldn't be confused with the paint mask since it is informational only and doesn't serve to restrict painting.Mix:
This is the default mode for painting. It mixes the weight of the painting allowing for additions and subtractions based on the weight paint selector. This means that if you select 0 as the weight, it will subtract from the current weight taking it towards dark blue. The reverse is also true. If you set the weight to 1 it will add to the weight taking it to red. Add:
This will only add to the weight allowing the weight selector to determine the speed of change. Sub:
This will only subtract to the weight allowing the weight selector to determine the speed of change.Mul:
This multiplies the vertex colors. Personally, I don't see any change when I apply this so I have no idea what it really does. If anyone has insight into when it is used, reply to this thread and I'll add it to this tutorial.Blur:
Blurs the weight painting with surrounding areas. Basically, this allows you to smooth out a rough.painting. Meshes rarely move in creased fashion. This is used heavily in organic modeling.Lighter:
Paint over darker areas only. This will allow you to paint darker areas without affecting already lighter areas you have already painted. Darker:
Paint over lighter areas only. This will allow you to paint lighter areas without affecting already dark areas you have already painted.
A properly painted mesh will have the influence "feathered" from strong to weak for each bone unless a sharp crease is what you want when you bend:Named Groups, Create From Envelopes and Bone Heat
If you used the automated armature association process, you were given three automatic vertex creation options.
Create From Envelopes will convert any envelopes you defined into vertex groups. This was the favorite means of creating the vertex groups for a very long time in Blender. There are many older tutorials that describe this method still out there and they all still work today.
Create From Bone Heat is the "latest and greatest" method to make groups that uses algorithms to try to estimate an appropriate weight to but on the groups. Blender is good at guessing but some tweaking in weight paint mode will be needed.
Lastly, Create Named Groups will create the groups based on the bone names but with no vertexes associated. This allows you to define which vertexes are in the selected group. You can then proceed to weight paint those groups to define the influence.
That ends part II of this tutorial. In part III we will explore in more detail a more complex armature than we used here. We will also be going into detail on the various constraints and IK manipulation. Until then, happy Blending.