From BlenderWiki

Jump to: navigation, search

Preface: Rigging in Blender

This preface contains a lot of good info, so don't skip it! It has two sections: Some Guidelines, and Some Explanations. If you read about something in one of the rigging tutorials that appears to be assumed knowledge, then you can probably find more info on it here.

Some Guidelines

This section is intended to establish some common practices that are good to follow when working with armatures. The main reason being that they will improve the quality of your work and make it easier for others to understand and work with your rigs.

Mesh to Armature Assignment

In Blender there are two ways to attach a mesh to an armature.

  1. The old method is to make the mesh the child of the armature. Because the parent/child relationship then exists between the objects, we can transform the armature in any way we like and the character stays together and functional, unbroken and showing no odd effects. This is not the case if we transform the mesh while the armature is not in rest position.
  2. With the addition of the modifier stack to Blender, we now have the armature modifier, which affords us some additional features. You can learn more about the modifier features in the Armature Modifier documentation.

The best option is to use an armature modifier, and give the mesh Copy Location, Copy Rotation and Copy Scale constraints, all targeting the armature. This means that both the mesh and the armature should be in the same exact location and, as always, they should both have 0 rotation and a scale of [1,1,1]. If your mesh center is not in the same location as the armature, just snap the cursor to the armature object (⇧ ShiftS, 4), select the mesh, and press the Centre Cursor button in the editing buttons (F9). If your scaling and rotation are off, then you'll have to clear the rotation and size while in object mode, and then reapply those transformations while in edit mode.

Using these three constraints simulates a parent/child relationship, but also locks our mesh in place so we can't move it. As shown on the armature intro page, moving a mesh relative to the armature is a bad thing. Using these three constraints prevents that completely, and from a rig design point of view, this is a wonderful thing! This eliminates yet one more way that someone could break the character.

The COG and the Armature Center

Basically every character has three bones in common: COG, body, and hip.

COG

COG stands for Center Of Gravity. All things, everywhere in existence, have a COG. This is why CG characters should have a bone to represent the COG. When tossed into the air, the COG is the point about which something rotates. The COG bone is the top most level of the rig hierarchy. Every bone in the rig is somewhere in the tree underneath the COG. This means that transforming the COG transforms the entire character. This is the bone we animate if our character is going to be falling large distances, flying through the air, performing aerial acrobatics, or the like.

The Armature Center

This creates a bit of a redundancy issue. All bones of the armature are children of the armature object, which has a center of its own. Transforming the armature center has the same effect that transforming the COG has, so why bother creating a COG bone?

The reason is that animated bones can be included in actions. Armature object animations cannot. So if you want to make an action of your character jumping and doing an aerial flip, you can't! You can animate it, but it has to remain as two separate animations, one would be the character jumping and landing, and the other would be the armature center's animation of moving through the air and rotating.

So what do we do? We use a COG bone. If a situation arises where you need to use the armature center instead, you still can, but you might have to use a little sleight-of-hand to make it work. If you animate with a COG bone, it will probably be moving away from the armature center. This means that if your character walks 10 units forward, rotating the armature is going to spin the character around a point that is 10 units away!

Body

Basically all characters have a body. It's the part of the character that the limbs are attached to. By having a body bone, we can move the character's body while the feet or hands remain stationary, because of IK effectors. Generally speaking, all characters should have a top-most hierarchy like this:

Note:

To be clear, hip is a child of body. Body and all IK effectors are siblings. Exceptions to this structure can certainly be used, but you should only make them for a specific purpose.

  • COG
    • body
      • hip
    • legIK.l
    • legIK.r
    • handIK.l
    • handIK.r
    • any other IK effectors

Hip

The hip bone should be the parent of both upperleg bones. In humanoid characters, there is one hip bone for both legs, and effectively one hip bone for each arm (but we call them shoulders, or clavicles). It is foreseeable that you may choose to make an alien character that has two hip bones, just as humans have two clavical bones.

The bigger point though, is that this bone moves a part of the body that one or more limbs are attached to, and still allows the IK effectors to remain stationary. For some more insight into the usage of such a bone, see the Bend-O-Matic Spine tutorial.


Plan Ahead

Especially when building very large rigs, it will benefit you to think ahead and note which parts of the armature will be the non-deforming bones. This way, you can deactivate Deform for the appropriate bones early in the building process, so that all duplicate bones will inherit this setting. This applies to the W key subdivide command as well.


When In Doubt, Snap To Grid!

  • You should not place bones haphazardly.
  • Designing a rig requires care and precision.

The armatures in these tutorials are drawn snapped to the grid, or to the cursor. Not all the joints of your characters need (or should) be placed exactly on the grid, but using the grid will help you place matching points when the need arises. Basically, the point is this: don't be careless with the placement of your bones. If it looks like two or more points share an exact location in the images you see here, then they do.


Layer Usage

