Customizing shapes and colors for your bones

Not only do we need to create rigs that work, but they also need to be usable for the animator. Blender offers us a property for the bones called X-Ray, that allows us to view the bones from any angle, regardless of the mesh it deforms. It can be useful sometimes, notably when editing the bone chains, but using X-Ray in more complex rigs can confuse the animator. Take a look at the clutter in the next screenshot, where all bones of our character Otto are visible and with X-Ray enabled:

As we mentioned at the beginning of the chapter, a rig must be visually simple and intuitive, so anyone without prior guidance can start moving the character without trouble. It is possible to change the default shape and color of your bones in Blender, making your rig much more usable and intuitive.

Getting ready

Creating custom shapes and colors for your bones in Blender is easy, and we'll see some good practices for your rigs. You can use any chain of bones in Blender.

How to do it...

  1. Open the file 001-Legs.blend. It has two chains of three bones indicative of two legs of a human, as you can see in the next screenshot. We're going to make shapes for all the bones, and we'll make the bones of each leg a different color:
  2. In Object Mode, create a single plane through Shift + A | Mesh | Circle. On the Operator tab, in the Tool Shelf (press the T key to open it), change the values of Vertices to 8 and Radius to 100.
  3. In the Properties panel (press N), set the name of this object as SHAPE_Leg. Get in Edit Mode (press Tab), select the two vertices positioned over the X axis, and make an edge (F) between them. This would make a line to divide the octagon in half, similar to the one in the next screenshot:
  4. Go back to Object Mode (Tab) , select the armature, and enter into Pose Mode (Ctrl + Tab).
  5. Select Thigh.L and go to the Bone tab in the Properties window. Under the section Display, click on the field called Custom Shape and select SHAPE_Leg. Check the box called Wireframe, which will make your custom shape always be drawn in a more pleasing way, regardless of your current viewport shading. The next screenshot shows these fields:

    You'll see that your bone will change from the default octahedron to the shape you just created. But you'll also notice that the rotation and position of the shape don't help much, since we need it at the middle of the bone and perpendicular to its direction. The next screenshot shows the problem:

    Note

    If you don't see the shapes after this step, go to the Object Data tab under the Properties window and make sure that the boxes Shapes and Colors are enabled.

  6. Select your shape object again, enter in Edit Mode (Tab), select all the vertices (A), and rotate (R) them 90 degrees in the local X axis. You'll see that the bone shapes update automatically. To fix the position, making the shape stand about half of the bone, move (G) the selected vertices in their local Y axes until you are happy with the result. Still in Edit Mode, resize (S) the shape to achieve a reasonable size in your rig. The next screenshot shows the result:
  7. Now you can use the same shape for the Ankle.L bone, using the Display section in the Bone tab under the Properties window.
  8. Repeat the same process and create another shape for the Foot.L bone: be creative and make a bi-dimensional shape of a foot. Name it SHAPE_Foot.L Repeat everything for the other leg and you should end up with something similar to what's in the next screenshot (I've created a simple character mesh to make it easier to see):

    Now, the colors! We can use them to distinguish the bones in various ways: a color for the left limbs and other for the right ones, a color for IK and other for FK and so on. The important here is to make it easier for the animator to visually understand the difference between bones. Let's make the left ones red and the right ones green.

  9. Select the left leg bones and press Ctrl + G. Choose Add Selected to Bone Group. This will create a new group of bones called just Group.
  10. Go to the Properties window and select the Object Data tab. Under Bone Groups, you'll see a group called Group. Select it and change its name to Leg_Left on the Name field.
  11. Under the Color Set list, select 01 – Theme Color Set and click on the Assign button to make these bones red. Repeat the task for the bones on the right-hand side leg, choosing an appropriate name and selecting the entry 04 – Theme Color Set to make them blue.

    Note

    The next screenshot shows our rig with shapes and different colors applied along with the settings on the Properties window (the color images can be downloaded from the publisher's website or viewed in the digital version of this book). The file 001-Legs-complete.blend has our finished recipe for your reference.

How it works...

By setting custom shapes and colors for your bones, you can offer a much more intuitive interface for your controls, making the task of animation easier. You should create shapes that are larger than the mesh deformed by the armature, so that you can see the bones without using the clutter caused by the X-Ray property.

You should look for shapes that are simple and that show information about the control. In our example, we created an octagon with an edge through its middle. This edge shows visually the local X axis of the bone, making it easier for the animator to understand the default transformation of it. Feet, hands, and eyes controllers are often made using figurative shapes similar to the one in this example.

There's more

Along with getting an organized 3D View, you should also be able to easily manage your entire scene. Blender has a special type of window, the Outliner, which allows us to see every object in our scenes organized hierarchically. But the Outliner alone doesn't do all the tricks: you have to create and name your objects properly in order to stay organized.

Pay attention to the Outliner

The Outliner is a great tool in Blender to see the hierarchy of objects in your file. But when you create a rig with lots of custom shapes, the Outliner list can easily become full of objects you won't use. To remove the clutter of it, it's recommended to create an object (normally an "Empty" named "Shapes") to be parent of all Shape objects. This way, you can easily browse on the Outliner without dozens of shape objects. It's also useful to make this Empty object child of the Armature object, so all shapes are hierarchically related to the rig.

To prevent these objects from showing up in your render, a good practice is to select them all (A), move (M) them to the last layer and hide (H) them from your scene. The next screenshot shows the Outliner of this recipe's scene. Notice that the shapes are hidden (the disabled "eye" icon) and will not be rendered (the disabled "camera" icon):

See also

Chapter 1: Get Rigging