- Blender 2.5 Character Animation Cookbook
- Virgilio Vasconcelos
- 1375字
- 2021-04-02 19:12:10
Using separate bone chains for different tasks
A useful approach when building rigs is to create more than one bone chain to accomplish different tasks. The idea behind this is to not overwhelm you with so many functions attached to one single bone, making the rig easier to understand and modify.
It is useful to separate the bone chains by their main functions to make things easier to manage: one chain that will only deform your character's mesh, one for creating Inverse Kinematics (IK) controllers, another for Forward Kinematics (FK) controllers, interface, helpers, and so on.
By creating them separately, you can make changes without breaking things in your rig. If you stack all the functions and constraints on one single chain, a little change can make a real mess. By separating them you can also make your rig more appealing and usable by defining custom shapes, colors, and hiding bones that shouldn't be touched by the animator.
Getting ready
You need a mesh to be deformed by the bones you'll create. Open the file 001-Chains.blend
from this book's support files. It contains a tail-like mesh so you can follow this recipe to create separate chains, producing a scorpion-like movement.
How to do it...
- Position the 3D cursor on the base of the tail, with a left mouse click in the 3D View, as seen in the next screenshot:
- Press Shift + A and select Armature | Single Bone to create one bone which extends from the base to the tip of the tail. Enter in Edit Mode (press Tab), select its tip, and move (press G) it to the tip of the tail.
- Select the bone, press W, and select Subdivide. Repeat this two more times in order to get eight bones. Select each joint and move (press G) it so it fits the tail nicely.
- Select all the bones (the A key), press Ctrl + R, and type 90 so their orientation is set with their X axes pointing towards us. The X local axis will be the default to the front or back rotation.
- Refer to the recipe called Defining good orientations for your bones if in doubt. You should end up with something similar to the next screenshot, showing the front and side views:
- Still in Edit Mode, set the bones' names using the Properties panel (press the N key). For their names, use a prefix such as
D_
, which stands for "Deformation". That's the role of these bones: they're responsible for deforming our mesh. Good names can beD_tail.1
toD_tail.8
.Note
In Blender versions prior to 2.5, finding the name of a bone in the list displayed by the program could be a tough job, as seen in the next screenshot. Using prefixes are crucial to help you find the desired bone in a list and know its function without having to select it. With the arrival of Blender 2.5, finding a bone (or any object) by its name is much easier: just start typing in the appropriate field to narrow the selection options.
Now we're going to create the controller bone. This bone belongs to another "chain" of bones responsible for controlling the deformation ones. The controllers don't perform any mesh deformation by themselves. Although in this example this chain has just one bone for the sake of simplicity, more complex rigs can easily have dozens of them.
- Still in the armature's Edit Mode, place your cursor just above the tip of the tail and press Shift + A to add another bone. Press Ctrl + R and type 90 so that its orientation is the same as the deformation chain ones. Define this bone's name as
Tail
. The controller bones are usually named without prefixes in order to be friendlier to the animator, who will look out forTail
instead ofC_Tail
. - Disable the Deform option on the Bones tab in the Properties window, as seen in the next screenshot, so this bone will not perform any deformations on the mesh:
- Now we're going to add constraints to control our deformation chain. Go to the armature's Pose Mode (press Ctrl + Tab). Then, select the bone Tail (which is the controller one), press Shift and then select the bone on the tip of the deformation chain,
D_tail.8
. Press Ctrl + Shift + C to bring up the Constraints menu and choose Copy Rotation. - This will make the bone on the deformation chain copy the rotations of the controller one, but you will notice that it will copy the absolute rotation (which is not what we want). To make this bone copy the transformation based on its own rotation, select it and go to the Bone Constraints panel, under the Properties window. Check the Offset option and select Local Space on the two drop-down lists, as seen in the next screenshot:
- Apply the same constraint to all other bones of the deformation chain: select them and, lastly, the bone which has the constraint we want to copy. Go to the Pose menu on the window header and select Constraints | Copy Constraints to Selected. That will apply the same constraint to all bones of the deformation chain.
- Still in Pose Mode, select the
Tail
bone and rotate it. You'll see that all the bones on the deformation chain follow its rotation like a real tail, as seen in the next screenshot: - Since the animators wouldn't need to see or move the bones on the Deformation chain, you should select and move (the M key) them to another (and invisible) bone layer. I usually move my deformation bones to the last layer, so you can do the same for yours. You should now also turn off the X-Ray option for this armature, since it's no longer needed.
- Lastly, select the Tail mesh, hold Shift, click on one bone of the chain, press Ctrl + P, and choose With Automatic Weight to make our armature object actually deform the mesh, as seen in the next screenshot:
How it works...
By creating separate bone chains to accomplish different tasks, you end up with a very usable and organized rig, which is easy to animate and to configure, since each bone does only what is meant to do. This approach allows us to have a larger number of deformation bones to achieve softer results while still being simple to animate, having fewer bones to be controlled by the animator. This example showed how a scorpion-like tail can be controlled with only one bone, although eight bones build its structure.
There's more
The concept of separate bone chains will be discussed further throughout this book, notably when creating different chains to control arms, legs, torso, face, and eyes.
Don't get tied up on those chains
As your rig grows in complexity, you should use the bone layers that Blender offers you to manage the chains.
In some cases it is interesting to make a bone present on more than one layer. For instance, you may want to keep your main controller bones (limbs, head, torso) only on layer 1 and leave the detail controllers (facial expressions, fingers, eyes) on layer 2. But there are other bones which act only to enable and disable features of your rig, such as the ability to stretch limbs or switch between Inverse and Forward Kinematics (more about this in the recipe Making an IK-FK switcher).
These "general rig properties" should be present on both layers 1 and 2. To accomplish that, select the desired bone, press M to bring up the layer selection menu, hold Shift, and click on all the layers that you want those bones to belong to.
And always remember to use prefixes for your chains in order to find what you want quicker. You can use D_
for deformation bones, IK_
for Inverse Kinematics bones, FK_
for Forward Kinematics chains, T_
for target bones, M_
for mechanism, and so on. There's more on these uses in later recipes.