Before jumping in and creating joints left, right and center, let's take a step back and look at some of the main tools used in the rigging process.
In this series of tutorials, we will delve into the depths of rigging in computer graphics. This will be an introductory series focused on using Maya but the concepts can be easily applied to other packages. Over the coming weeks, we will be taking the male mesh that we created previously and building a rig for it that allows an animator to manipulate it. Before we start building the actual rig, however, let's first clarify what the role of the rigger is and get accustomed to some of the principal tools used during this process and also some common practices to create clean rigs that won't drive animator's nuts.
The mesh we will be rigging
So what exactly is rigging?
Rigging is what makes deforming a character possible. It's the process of taking a static mesh, creating an internal digital skeleton, creating a relationship between the mesh and the skeleton (known as skinning, enveloping or binding) and adding a set of controls that the animator can use to push and pull the character around as if he/she is a puppeteer. In layman's terms, rigging is the process of adding the digital strings to the puppet. The rigger is the Geppetto of our times.
As the role of the rigger primarily sits between the modeler and the animator, it's important that the rigger has a good understanding of both what the modeler is delivering to them and what the animator requires. Therefore the rigger needs to understand the importance of good edge flow so he/she can predict how the mesh will deform. The rigger needs to understand the principles of animation and the techniques an animator may employ to create the intended performance. On top of all of this, he needs thorough knowledge of anatomy, animal anatomy and kinesiology. And that's just for character work. There is also mechanical rigging that covers cars, planes, trains and so on. The list goes on. Hopefully, I am making it clear that the role of the rigger is pretty darn important. A model will only be a model until it touches the hands of a rigger and an animator can only create an amazing piece of movement or convey a heartfelt emotion through the use of a solid, reliable rig.
However, before attempting to replicate reality in CG, you would be very wise to take a long hard look at that reality first. If you are creating a human character, for instance, study the skeleton, the muscles and joint articulation. As another example, if you are looking to rig a car, find out how a car moves. In both cases, examples are all around you, so observe them, and where legal, touch them: feel their movement. The importance of basing 3D work on real world examples (where possible) will be a theme we will frequently return to.
The plan in this first tutorial is to cover the basic tools in Maya. We'll look at creating relationships through parent/child setups and Constraints. We'll cover joints: what makes them special and how to create and edit them. We'll look at Rotation Order and Gimbal Lock, before finally looking at how to create clean animation controls.
Parenting and Hierarchies
When it comes to rigging, understanding relationships is fundamental. If you break a rig down, what you will have is a series of relationships and connections, almost like a family tree. But in this family tree, it's important that your uncle gets on with your kleptomaniac cousin and your mother-in-law is pals with your narcoleptic niece. If this is not the case, you are sure to have a rig that will look fine on the surface but may start to fall apart later on.
In Maya, the most basic relationship you can create is a parent-child relationship. Let's do this now. First create a sphere and a cube and then rename the sphere ‘parent' and the cube ‘child'. Open up the Outliner (Window > Outliner) so we can view the results of the parenting. Now move the objects apart so they do not sit on top of each other. The procedure of parenting is to first select the child object, shift-select the parent object and then go Edit > Parent or hit P on the keyboard. In the Outliner, you should have noticed that the child object now lives beneath the parent object. If you translate the parent object, the child will follow. The same goes for rotations and scaling. In the Channel Box, zero out the translate and rotate values for the child object. In doing so, the child object should snap to the same location as the parent object. This is because the parent object is the child new world center. If you zero out the translate and rotate values for the parent object, the parent object will snap back to the Maya world center. This is because this object is a child of the Maya world, in a manner of speaking. The benefits of simple parent-child relationships are that the child object still has freedom to move around unlike using a Parent Constraint, which we will come to later.
So far, we have parented one object under another. Create a few more objects and parent them one under the other so you have the start of a small hierarchy. You'll notice that the object at the top of the hierarchy will affect all objects and the next object will affect the objects below it and so on. It's like your great-granny tells your granny what to do, your granny tells your mama what to do and your mama tells you what to do. But then you grow up and want to stop holding your mama's hand. To bring an object out of a hierarchy, we can simply unparent it by selecting it and going Edit > Unparent or Shift+P.
A simple parent-child relationship