Start a hosting plan from $3.92/mo and get a free year on Tuts+ (normally $180)
Adding a skeleton to a model is a great way to make a once static pile of polygons more dynamic. As the skeleton moves and rotates the model deforms with it, giving the illusion of life. This movement can then be exported and used in any number of game engines.
In some cases a simple joint hierarchy is all you need, but for characters the skeleton can often be more complex and involve a higher number of joints. Controlling these joints alone can be a nightmare task for an animator, especially where walk cycles are involved and feet need to stay planted on the floor. This is where a control rig comes in useful.
Through part 6 of the Game Character Creation Series you will look at building a layer of controls over the top of Kila's existing skeleton, allowing you to quickly and easily pose and even animate her.
1. Rig Control Icons
If you have followed along with this series so far you will now have your model of Kila moving with a skeleton and deforming convincingly. At this stage creating basic poses will be much easier than physically editing the model itself.
As mentioned, planting her feet for a walk cycle, or having her lean on a desk for example will be difficult to do by simply manipulating the basic skeleton, so what you now need is a rig. What a rig will do is add a layer of control over the top of the skeleton, much like the strings on a marionette. These controls will make animation a much easier, intuitive and enjoyable task. If done correctly the animator should also be able to simply pick up the controls and animate with little need for an in depth tutorial.
The key to this rig are the icons you use. Basic locators and selection handles are good in moderation, but in a scene full of them it can soon become difficult to navigate and know what it is you are selecting.
Taking some time to initially mold recognizable icons from NURBs curves will make animation even easier.
2. Add Arm Controls
You should have a series of icons to use as your main controls, (don`t worry if not as some have been supplied for you), so let’s start to wire these up to the skeleton so they can control it.
The first area we will look at are the arms, and we will focus on just her left side here as the process can be repeated for the right side.
The arm currently has five main joints. L_Shoulder, L_ShoulderTwist, L_Elbow, L_WristTwist and L_Wrist which is a lot to consider when animating. In reality the animator only needs to know about the main three joints, so the first step should be to simplify the arm leaving them with just these to play with.
- Duplicate the arm joints and raise them slightly so you can see them clearly.
- Unparent the new arm from the skeleton so it’s completely separate.
- Now select the new L_ShoulderTwist joint and go to Skeleton > Remove Joint.
- Repeat this but this time remove the duplicated L_WristTwist.
Note: If Remove Joint doesn't work and the main joints move, just go into the Outliner and unparent the joints manually.
This will leave you with just three joints for the animator to control.
- Rename the new arm joints to L_ConShoulder, L_ConElbow and L_ConWrist for clarity.
Now you have the main control arm it’s time to connect this to the skinned arm, allowing you to drive it. Rather than doing a straight connection you need to reroute the X rotation from the shoulder and wrist joints so they actually move the twist joints instead.
To connect the arms you are going to use a series of Orient Constraints. This type of constraint will force the rotation of one object to be driven by another.
- Go to Constrain > Orient Constraint and open the options window.
- Select the L_ConShoulder and then add the L_Shoulder to the selection.
- We don`t want all three axes on the L_Shoulder joint to be driven by the control arm so under Constrain Axes select just Y and Z.
- Click Apply to create the constraint.
- Now select the L_ConShoulder and this time add the L_ShoulderTwist.
- The only axis you want to constrain this time is the X axis, so set this under Constrain Axes and click Apply.
If you now rotate the control arm you will see that the Y and Z attributes directly control the shoulder joint, as you would expect. But when the control shoulder is rotated around the X axis the shoulder joint is ignored, and instead the twist happens further down the arm around the bicep.
This eliminates any nasty twisting happening around the shoulder area.
You can now repeat this process for the wrist controls.
- Use a limited Orient Constraint to connect just the Y and Z attributes on the L_ConWrist to the L_Wrist joint.
- Now add another constraint, this time constraining the X attribute on the L_ConWrist to the L_WristTwist.
Again, this removes any twisting action from around the wrist and moves it to the forearm.
The final area to constrain is the elbow, but this is much simpler as in reality this area only needs to rotate around one axis.
- Select the L_ConElbow joint and then add the L_Elbow to the selection.
- The only axis you will need to constrain this time is the Y axis, so create a new Orient Constraint to reflect this.
You now have a simplified arm of three joints controlling five, and have also eliminated any of the twisting issues normally associated with real time rigging.
You still have a problem though. When the rig moves the new control arm doesn’t, we ideally need it to be locked to the same position as the actual skinned arm.
Just like you constrained the orientation of two objects using an Orient Constraint, you can also lock the position using a Point Constraint.
This time we select the joints in reverse as we want the control shoulder to be locked to the skinned shoulders position.
- Select the L_Shoulder joint and then add the L_ConShoulder.
- Go to Constrain > Point.
The control arm will now snap to the skinned arm. In this instance there was no point in opening the options as we knew we wanted all three attributes to be constrained.
That’s one arm complete, so now jump over and repeat the process for the opposite side.
3. FK or IK or Both?
What you have now is an arm which can be animated using Forward Kinematics, or FK. This is the process of working your way down the joint hierarchy to create movement, so to pose the arm you would rotate the shoulder, then the elbow and finally the wrist.
But what if Kila needed hold the handle bars on a bike, or do push ups? In these cases the hand positions would need to be locked, but that would be impossible to do using FK alone. This is where Inverse Kinematics, or IK comes in to play.
Unlike FK, IK is evaluated in reverse. So the animation would begin at the wrist, then move to the elbow and finally the shoulder.
Let’s add some IK into Kila's arms now, giving the animator the best of both worlds.
- Go to Skeleton > IK Handle Tool and open its options.
- The default Current Solver will be a Single-Chain Solver, so change this to Rotate-Plane Solver. This will give you more control over how the arm rotates.
- Also enable the Sticky check box.
- Now select the L_ConShoulder joint and then the L_ConWrist joint.
- A new IK handle will be created, and you should see this as a little manipulator over the wrist. Rename this to LArm_IK.
If you move the IK handle you will see that you can now animate the arm using primarily wrist position. If you do the opposite and move the skeletons root, the hand will stay in place, thanks to the Sticky option being enabled.
The problem you have is that you have little control over the elbow. Yes, the IK handle has a Twist option which can help, but this will be tricky to animate smoothly. This is where we call upon our third constraint, the Pole Vector constraint.
- For this you will need one of your icons to help, so position the supplied L_ElbowPos cube directly behind the elbow joint.
- Now select the L_ElbowPos icon and then add the LArm_IK handle.
- Go to Constrain > Pole Vector.
Now if you move the L_ElbowPos icon, Kila's elbow will point towards it, and in turn if you move the LArm_IK handle, the elbow will continue to be locked to the new icon.
The final step is to add in the ability for the animator to swap between FK and IK on the fly, and make it as easy as possible.
- First you need another icon, anything will be fine but feel free to use the L_ArmIK circle which is supplied.
- Parent the LArm_IK handle to the L_ArmIK icon.
This will initially mean you can move the IK through the icon rather than the IK handle, making for a cleaner scene.
- Now select the LArm_IK handle, and add the L_ArmIK icon to the selection.
- Go to Animate > IK/FK Keys > Connect to IK/FK.
By connecting the IK to the icon you can now control it through the icon itself.
- As an example, select the L_ArmIK icon and quickly pose the arm.
- Now experiment with the Enable IK Solver option in the IK/FK Keys window.
You will see that this essentially switches between IK and FK. You can then use the Set IK/FK Key option to assign keyframes so the animator can then switch between both methods of animation.
Now one arm is setup with both FK and IK play around with the tools and get a feel for how swapping between the two works.
4. Lock The Hands
The arms are now moving with both FK and IK, but you still have an issue. The wrists can be pinned with IK, but as the body moves the hand will still rotate as it inherits the rotation of the arm.
You can see this illustrated below. As Kila moves down, the hand inadvertently rotates even though you need it to remain planted on the cube.
The simplest way to fix this is to add another control which will override the rotation of the wrist so it effectively ignores what the arm is doing.
- Duplicate the L_ConWrist joint and rename it to L_WristLock. You are using the same joint to help retain the rotation orders and rotational axes as the original.
- Unparent this new joint so it is floating alone in space.
- Now use an Orient Constraint to lock the L_ConWrists rotation to the L_WristLocks.
- Finally use a Point Constraint to lock the position of the new L_WristLock joint to that of the L_ConWrist.
If you now move the body the hand will keep its initial rotation, ignoring what the arm is doing.
5. Add Finger Controls
The arms are now fully controllable with FK and also IK as an added option, so let’s stay in this area and add some basic control to the fingers.
At this stage animating the fingers would be a case of selecting the joints, rotating them and assigning keyframes. With a potential fifteen joints to control this could turn into a lengthy task, but you can easily add the ability to control a full finger through a single attribute.
- First make sure the LeftHandControls in the scene are visible, or feel free to use your own icons.
You will notice that in the icons supplied each finger has a series of custom attributes already added. These are Knuckle Curl, Middle Curl, Tip Curl, Knuckle Spread and Knuckle Rotate.
It’s easy to add attributes to your own icons if you need to.
- Select the icon.
- Go to Modify > Add Attribute…
- In this case you need a series of simple Float attributes, which means the values will increment in decimal values rather than whole numbers, (which would make it an Integer).
- In the Long Name box input Knuckle Curl.
- Under Numerical Attribute Properties set Minimum to -20 and Maximum to 20. This will give the attributes set boundaries.
- Also set Default to 0.
- Click Add to create the attribute, and then repeat for the others listed above, and for each digit.
Just like with the arm, you now have the controllers so it’s time to connect them to the skinned joints. This time however, you will be using Set Driven Keys, (or SDK's).
SDK's will connect one attribute to another, but unlike Constraints or direct connections the link is keyframe based. This means the main attribute is almost like a mini time slider, so in the case of our attributes the animation of the joints will run from -20 to 20.
- Go to Animate > Set Driven Keys > Set… This will open the main Set Driven Keys window.
- Select the LeftIndex icon and click Load Driver in the SDK window.
- Now select the joint this icon will drive, so L_IndexRoot, and then click Load Driven.
- In the SDK window now make sure Knuckle Curl is selected.
- Also select L_IndexRoot, and the Rotate Z attribute.
- With the Set Driven Key window ready make sure the Knuckle Curl attribute, and the joints Rotate Z attribute is at 0.
- Now press Key in the SDK window. This will store this pose, at this value.
- Next set Knuckle Curl to -20 and L_IndexRoot's Rotate Z to -100.
- Press Key to store this pose.
- Finally set Knuckle Curl to 20 and L_IndexRoot`s Rotate Z to 20.
- Press Key to store this pose.
When you now adjust the Knuckle Curl attribute on the icon the joint will rotate to the set positions. It’s simply a case of setting up the attributes and then defining the keys.
- That’s just one attribute, on one joint set on the hand so repeat this now for all the others so each joint moves with the correct attribute on the icon.
- For the Knuckle Spread and Knuckle Rotate attributes, simply focus on the base joints for each finger and use the Y and X attributes.
- As a final step make sure that you use a Point Constraint to make the hand icons move with the arms as they are posed, and aren't left floating in space as she walks away.
6. Leg & Foot Controls
The arm and hands are now rigged and you have had experience of various Constraints as well as Set Driven Keys. Let’s move on now and work on Kila's other limbs, adding control into her legs and feet.
Just as with the arms you will need a main controller which will manipulate the legs, and help pose the feet. The setup you are going to create is known as a Reverse Foot as it is basically a copy of the existing foot joints, but the hierarchy reversed.
Let’s jump in and you will see how this works, and just like the arms we will focus on just one leg, as the other can be rigged in exactly the same way.
- Begin by selecting and duplicating the L_Ankle joint.
- Unparent the new joints so they are a separate hierarchy.
- Rename them to L_ConAnkle, L_ConBall and L_ConToe.
In order for you to have more control over how the foot animates you need to reverse the hierarchy of these joints, hence it being called a Reverse Foot. At present the ankle is in full control, whereas flipping this and giving control to the toe will open up more options when it comes to animating.
- Select the L_ConToe joint and go to Skeleton > Reroot Skeleton.
As you can see, this has reordered the hierarchy, and now if you rotate the L_ConToe joint you can make the foot stand on its toes. You can also move up to the L_ConBall joint and rotate that too, which will eventually allow you to make Kila stand on the balls of her feet.
This is all well and good, but it’s not doing anything to the skinned skeleton yet. Let’s rectify that now with the help of a few IK handles.
- Working on the main, skinned skeleton, create a new Rotate-Plane Solver IK Handle from the L_Hip joint to the L_Ankle joint.
- Rename this to LAnkle_IK.
- Next create a Single-Chain Solver IK Handle, from the L_Ankle to the L_Ball.
- Rename this to LBall_IK.
- Finally add another Single-Chain Solver IK Handle, this time from the L_Ball joint to the L_ToeTip joint.
- Rename this to LToe_IK.
We use a simple Single-Chain Solver for the LBall_IK and LToe_IK because we don`t need control over the rotation planes.
- Move the Reverse Foot back over the skinned foot.
- Now Parent the LAnkle_IK handle to the L_ConAnkle joint.
- Also Parent the LBall_IK handle to the L_ConBall joint.
- Finally Parent the LToe_IK handle to the L_ConToe joint.
What you will find now is if you move the reverse foot, the main leg will follow. This is also true if you rotate the L_ConBall or L_ConToe joints, making Kila bend her foot.
As a final stage now use what you learned with the arm to add the knee position control.
- First create a new icon, or use L_KneePos supplied and position it directly in front of the knee joint.
- Now select the L_KneePos icon and then add the LAnkle_IK handle.
- Go to Constrain > Pole Vector.
Just like the arm, if you move the L_KneePos icon, Kila's knee will point towards it.
Now you have the basics you can take things a step further and make the control a little easier to use, just like you did with the hands. To do this you can create a few custom attributes as you did before, and then connect them directly to the joints to drive them.
- First make sure your main foot control is visible. LeftFoot will already be in the scene for you to use if you wish.
- Parent your Reverse Foot to this icon, allowing you to manipulate it just by selecting the icon itself.
- You will notice that the LeftFoot icon already has three additional attributes. These are Ball Rotate, Toe Rotate and Tip Toe. If you are using your own icon please add these to it now using the Add Attribute tool.
With those added and the control foot ready you can now connect the attributes to the joints and this time you will be using the Node Editor.
- To open this go to Window > Node Editor.
- If the Node Editor is empty, first select the LeftFoot icon and click the Add Selected Nodes to Graph button along the top.
- Next select and add the L_ConToe joint.
- At present the nodes are being a little cagey about what attributes are available, so force them to reveal all by clicking the Show Primary Attributes on Selected Nodes button.
- Now expand the Rotate attributes on the L_ConToe nodes.
For the toe, you ideally need to control its rotation through the Tip Toe attribute, making her effectively stand on her toes.
- To do this simply drag the circular icon next to the Tip Toe attribute on the LeftFoot node, onto the L_ConToe's Rotate X attribute.
These are now directly connected, so when you adjust the Tip Toe attribute, the joint will rotate for you.
Note: You can ignore the Unit Conversion node for now if one appears.
- Repeat this now, but this time connect the Ball Rotate attribute on the LeftFoot icon to the Rotate Y attribute on the L_ConBall joint.
What you have now is a foot you can manipulate and the leg will follow. You can also easily rotate the ball of her foot and make her stand on her toes.
As a final stage you can quickly include one more control which will allow you or the animator to raise and lower the front of Kila's foot. Much like she would if tapping her toes.
This time you can`t directly control a joint, as moving one will also affect the others in the hierarchy. What you can do however is directly influence the IK handle, so when that is raised the toes will follow.
- To do this first select the L_ToeIK handle and group it by pressing Control-G.
- Rename the new group to L_ToeRot.
- Now with the group selected press the Insert key and move its pivot back to the ball joint.
- If you now rotate this group around the X axis you will see that the toe moves independently of the Reverse Foot.
- The final step is to connect the Toe Rotate attribute on the control foot to the Rotate X attribute on the L_ToeRot group using the Node Editor.
These are just a few simple controls for the foot, but you will be surprised how many times they will be used during the course of an animation.
7. Root Controls
With the limbs complete that’s the more complicated areas of the rig out of the way, from here things should be much simpler, (famous last words).
The main root of the character will be the area which is moved the most. Now the legs are rigged, manipulating the root should mean that the feet remain planted so you can easily crouch and shift her weight.
Rigging the root could be a simple case of parenting the Root joint to a master controller, in this case the Move_Character icon which is supplied. By doing this you will be placing the joint hierarchy under another node when ideally you want the skeleton to remain separate. This is so further down the line, once Kila is animated, you can simply bake the animation onto the joints, strip out the rig and export her to either another application or a game engine.
Even this one extra node can cause issues.
You can however still parent the Root of the skeleton to the Move_Character controller, and keep them separate.
- Select the Move_Character icon, and then the Root joint.
- Now go to Constrain > Parent.
As easy as that. Rather than physically parenting them you used another Constraint which has enabled you to gain the control, but without sacrificing the hierarchy.
8. Spine Controls
Let’s now quickly work our way up the spine before we come back to the waist area to add one extra control. You are working on the spine first as the effect of the waist control won`t be immediately obvious if we added that first.
The spine controls are quite straight forward to apply and connect, and the same process can be applied to each.
- Select the first, LowerSpine icon and press the Insert key. This will allow you to adjust the icons pivot.
- Move the pivot so it’s in the same position as the Base_Spine joint.
- Now select the LowerSpine icon, and then the Base_Spine joint and go to Constrain > Orient Constraint making sure all axes are constrained.
The Base_Spine joint will now move as the LowerSpine icon is rotated.
- Repeat this process for the other spine icons, MidSpine_01, MidSpine_02 and also include the Shoulders. This should give you four new controls working your way up her spine.
The spine is now fully controlled via the icons, although the movement is a little odd and not very intuitive. Rotating one of the lower icons should also adjust the ones above it, shouldn't it?
Again this is quite easy to fix, it’s just a case of reorganizing the hierarchy so the icons are parented to each other.
- Shoulders should sit beneath MidSpine_02.
- MidSpine_02 sits beneath MidSpine_01.
- MidSpine_01 sits beneath Lowerspine.
- Finally parent Lowerspine to Move_Character.
Now they rotate in a much more natural way, and manipulating each will also effect those sitting above them in the hierarchy.
9. Waist Control
The root of Kila and her spine are now rigged and can be animated without the need to touch the actual skeleton. Before we move on it would be a good idea to quickly add in an extra control, one which will free up Kila's hips and allow you to animate them without influencing the upper spine.
At present, if you rotate the Root joint the upper body will also move.
- Create a new icon, or use the existing Waist_Control icon which is supplied.
- Position the icon around the root of the character and as you did with the spine controls, snap the pivot point to the Base_Spine joint. This is the point where you want the hips to pivot around when animated.
- Now simply select the Waist_Control icon and the Base_Spine joint and go to Constrain > Parent.
You can now manipulate the hips without effecting the upper spine. This is because the orientation of each spine joint is locked to the actual controls so the new rotation isn't influencing the hierarchy.
10. Clavicle Control
If you attempt to raise your arms past the horizontal position, but keep your shoulders locked you will see that it just cannot be done. This is because once our arms reach a certain point the shoulders and clavicles take over, sadly something which is missed in some of today’s real-time characters.
It’s because of this you now need to include shoulder, or clavicle controls. These won`t just help with the arms, but they will also allow Kila to shrug her shoulders and have much more freedom of movement.
You could add a simple rotation control, and if that works for you then there is nothing wrong with that approach. What we are going to do instead is take a different approach and while doing so introduce you to another constraint, the Aim Constraint.
What this type of Constraint will do is force one node to always look at, or point towards another. Ideal for eye rigs as you can imagine, but for the shoulders it means that the animator can simply pull the shoulders around rather than rotate them.
Again, feel free to use your own icons for this, or use the LeftShoulder icon supplied in the course files.
- First ensure the icon is in the correct place, with the pivot point positioned at the shoulder joint.
- Now select the LeftShoulder icon, and then the L_Clavice joint and go to Constrain > Aim and open the options.
By default you will see that the Aim Vector is set to 1, 0, 0. This represents the X, Y and Z axes so initially the joint will point towards the icon looking down the X axis, which is exactly what you need.
You will also see that the Up Vector is set to 0, 1, 0, so the axis which is to point up will be Y, again just as you need it to be set.
The default values will give you the control you need, but the values you place in here should correspond to how the axes are configured on the joint.
- If you click Apply and create the constraint you will see that the clavicle joint will now always look at the LeftShoulder icon.
What this means is that the icon can be translated rather than rotated, making it a much more intuitive way to animate the shoulders.
Note: Aim Constraints can be temperamental, so experiment with the configuration before you move on. If you experience the joints suddenly flipping you may need to also set the World Up Type too so it matches a specific vector or even an object.
11. Head Controls
The final area we are going to look at rigging is Kila's head. Traditionally you might think that this would use a simple rotation control, just like you added to the spine, and you would be correct. The head only really needs to rotate as Kila looks around.
What you find with a lot of animation is the eyes are in control. You look at something and then your head follows and finally the body. If you attempt this now and rotate Kila's head, and then the body the head will move more, whereas if Kila's attention is fixed on a point in space the head ideally needs to be free from the influence of the body.
To help with this you can enlist the help of your old friend IK, to lock the way the head is pointing.
- First create a new joint which sits in front of the Head_Tip joint. This will be the focal point of the head so rename this joint to HeadDirection.
- Now create a new Single-Chain Solver IK Handle from the Head joint to the new HeadDirection joint.
This new IK handle will give the head its freedom, and as you will see, if you move it the head will follow. What’s more important is if you move the body the head will remain fixed on that point in space.
- You can now parent the IK handle to a new head icon, allowing you to hide it and use just the icon for animation.
This isn't your typical setup I admit, but for a walk cycle its essential for maintaining steady head movement while the body is in motion.
12. Remaining Controls
At this stage there are still plenty of areas you can add extra attributes or controls to. The neck, jaw, chest and eyes for instance all need some sort of control adding so the animator doesn't need to go in and physically touch the base skeleton.
Some of these areas are quite simple to rig and may only need a simple connection or constraint, but I think at this point in the tutorial I will leave you to experiment and see what you can come up with.
If you do get stuck you can always refer to the project files, and investigate the final rig file for ideas.
13. Lock It Down
The rig is almost complete. The areas which still need attention, like Kila's hair and facial animation will be the focus of Part 7 of this series, but before you save and begin playing with some animation its crucial you spend a little time locking away anything which is not meant to be touched.
If the rig is passed to another animator who then moves or animates a node or joint rather than the main controls, the rig can quickly become broken and unusable.
Your first task is to lock out any attributes which shouldn't be touched, or have keyframes added, and there are a number of ways to do this.
- The first, and quickest approach is to simply select the attributes you want to be hidden in the Channel Box.
- With them selected, Right Click to bring up the menu and go to Lock and Hide Selected.
The second option is to use the Channel Control editor found under Window > General Editors. Using this will give you much more control over every attribute of the selected node, not just the ones visible in the Channel Box.
In this case, locking attributes is simply a case of selecting and using the << Move button to shift them across to the Locked side of the table.
The same process is used for making attributes non-keyable.
With the unused attributes locked away you can then look at hiding any elements which won`t be used. The base, skinned skeleton for instance can be hidden now as you have taken steps to create controls which influence it, rather than the animator feeling the need to control it directly.
As a suggestion, rather than using the Visibility attribute you could look into using Display Layers to not only control which elements are visible, but also color code them. This option will again make the rig easier to use, and more visually appealing.
Your rig is complete. All the controls work as expected, your attributes are locked away and everything has been named and organized to keep the scene tidy. At this stage you could happily pass Kila on to an animator confident that they can pick her up and begin working without any major issues.
Yes there are areas we could work more on, improve or and even enhance, like adding Character Sets or even stretchy limbs, but for this tutorial we have successfully covered the basics which should put you in a great position when you come to rig your next character. From here you can continue to expand upon these skills to make your rigs even better.
Now Kila's body is rigged continue to play around with her controls preparing her for Part 7, where we will take a look at adding facial animation.