Maya Tutorial pdf

Custom Search

Tuesday 26 July 2011

you first assign an object to a motion path, by default

Changing the timing of an object along a motion path

When you first assign an object to a motion path, by default, the object travels along the path at a
constant speed. In this lesson, you want the aircraft to initially travel along the path slowly, accelerate,
and then finally move more slowly when it nears the end of the motion path.

You can change the rate of travel for the aircraft by keyframing attributes that affect where the aircraft
is positioned on the curve at a given time.

To view the attributes for the motion path


1. Set the Time Slider to frame 1.

2. Select the aircraft.

3. Open the Channel Box by clicking the Show/Hide Channel Box icon on the Status Line.

4. In the Channel Box, click on the word motionPath1 that appears in the Aircraft's Inputs list.
The attributes for motionPath1 appear at the bottom of the Inputs list. (Scroll the Channel Box
window if the MotionPath1 attributes are not fully visible)


The UValue attribute controls where the aircraft gets positioned along the curve. The UValue refers to
the curves parameterization. Parameterization is a method used by Maya to divide a curve into
increments of known amounts so that a location along the curve can be determined.

By default, the parameterization of a path curve is set between zero and one. At frame 60, the aircraft
is at the beginning of the curve where the parameterization value is zero. When the aircraft is at the end
of the curve (frame 240) the parameterization value for the curve is one. When the aircraft is halfway
through the path animation (frame 150), it is located along the curve at a UValue of 0.5.

By setting the frame number and UValue and then setting a key, you change the timing for the aircraft's
motion along the path.

To change the timing for the aircraft along the path

1. Ensure the aircraft is selected so its attributes display in the Channel Box.

2. In the Time Slider, drag the current time indicator to frame 120 using the middle mouse button.
Middle-dragging the current time indicator, instead of using the left mouse button, changes the
current time without repositioning the aircraft along the path.

3. In the Channel Box, set the UValue for MotionPath1 to 0.1.
The aircraft is repositioned along the curve near the first bend. When you set the UValue to 0.1,
the aircraft is positioned at a point that is a distance of 10 percent from the beginning of the
curve (that is, the aircraft has completed 10 percent of the distance along the path).

4. In the Channel Box, select the UValue channel by clicking on its name so it becomes highlighted.

5. Right-click on the selected name.
A drop-down list appears.

6. From the drop-down list, choose Key Selected.
A position marker appears on the path curve indicating that a key frame has been set. The
position marker is useful for determining where the aircraft is at a given time. Position markers do
not appear when you render the animation. Using Key Selected ensures that a keyframe is set
only for the item selected and nothing else.

7. In the Time Slider, middle-drag the current time indicator to frame 180.

8. In the Channel Box, set the UValue for MotionPath1 to 0.9.
The aircraft is repositioned along the curve near the last bend. When you set the UValue to 0.9,
the aircraft is positioned at a point that is a distance of 90 percent from the beginning of the
curve. (that is, the aircraft has completed 90 percent of the distance along the path)

9. In the Channel Box, select the UValue channel by clicking on its name so it becomes highlighted.

10.Right-click on the selected name and choose Key Selected.
A position marker appears on the path curve.

11. Click play on the Time Slider's playback control to play back the animation.
The motion of the aircraft is not smooth as it travels along the path. It initially moves forwards
and backwards a bit at the beginning and end of the path. This indicates that some adjustment of
the animation is required. You adjust the animation using the Graph Editor.

To view the Graph Editor
1. From the main menu, select Window > Animation Editors > Graph Editor.
The Graph Editor appears.

2. In the Graph Editor, select View > Frame All.

The Graph Editor updates to display the animation curve for the motion path animation.

The shape of the animation curve provides some clues as to why the motion of the aircraft is not
smooth. Between frames 60 and 84 the curve rises and then drops slightly. Because the animation curve
represents translation along the curve, a drop in the curve indicates that the object travels backwards. A
similar occurrence happens at the end of the curve as well. To correct this, you need to modify the
tangents for the keys in the Graph Editor.

To edit the tangents for the keys in the Graph Editor

1. In the Graph Editor, press the shift key, then double click on the animation curve to select the
four keys (frames 60, 120, 180 & 240)

2. In the Graph Editor menu, select Tangents > Linear.
The animation curve updates so that the keys connect via straight lines. This eliminates the dips
in the curve that caused the aircraft to travel backwards.


Next, you modify the tangents for keys 120 and 180 so the aircraft accelerates and decelerates near
those points on the path curve.

3. In the Graph Editor, shift-select only the two keys for frames 120 and 180.

4. In the Graph Editor menu, select Keys > Break Tangents.
Breaking the tangent for the keys allows you to modify the shape of the curve as it enters or
leaves a key.

5. Select only the key for frame 120.
A pair of tangent handles appear on either side of the key. The handles let you edit the curvature
of the animation curve near the key point.

6. Select the tangent handle to the right of the key.
The handle highlights in a yellow color.

7. From the Toolbox, select the move tool.

8. Using the middle mouse button, drag the handle so the curve has a gentle curvature as it leaves
the key as shown below.
Modifying the tangent in this manner changes how the motion transitions as the curve changes
direction as it passes through the key. The aircraft will accelerate smoothly instead of immediately

travelling at a different rate of speed.
9. Select the key for frame 180.
10.Select the handle to the left of the key.
The handle highlights in blue.
11. Using the middle mouse button, drag the handle so the curve has a gentle curvature as it enters
the key as shown below.
Modifying this tangent for this key will cause the aircraft to decelerate smoothly near the end of
its travel.

The modified animation curve appears as shown below.

12. Close the Graph Editor.

13.Click play on the Time Slider's playback control to play back the animation.
The backwards and forwards motion that previously occurred is corrected. The aircraft travels
slowly towards the first bend in the path curve, then accelerates and travels at a constant speed
around the curve until it nears the end of the path where it decelerates and then slowly moves
towards the end of the curve.

Rotating an object along a motion path
As the aircraft travels along the motion path, its orientation remains the same throughout the animation.
A real aircraft rolls to one side (banks) as it flies in an arc. To make the aircraft roll to one side as it
travels along the path you set keyframes for the Twist attributes in the Channel Box.

To animate the roll of the aircraft along the path

1. Ensure the aircraft is selected.

2. Set the Time Slider to frame 120.
The aircraft is repositioned along the curve near the first bend.

3. In the Inputs section of the Channel Box, click on motionPath1 to view its attributes.

4. Ensure the FrontTwist value for motionPath1 is set to 0.

5. In the Channel Box, select the FrontTwist channel by clicking on its name.

6. Right-click on the selected name.
A drop-down list appears.

7. From the drop-down list, choose Key Selected.

8. To set the remaining keyframes for the rotation of the aircraft, use the table below as a guide,
keeping in mind that you set the keyframes in the following order:
o Set the frame in the Timeslider
o Set the values for FrontTwist in the Channel Box.
o Select the FrontTwist channel by clicking its name. Right-click on the selected name and
choose Key Selected.
Frame Select Set channel attribute Choose
130 Aircraft FrontTwist: -15 key selected
135 Aircraft FrontTwist: -45 key selected
150 Aircraft FrontTwist: -70 key selected
165 Aircraft FrontTwist: -45 key selected
170 Aircraft FrontTwist: -15 key selected
180 Aircraft FrontTwist: 0 key selected

9. Click play on the Time Slider playback controls to play back the animation.
The aircraft rolls to one side (banks) as it travels along the motion path.

No comments:

Post a Comment