Applying parent constraints on an IK system
 
 
 

To animate the cargo box so that it is picked up by the mechanical arm you need a method of constraining the cargo box to the mechanical arm so that it moves with the arm at specific times in the animation. This is accomplished using a parent constraint.

When a parent constraint is applied to an object, the constrained object behaves as if it were a child node of the constraining object.

An object can have multiple constraints applied to it. The influence each constraint has on the object can be changed by modifying the weight attribute for the parent constraint. The weight attribute is an animatable parameter and can be set to be on or off at specific frames.

In this lesson, the cargo box is constrained to both the ArmControl and the Platform on the floor. By animating the weight attributes for these two parent constraints, the cargo box will move from one location to another depending on which constraint is influencing it at specific times in the animation.

To set up the parent constraints you need to position the constrained object at the locations where the influence will begin or end, and then set the parent constraints.

To set parent constraints for the cargo box

  1. In the side view menu, select Shading > Smooth Shade All.
  2. In the side view menu, select Panels > Perspective > persp.
  3. In the Hypergraph, select ArmControl.
  4. In the ChannelBox, set the Translate Y and Z values as follows:

The arm is repositioned so that the cargo magnet is directly above the cargo box as shown below. Track, tumble, or dolly the view if required so you can see the mechanical arm unobstructed.

  1. In the Hypergraph, with ArmControl still selected, shift-select the CargoBox node.

    The order of selection is important when you apply constraints. You must select the constraining object first, and the item to be constrained second.

  2. In the main menu, select Constrain > Parent > .
  3. In the Parent Constraint Options window, do the following:

    CargoBox is constrained to ControlArm. A new constraint node has been created below the CargoBox node in the Hypergraph. If you reposition the mechanical arm, CargoBox moves with it because of the constraint that is now applied.

  4. In the Hypergraph, select only SwivelBase.
  5. In the ChannelBox, set the Rotate Y value for SwivelBase as follows:

    The mechanical arm and the cargo box are positioned as shown below.

  6. In the Hypergraph, select Platform and then shift-select the CargoBox node.
  7. In the main menu, select Constrain > Parent.

    CargoBox is constrained to Platform. This is the second constraint for the CargoBox.

  8. In the Hypergraph, select only CargoBox.
  9. In the ChannelBox, view the parent constraints for CargoBox.

    CargoBox has two parent constraints applied to it: Arm Control and Platform. In the ChannelBox, the numerical settings beside ArmControl W0 and Platform W1 represent the influence weight each parent constraint has on CargoBox. At this point, each influence weight is set to a value of 1. If you move the mechanical arm, the cargo box will move somewhere between its first and second position. This occurs because each constraint has equal influence on the cargo box at this point.

Before you can animate the objects in the scene, you also need to reset the default weight values for each constraint, so that one parent constraint has full influence on CargoBox when the other does not.

To set the weighting for the parent constraints

  1. In the Hypergraph, select only CargoBox.
  2. In the ChannelBox, set the following:
  3. Select only SwivelBase.
  4. In the ChannelBox, set the Rotate Y value to 0.

    The mechanical arm and cargo box are rotated back.

  5. In the Hypergraph, select only CargoBox.
  6. In the main menu, select Constrain > Set Rest Position.

    Setting a rest position for CargoBox sets a position for the cargo box when no constraints are acting upon it. If the rest position is not set, CargoBox will be repositioned to the second constraint position.

  7. In the ChannelBox, set the following:

    At this point, both parent constraints are set to have no influence on the cargo box because their weight attributes are set to zero. When you animate the components in the scene, the weight attributes for the parent constraints will be set and keyframed depending on which constraining object (Arm or Platform) is required to have full influence.

In the next steps, you plan the action for animation of the IK system.