Book Image

Blender 2.5 Character Animation Cookbook

Book Image

Blender 2.5 Character Animation Cookbook

Overview of this book

Blender is an open source 3D graphics application that can be used for modeling, rigging, animating, rendering and thousands of other things. While modeling characters isn't the biggest of your worries, animating them to make them feel as-good-as alive is what differentiates a professional from an amateur. This book offers clear, illustrative, and easy-to-follow recipes to create character rigs and animations for common situations. Bring your characters to life by understanding the principles, techniques and approaches involved in creating rigs and animations, you'll be able to adapt them to your own characters and films. The book offers clear step-by-step tutorials, with detailed explanations, screenshots and support files to help you understand the principles behind each topic. Each recipe covers a logical step of the complete creation of a character rig and animation, so you're not overwhelmed with too much information at once. You'll see numerous examples and screenshots that guide to achieve various rigging and animation tasks, logically separated so you can understand each in detail. The rigging topics are divided by each region of the body (torso, limbs, face, eyes), and further separated by the specific topic (neck, fingers, mouth, eyelids, etc) for clarity. All rigging tasks are accomplished with the built-in tools in Blender, without the complexity of coding custom Python behaviors or user interface elements. The animation topics deal with common situations found in real world productions, showing good practices to understand and overcome the challenges.
Table of Contents (19 chapters)
Blender 2.5 Character Animation Cookbook
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Preface
Index

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...

  1. 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:

  2. 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.

    Note

    In order to better see the bones and their axes, go to the Properties window, under the Object Data panel, and enable the X-Ray and Axes properties.

  3. 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.

  4. 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.

  5. 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:

  6. 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 be D_tail.1 to D_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.

  7. 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 for Tail instead of C_Tail.

  8. 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:

  9. 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.

  10. 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:

  11. 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.

  12. 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:

  13. 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.

  14. 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.

See also

Chapter 3: Controlling the pupils

Chapter 4: Creating the jaw controller

Chapter 5: Controlling fingers