Maya Tutorial pdf

Custom Search

Saturday 10 September 2011

Applying parent constraints on an IK system

Simplifying the display of a hierarchy

The number of nodes in the IK system's hierarchy at this point may appear a bit overwhelming, but it
allows the posing of the mechanical arm to be efficient and effective. You can simplify the display of the
nodes by collapsing portions of the hierarchy.

To collapse the display of the hierarchy

1. In the Hypergraph, right-click on joint1, and choose Collapse from the pop-up menu.
The child nodes below joint1 disappear simplifying the display of the hierarchy. The small
arrowhead on the corner of the joint1 node indicates that a hierarchy exists below joint1. If you
later need to view or select these nodes you can expand them again.

2. Collapse the ArmControl and IKHandle nodes.

The display of the hierarchy is simplified as shown below.

The IK system is now rigged and ready for animation.


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:
o Translate Y: -9
o Translate Z: 0
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.

5. 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.

6. In the main menu, select Constrain > Parent > .

7. In the Parent Constraint Options window, do the following:
o Select Edit > Reset Settings to set the tool to its default settings.
o Click the Add button.
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.

8. In the Hypergraph, select only SwivelBase.

9. In the ChannelBox, set the Rotate Y value for SwivelBase as follows:
o Rotate Y: -100

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

10. In the Hypergraph, select Platform and then shift-select the CargoBox node.

11.In the main menu, select Constrain > Parent.
CargoBox is constrained to Platform. This is the second constraint for the CargoBox.

12. In the Hypergraph, select only CargoBox.

13.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:
o Platform W1: 0
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:

o ArmControl W0: 0
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.

No comments:

Post a Comment