Maya Q&A: “What’s the best way to rig a real-time hand?”

Shaun Casey needs some handy rigging pointers; Antony Ward shows him how to avoid making a fist of it
When it comes to rigging of any kind it’s important to state that there isn’t really a right or wrong approach. There are bad rigs – ones that break easily or are difficult to use, for example – but a good rig should suit the needs of the animator, be intuitive and fit the project.
Before any joints or constraints are created you must ensure your topology is sound. When the fingers bend there must be enough geometry to prevent pinching or tearing. A standard V shape above and below each knuckle is an ideal place to start, with more subdivisions being added if the hand will be viewed up close so it doesn’t appear angular. When you’re happy with the topology also make sure the hand is in a relaxed, neutral pose prior to rigging.
Begin by creating the main skeletal structure, placing joints in the centre of each knuckle, at the wrist and at the elbow – unless, that is, you also need a joint between the elbow and wrist to cater for the radius and ulna twisting, as the wrist itself doesn’t actually twist.
With your joints in position you must then make sure each rotational axis is correct. These dictate how each joint will rotate, and define the X, Y and Z axes. By default Z will point down the joint, aiming towards its parent and acting as the main twisting motion. X will be the bending axis, so ensure it crosses the knuckle. Y will now be left pointing up (or down) and work as the spread axis.
Look at your own hand, flex your fingers and watch how each one bends. You’ll see that each finger doesn’t fold directly down. They all come together, pointing into the palm as they form a fist, so make sure your joints do the same. Also watch how the thumb acts, crossing the palm at an almost 45-degree angle. It’s important to get these rotations correct before you go on to create your rig, and bind this skeleton to the model.
You now have a good skeleton that twists and rotates correctly, so it’s time to build the rig that will control it. This is where you need to talk to the animators and figure out how they prefer to animate. It could be they only need certain hand poses, or perhaps they require full control over each digit. This will dictate how you proceed.
For either approach you’ll need a main controller – an icon that, when selected, will hold the main controls. This means the animator isn’t left trying to select each joint; ideally, joints should never be selected directly. This could also double as the main wrist control, so while you’re posing the wrist you can quickly pose the fingers too.
On this icon, which could be a basic locator or even a hand-shaped curve, you’ll add the attributes you need. So, if it’s main poses, add attributes for Fist, Point, Claw and so on, and then use Set Driven Keys attached to these attributes to drive the joints into these poses. The problem with this approach is that it’s then difficult to animate on top of these poses. This is why you must be sure this is the approach you want to follow.
If you’re opting for the more open approach, you then need to add attributes for each finger. Remember that it’s only the base of each finger that spreads and twists, unless forced. You should end up with attributes like Pinkie_Curl, Pinkie_Twist and Pinkie_Spread, but for each finger and of course the thumb. This gives you much more freedom, and if needed you can expand upon this setup to animate each knuckle separately.
Now the controls are in place, test them fully before you bind the skeleton to the mesh and spend time editing the weights. When you’re finished with the rig and the weighting it’s time to lock it down. Hide and lock the skeleton so the animator can’t accidentally select and pose it. Any other attributes that aren’t needed must also be hidden and locked. All the animator should be left with are the controls he or she needs to bring the character to life.
How to avoid gimbal lock
Identify the problem

There’s nothing worse than when two rotational axes become aligned, resulting in gimbal lock.
Edit the rotation orders

Gimbal lock affects us all, so make sure you edit each joint’s Rotation Order attributes.
Select the correct configuration

Adjusting this will give priority to your chosen axis, and how it affects those below it.
Antony Ward has been pushing pixels since the early 1990s and has worked for some of today’s top game and production studios
Maya 2013 – reviewed over at Creative Bloq.
Posted
on Monday, October 15th, 2012 at 3:04 pm under Guides, Technique, Tutorials.
You can subscribe to comments.
You can leave a comment, or trackback from your own site.
Tags: Animation, Maya, real-time, rigging