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
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
Middle-dragging the current time indicator, instead of using the left mouse button, changes the current time without repositioning the aircraft along the path.
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).
A drop-down list appears.
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.
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)
A position marker appears on the path curve.
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
The Graph Editor appears.
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
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.
Breaking the tangent for the keys allows you to modify the shape of the curve as it enters or leaves a key.
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.
The handle highlights in a yellow color.
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.
The handle highlights in blue.
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.
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.