Premium
Intro to Working with Control Rigs
Tutorial
Advanced
40 Mins
Overview
Summary
Animators use control rigs to control assets used to create animations. In this workflow, you’ll learn guidelines and best practices for creating control rigs in Maya. These guidelines will help you create custom control rigs that can be cleanly exported as FBX files for use in Unity.
Topics we'll cover
Language
English
Recommended Unity Versions
2018 and Above
Tutorial
Intro to Working with Control Rigs
1.
Introduction

Topics Covered:

  • What is a Control Rig?
  • Limitations Rigging for Unity
  • Preparing Geometry for Rigging
  • Creating a Clean Skeleton
  • Creating a Clean Rig Hierarchy
  • Bind Skin Settings
  • Using Blendshapes
  • Joint Scaling in Maya
  • Rig Cleanup

Topics not Covered:

  • Referencing and Namespaces
  • Baking Animation onto Joints and Blendshapes
  • Exporting Using Maya Game Exporter
  • Exporting as Alembic

Assumptions:

This workflow assumes you have experience using Maya and are familiar with the following terms/concepts:
  • Smooth Binding and Skinning
  • Constraints
  • Set Driven Keys
  • Blendshapes

2.
What is a Control Rig?
A control rig drives the underlying skeleton and blendshapes that in turn drive the mesh. Often the skeleton is templated or hidden so that animators don’t interact with the joints directly. Instead, Non-uniform rational basis spline (NURBS) curves are generally used as controls for the animators to animate the asset. By using a control rig, you can create complex rig setups that can be animated using simplified controls.

3.
Limitations in Rigging in Maya for Unity
It’s important to understand the limitations when creating control rigs for the purpose of exporting as FBX to Unity. By working within these limitations, you’ll ensure that the work you do in Maya will carry through correctly to Unity.
Supported Deformers
  • The only deformers that can be exported as FBX files are skinclusters and blendshapes.
  • Unsupported deformers include lattices, clusters, wraps, and nonlinear deformers.
Blendshapes
  • Only static blendshapes can be used. This means you can’t connect a mesh that’s  being driven by a skincluster, or other deformers as a blendshape into the final mesh.
Skin Method
  • Classic Linear is the only supported skinning method (Dual Quaternion and weight blended are not supported).
Max Influences
  • In Unity, four joints per vertex is the max number of influences supported for skinning. (Note: this limitation is only in Unity versions 18.3 and older.)

4.
Preparing Geometry for Rigging
After your model is complete, but before you start rigging, you should do some quick cleanups to prevent issues during the rigging process.
  • Check Scale of Model: Make sure your asset is scaled to the correct size relative to other assets. This prevents having to scale the asset after it’s rigged, which can be a problem if the rig isn’t set up to do so.
  • Check Placement of Model: Make sure your asset is centered at origin and sitting on the ground plane.

5.
Delete History on Geometry
Make sure to delete history on all geometry (Figure 01). Leaving history on a mesh can cause issues, such as sliding textures, and can also affect rig performance.
To delete history, go to Edit > Delete by Type > History. Or you can use Alt + Shift + D.

6.
Freeze Scale Transforms on Geometry
Unfrozen translate and rotate values on geometry can be useful for rigging. However, scale values can cause issues later on. (Figure 02)
  1. To freeze scale, right click on the channel box and select Freeze > Scale; or, from the main menu, go to the Modify > Freeze Transformations option box and toggle scale only.
Note: When freezing scale with negative values, you may end up with flipped normals. To correct this, use [Modeling] Mesh Display > Reverse.

7.
Creating a Clean Skeleton
Once you’ve placed your skeleton joints, you’ll need to make sure there are no rotation or scale values, that orientations are correct, preferred angles are set, and joints are mirrored.

8.
Freeze Transforms on Joints
It’s important to clean up rotation and scale values on a skeleton before skinning to mesh or attaching a control rig. (Note: translations cannot be frozen on joints.)
  1. With the top joint in the hierarchy selected, go to Modify > Freeze Transformations.

9.
Orient Joints
Orienting joints in a skeleton is an important step. The main tool for this is the Orient Joint tool. (Figure 03)
  • Open the Orient Tool option box: [Rigging] Skeleton > Orient Joint.
  • Use the Orient Tool to orient a primary axis down the bone and a secondary axis as an up vector.
  • The axis you choose as a main axis depends on the rig and the standards you choose.
Note: A good rule is to have the main axis match the direction of the joint chain in world space.

10.
Set Preferred Angles
  • If you want to use an Inverse Kinematics (IK) setup on a joint chain that’s not bent (like a straight arm or leg), you’ll need to set the preferred angle. This lets the IK setup know which way to bend. In the image below (Figure 04), the elbow is rotated and then the preferred angle is set.
  • To set the preferred angle, rotate the joint in the direction it should bend. Right click and hold on the joint and select Set Preferred Angle, then rotate the joint back to its default position.

