Project 7a: Basic Rigging

Goal To learn basic rigging techniques such as connections and Set Driven Keys.
Prerequisite Exercises

The assignment will walk you through rigging an object using basic rigging techniques. The goal of rigging is to provide animators with useful tools to animate with. In general, rigging deals with characters, but for simplicity we will start by rigging an inanimate object. We will be using the Pirate Ship file for this assignment as well as the Animation menu set.

  1. Your first task is to change the pivot points for the flaps and rudder of the ship into something more useful. Snap the pivot of each flap to the top, outer edge. Snap the pivot of the rudder to the center of the back it. Snap the pivot of each cannon to the back of it. We will only be rigging the right side of the ship, so don't bother with anything on the left side.
  2. If you open the Outliner, you will notice that everything is named reasonably well, but lacks organization. We will fix this. Group all of the left and right cannons into the left_cannons and right_cannons groups respectively. Similarly, group all of the left and right flaps into the groups left_flaps and right_flaps. Place all of the sails, masts, and beams under the sails group. Finally, group all of these groups and the remaining objects into the ship_geo group.
  3. Use Create → NURBS Primitives → Circle to create three circles. Place two of them encircling the bottom of the ship and one over the wheel. Name the circle over the wheel wheel_anim, the outer circle top_con_anim, and the inner circle ship_anim. Instead of interacting with the geometry, animators will use these curves to animate the ship.

    You might be wondering why the ship has two anims. The top con is there to place the ship in its initial position in the animation. The ship anim is there to let the animator move the ship relative to its initial position. This way if we ever need to move the ship to its starting point we can simply zero out the ship_anim. As a rule of thumb, you should never animate the top con since this will make it harder to move your animation to a different scene.

    Switch to the side view. Go to Create → EP Curve Tool (Options) and change the Curve degree to 1 Linear. Use the tool and grid snapping to create a box around the cannons. Place the box at the side of the ship and name it right_cannon_anim.

  4. Select all of the anims and go to Modify → Freeze Transformations. Notice in the Channel Box that the Translate and Rotate for the anims is now 0 and the Scale is 1. Freeze Transformations keeps an object's current position, but sets it to be the new default position of the object. This is useful for animators since it allows them to quickly return to the default position by zeroing out the Channel Box.

    We created a few more objects in the last step so we must clean up the Outliner again. Place the wheel_anim, right_cannon_anim, and ship_geo under the ship_anim. Place the ship_anim under the top_con_anim. Now we have single top node again.

  5. Rigging is a process of giving animators control over an object, but is also seeks to hide details from the animator that they shouldn't be concerned with. The primary method for accomplishing this is restricting the channels, such as translate and rotate, that animators are able to key. To effectively remove an channel from the Channel box, select it then Right-click it and select Lock and Hide Selected from the menu.

    If you accidently hid the wrong channel, you may be wonder where these channels went. You can find a list of all available channels by Right-clicking the Channel Box and going to Editors → Channel Control. The channels you hid should be listed under Nonkeyable Hidden. Select them and move them to Keyable to unhide them.

    Lock and Hide the following channels for each of the anims:

  6. Now that we have locked away all the channels on the wheel_anim we will add our own custom attribute. Right-click the Channel Box and go to Attributes → Add Attribute. Set Long name to Turn, Data Type to Float, Minimum to -90, and Maximum to 90. Click OK to add the attribute. Notice the new channel in the Channel Box.
  7. Although we have added a new attribute to the wheel_anim, at the moment it does nothing. We will fix this momentarily. First, go to Window → Hypergraph: Connections. The Hypergraph represents the scene as a set of boxes, which represent objects. These boxes can be connected, which allows the attributes of one object to control the attributes of another. We will use the Hypergraph to make the Turn channel on the wheel_anim affect the rotation of the wheel and rudder.

    Select the wheel_anim, wheel, and rudder. In the Hypergraph, go to Graph → Input Connections. This should display the nodes for the selected objects as well as their shape nodes, which you can ignore. Using Left-click you can arrange the boxes as you please.

    To connect two nodes, Middle-click and drag on the right side of the output node and release on the input node. Do this from the wheel_anim to the rudder. We want a very specific connection, so select Other... from the menu that appears. This will bring up the Connection Editor. Select Turn from the list on the left and select rotateY on the right (This can be found under rotate). The Turn attribute now controls the Rotate Y of the rudder. Repeat the same process for wheel_anim and wheel, except connect Turn to rotateX.

    Try changing the value of Turn on the wheel_anim. The wheel and rudder should rotate as you change the value.

  8. We need to add controls so we can bring the cannons out and the flaps up. Select the right_cannon_anim and add two new attributes. Call them cannons_out and flaps_up. Both their Data Types should be Float, the Minimum 0, and the Default 0. For cannons_out, set Maximum to 1. For flaps_up, set Maximum to 10.
  9. We want to have the flaps come up when we change flaps_up, but if use a direct connection like we used with the wheel_anim, then all the flaps will rotate the exact same amount. We want a little more variation and so we will use Set Driven Keys instead. The general idea is that all the flaps will be down when flaps_up is 0 and they will all be up, in different ways, when flaps_up is 10.

    Select the right_cannon_anim, Right-click and go to Editors → Set Driven Key.... This will open the Set Driven Key dialog. With the right_cannon_anim still selected, click Load Driver. Select all of the right flap objects and then click Load Driven. Now that everything is loaded, we can specify what attributes are driving what. In the Set Driven Key dialog, select right_cannon_anim and flaps_up for the Driver. Select all of the flaps and then select rotateX, rotateY, and rotateZ. Hit the Key button.

    Keying the value tells Maya that a flaps_up value of 0 means that all the flaps should be down. Now we want to specify what it should be at 10, so set flap_up to be 10 in the Channel Box. Rotate all of the flaps so that they are up and still reasonably connected to the ship. Hit Key again in Set Driven Key dialog and then close it. Try changing the flaps_up channel now. The flaps should go up and down as you change it from 0 to 10.

  10. To bring the cannons out we will use simple connections. In the Hypergraph, connect the cannons_out attribute of the right_cannon_anim to the translateX of each cannon. Changing cannons_out to 1 should cause all the cannons to move outward.
  11. Your final task is to organize your rig into layers. These layers will prevent the animator from touching things they shouldn't and give them visual hints of what they are looking at. Create four new layers by clicking the Create Layer button () in the Layer Editor. Double-click a layer to edit it. Name the layers center_anims, left_anims, right_anims, and geometry. Set their colors to red, blue, green, and none respectively.

    You can add objects to a layer by selecting them and then Right-clicking a layer and selecting Add Selected Objects from the menu. Add the top_con_anim, ship_anim, and wheel_anim to the center_anims layer. Add the right_cannon_anim to the right_anims layer. Add ship_geo to the geometry layer. For the geometry layer, set the Display Type to Reference. This will prevent the animator from accidentally selecting the geometry.

    The two boxes to the left of the layer's color indicate the current visibility and display type. You can click these boxes to toggle the current setting.

    With everything in its proper place, you should be finished.

Turn In You will be graded on the following: Turn in the following: