Silly Machine

This tutorial is designed for the beginning Maya user, and will introduce or reinforce the following concepts:

1. Open Maya, create a project in your home directory called Machine. Set all the subdirectories to their defaults, and set this project to be current.

2. Download the file called machineParts, and save it to your scenes directory. Open the scene and familiarize yourself with the parts. Make the following changes, as illustrated:

 

 

    1. Select the top node of each arc, <shift> select the base cylinder and group them together. Rename the new node turret.
    2. Move the armature to the position shown and rotate it along the z-axis to -90 degrees. Note that this is a nurbs cube; you need to select the top of its hierarchy.
    3. Create a locator, move it to the far end of the armature, and parent it to the armature

      Note: A locator is simply 3 curves that intersect in the middle. It can be seen in all windows, but will not render. It has many uses; here it will be used as a placeholder.

      To parent the locator to the armature, select the locator, <shift>select the top node of the armature, and press the "p" key. Alternately, you could MMB drag-drop the locator node on top of the armature node in the hypergraph.

       

    4. Select the plunger, and move the pivot point to the top of the object. Point constrain the plunger to the locator.

      A point constraint is a "touch" constraint. The constrained (driven) object is forced to touch the constraining (driver) object at all times. This is somewhat like parenting or grouping, but establishes a different relationship between the objects.

      To create a point constraint, make sure you are in the animation module; select the driver object first, then <shift>select the driven object. Select Constrain->Point. If you selected the objects in the correct order, the plunger will jump to the locator, with its pivot point touching the pivot point of the locator.

      Rotate the armature node along the z-axis. Notice how the locator stays with the armature, and the plunger "hangs" from the locator. Reset the armature node to -90 degrees on z.

       

    5. Position the guide so that it sits around the plunger, as shown. Remember to check the position in at least two views - it can look correct in one view but be off in another.

 

    1. Aim Constrain the guide to the plunger.

      An aim constraint is a "look at" constraint. The constrained (driven) object will point one of its local axes at the pivot point of the constraining (driver) object. By default, the local axes of an object will match the world axes of the grid, but this can change or be changed by the user.

      To create an aim constraint, make sure you are in the animation module; select the driver object first, then <shift>select the driven object. Select Constrain-> Aim->Option (box). Make sure there is a "1" in the box corresponding to the axis you want to aim, and a "0" in the other boxes. Select Apply. The constrained object will always aim at it's constraining counterpart.

       

      Rotate the armature node along the Z axis. Notice how the guide node always points to the pivot point of the plunger.

    2. Orient Constrain the plunger to the guide

      An orient constraint is a "mimic" constraint. The constrained (driven) object will orient its local axes to match the local axes of the constraining (driver) object.

      To create an orient constraint, make sure you are in the animation module; select the driver object first, then <shift>select the driven object. Select Constrain-> Orient.

      Rotate the armature along the z axis again. Notice how the plunger now stays in the same orientation as the guide.

    3. Use Set Driven Key to keep the guide under the locator.

      "SDK" allows you to control attributes of one node by connecting them to attributes of another. Unlike the connection editor, which requires a 1:1 relationship from one attribute to the next, and unlike the expression editor, where you must define a mathematical relationship between the attributes, SDK allows you to move and key the relationships interactively. "When I do this, you do that".

       

      Open the Animate->Set Driven Key->Set window. Select the object you want to be the driver (the armature, in this case) and click the button in the SDK window marked "load driver". You'll see a list of the driver attributes in the upper right quadrant of the SDK window. Select "Rotate Z". Thus whenever you rotate the armature along the Z axis, it will control some attribute of some other object, which you are about to define.

      Select the object you want to be the driven (the guide, in this case) and click the button in the SDK window marked "load driven". In the attributes section of this object (lower right quadrant) select "Translate X".

      Rotate the armature into a horizontal position, and position the guide underneath it. In the SDK window, click "Set". Now, whenever the armature is horizontal, the guide will move to that position.

      Rotate the armature into a steep angle, and position the guide underneath it. In the SDK window, click "Set". Rotate the armature up and down, and observe the movement of the guide, as it is controlled by the rotation.