11.
Mirror Joints
  • If you are working with a symmetrical asset like a biped character, use the Mirror Joint tool (Figure 05) to mirror from one side to the other.
  • Open the Mirror Joint Tool box next to the Rigging dropdown menu > Skeleton > Mirror Joints

12.
Creating a Clean Rig Hierarchy
Having a clean hierarchy in the Outliner is key to being able to export your work to FBX. A clean rig hierarchy is well-named and neatly organized.

13.
Organization
Name All Nodes: Make sure all nodes are named and no two nodes have the same name.
Organize Hierarchy: Keep your control rig in a separate hierarchy from your rig (skeleton and geometry). This will allow you to select only the rig and not the controls for export. (Figure 06)
Connect Control Rig: Use constraints, direct connections, and IK systems from controls in the control rig to drive the skeleton and blendshapes.

14.
Joint Scaling in Maya
Joint scaling in Maya works differently than scaling of other nodes. Unlike other nodes, when you scale a joint, its children don’t scale with it. This is a useful feature that can be turned on or off with the Segment Scale Compensate attribute.

15.
Segment Scale Compensate
This attribute is found only on joints and is on by default. It controls how a joint’s scale affects the child joints under it in the hierarchy. When enabled, it prevents the scaling of child joints. This is useful for something like stretchy limbs, where you want to stretch the arms but not the hands. If you want to scale a hand and have the fingers scale with it, you’ll need to disable Segment Scale Compensate on the hand joint.

16.
To access Segment Scale Compensate
  • Select the joint you wish to modify.
  • Open the Attribute Editor.
  • Toggle the Segment Scale Compensate checkbox on or off as needed. (Figure 07)

17.
Bind Skin Settings
When you bind your mesh to your skeleton, there are a few important settings you should use. (Figure 08)
  • Skinning Method: Use the Classic Linear skinning method. The other options (Dual Quaternion and weight blended) are not supported.
  • Max Influences: This is the max number of joints that can influence any single vertex on a mesh. Set this value to 4, which is the max number for Unity versions 18.3 and older.
  • Maintain Max Influences: Checking this box will ensure you do not unintentionally exceed the max influences while painting skin weights.
Note: These settings can also be set after skin binding by selecting the skin cluster and finding these settings in the Attribute Editor.

18.
Use of Blendshapes
Blendshapes are useful for creating facial rigs and maintaining volume in areas such as knees, elbows, hips, and shoulders.
  • Blendshapes can be connected to custom attributes on controls via direct connections or set-driven keys.
  • They can be connected to transforms, such as the rotation of an elbow joint to turn on a volume-correcting shape.
  • Blendshapes can also be used to create squash and stretch in your rigs. For example, you can have the length of the spine drive fat/thin blendshapes for the body.

19.
Locking Transforms
Any transform attributes on controls that are not intended to be used by animators should be locked. All groups and geometry should also be locked.
Do not lock rotations on joints driven by an IK system, as this will prevent the IK from evaluating.
It’s a good idea to lock visibility on all nodes so an animator doesn’t intentionally or unintentionally hide part of the rig or model. Any necessary visibility control should be connected to custom attributes on a rig control.
  • To lock channels, highlight the attributes you wish lock in the channel box and right-click on the attributes.
  • Click on Lock Selected.

20.
Hiding/Templating the Skeleton
Hiding the skeleton by turning off its visibility attribute will remove some of the visual clutter in your rig. It will also reduce the chance of an animator interacting directly with the skeleton and potentially causing issues in the scene.
If you still want to see the skeleton but not make it selectable in the scene, then templating it is a good option.
  • To template the skeleton, select the top joint in the skeleton and go to Display > Object Display > Template.

21.
Setting Limits
Limits are restrictions on the value range of an attribute. Setting limits on the transforms of a control in the Attribute Editor can help prevent animators from pushing a rig past its limits.
To set limits on control transforms (translate, rotate, scale):
  • Select the control.
  • Open the Attribute Editor.
  • Go to the Limit Information section. (Figure 09)
  • Click the checkboxes for the min/max values of the transforms you want place limits on.
  • Type in the min/max values.
Note: While limits can be very useful, they should be used sparingly and only in instances that will help the animators. For instance, you may want to avoid using limits on areas that rotate in more than one axis, such as a shoulder control. In these cases, limits are likely to cause problems rather than help the animator.

22.
Conclusion
These guidelines and practices will allow you to create your own custom control rigs in Maya. These control rigs can be animated in Maya and then exported as FBX for use in Unity.