The bones of an armature typically fall into one of three categories:

  1. Manipulable rig elements: Bones meant for transformation by the animator.
  2. Deform bones: Bones set with Deform active, these move the mesh and often don't need to be dealt with directly by the animator.
  3. Non-manipulable rig elements: Elements of a rig that work as part of a larger system to cause an effect, but don't need to be dealt with by the animator.

When an animator works with a character, he wants to see two things:

  1. The character, in one form or another.
  2. The character's controls.

We don't need to have a plethora of bones on the screen during animation if only two or three drive the whole system. By using bone layers, we can organize bones into groups however we see fit, and only display the section of the armature we need to work with at any given time.

You should try to assign priorities to your groups, and then place them accordingly. For example, you will probably want to put all manipulable rig elements into layer one (the farthest left layer button), since these are the bones that the animator is going to be working with. If the animator is going to need multiple sets of manipulable rig elements, then place these into the far left layer buttons so they have the appearance of higher status.

The tutorials in this chapter will assume you can manage bone layers with this concept in mind, as you follow along, or whenever you feel it's a good time to do some organization. The tutorial images will be meant to present rigs in a way that either helps you understand them better, tries to show all the components, or just makes them look cool.


The IK and Constraint Hotkeys

When building an entire character rig, the IK hotkey--⇧ ShiftI--comes in very handy for assigning IK constraints. Remember to make use of it always, because it's much faster and easier than the alternative.

The same should be said for the constraint hotkey, CtrlAltC.

More goes here

  • the dreaded bone roll angle
  • bones internal vs objects external
  • never parent to the IK effector



Some Explanations

If there some areas of rigging that still perplex you, then give these topics a good read. Hopefully you'll find the answers you're looking for here.

Understanding Hierarchies

Character rigging is completely based on objects hierarchies. If you don't understand how 3D object hierarchies work, then you are going to have a lot of trouble learning how to rig characters.

A Hierarchy is a way of arranging persons or things. In 3D computer graphics, all objects are children of the CG world. The CG world has a center and coordinate system, just like all of the objects in it.

Hierarchies1.jpg

Here we see two bones. The bigger bone is the parent, and the smaller one is the child, and the grid lines around them show the coordinate system of the parent bone.

Let me elaborate. Every object has a coordinate system. You can think of this as being like that object's own special little world (and believe me, it is special!). In our example, the smaller bone is the child of the bigger bone--the parent. This means that the child bone exists inside the parent bone's special world.

  • parent
    • child


Hierarchies2.jpg

A child object is like a person standing on earth. Not only is earth spinning around its axis, but it's also orbiting the sun. As you sit reading this though, you probably don't perceive any of that. That's why people use to think the world is both flat, and the center of the galaxy (because at the center, it would be stationary, while everything else appears to be moving).

Our child bone is naive like this. In this image, the parent bone has rotated, but the child doesn't know a thing about it. As far as he's concerned, he's still standing in the same place, facing the same direction.


Hierarchies3.jpg

In this image, the parent is back to its original orientation, but now it has been scaled on the Y axis. Does the child know about this? Nope. The world he's living in may appear to be warped to you and I, but as far as he's concerned, nothing has changed.


Hierarchies4.jpg

So what happens if the child runs around in a circle? Nothing special. Just like the world he's living in, it looks warped to us, but looks normal to him!


Hierarchies5.jpg

For fun, lets see his world both rotated and warped:

You have to keep this in mind if you are going to be parenting other bones to stretchable bones.


Terminology Overview

note for editing: this section could go into a wiki glossary.

  • floating bone: Any disconnected bone, but usually a single bone placed visibly outside the inner areas of the armature.
  • root bone: The first bone of a chain.
  • tip bone: The last bone of a chain.
  • chain: A series of connected bones.
  • parent: An object that has one or more children objects.
  • child: An object that has a parent object.
  • sibling: An object that shares a parent object with other children objects (like a sister/brother).
  • IK effector: A bone that moves around in space to define the target location of an IK chain.


The Design-and-Test Two-Step

Character rigs have functional aspects and structural aspects. You design the structures in edit mode, and you implement the functions in pose mode. As you are building a character rig, both of these aspects should be cycled and tested so that each area of the character can be assessed at a local level.

For example, build and test one finger, then do the other fingers and test them together, then the hand, then the arm, then the shoulder... Build and test the foot, then the leg. Build and test the spine, then the hips, then connect the legs to the hips and test the functioning of the two together, seeing how one effects the other, or both effect each other.

This process involves constant changing between edit and pose mode. You can even include animation as a testing procedure. You can move, add, or remove bones from the armature while it still has animation. You can add, remove, or otherwise edit constraints between bones that may or may not have animation.

The idea is that you learn to manage each area of the armature individually, so that you are not overwhelmed with too many objects and connections later on. This will also help you find and eliminate small problems before you build more systems on top of them.

The tutorials here will assume that you can make use of this work concept at any point, as needed.


More goes here

  • stretching vs reaching
  • weight painting == vertex groups
  • mechanical vs organics
  • building armatures on planes


--Wavez 09:05, 27 July 2006 (CEST)




by D R D