Blending keyframe and motion path animation
 
 
 

Blending between motion path and keyframe animation types is possible in Maya. Blending between the two animation types allows you to take advantage of the characteristics each animation type can provide without having to expend a lot of effort in determining where the change between the two types must occur.

In the steps that follow, you keyframe the aircraft to rise vertically from the floor surface and then travel along the motion path by blending between the two animation types. To accomplish this, you do the following:

To move the motion path

  1. In the scene view, select only the path curve.
  2. In the Channel Box, set Translate Y to 5 for PathCurve.

    The path curve is repositioned above the ground plane in the scene view. The aircraft moves with the path curve because it is attached to the motion path.

To keyframe the motion for the aircraft

  1. Select only the aircraft.
  2. Set the Timeslider to frame 1.
  3. In the Channel Box, set the following for the aircraft:

    The aircraft is repositioned so it rests on the ground plane.

  4. Select the Translate X, Y, and Z channels as well as the Rotate X, Y, and Z channels by click-dragging on their names so they become highlighted.

  5. Right-click on any of the highlighted names, and choose Key Selected from the drop down list that appears.

    Keys are set for the selected channels. Keyframing these channels establishes a blending connection that will be discussed in subsequent steps.

  6. In the Channel Box, set the following:

    The aircraft is rotated 90 degrees from its motion path position.

  7. Select the Rotate Y channel by clicking on its name so it becomes highlighted.
  8. Right-click on the name, and choose Key Selected from the drop down list that appears.

    A keyframe is set for the aircraft.

Additional channels have appeared in the Channel Box. When a keyframe is set for an object that already has motion path animation, the software automatically creates a connection to blend between the two animation types. These new channels are used to control the blend between the keyframe and motion path animation types. They control the blend for the Translation and Rotation attributes.

  1. To set the remaining keyframes for the keyframe motion of the aircraft, use the table below as a guide, keeping in mind that you set the keyframes in the following order:
  2. Click play on the Timeslider playback controls to play back the animation.

    The aircraft rises above the ground plane and then stops at frame 40.

The animation stops because the motion path animation was shut off when the blend attribute was automatically created when you set the first keyframe. The blend attribute values are set to zero by default. When the blend values are set to zero, the keyframe animation has full influence on the object, and the path animation is shut off. When the blend values are set to one, the motion path has full influence on the object and the keyframing is shut off. When the blend values are between zero and one, the aircraft’s motion is blended between the keyframe and motion path animation.

In the next steps, you keyframe the blending attributes so the blending begins at frame 30 and ends at frame 70. This blends the two animation types together over a period of 40 frames.

To blend between the two animation types

  1. Set the Timeslider to frame 30.
  2. In the Channel Box, ensure the blend values are set as follows:
  3. Select the BlendAddDoubleLinear1 and BlendMotionPath1 channels by click-dragging on their names so they become highlighted.

  4. Right-click on one of the names, and choose Key Selected from the drop down list that appears.

    A key is set for the blend starting point for the aircraft. At frame 30 the two animation types will begin to blend together.

  5. Set the Timeslider to frame 70.
  6. In the Channel Box, set the following:
  7. Right-click on one of the names, and choose Key Selected from the drop down list that appears.

    A key is set for the blend ending point for the aircraft. At frame 70 the motion path animation will have full influence.

  8. Click play on the Timeslider playback controls to play back the animation.

    The two animation types are combined but the motion does not appear correct. The aircraft rotation flips upward momentarily when it begins to travel along the motion path.

    The interpolation type for the rotations during the blending is not set correctly.

Setting the pairBlend Rot Interpolation setting to Quaternions changes how the rotations are interpolated during the blend. In this example, Quaternions provides a better interpolation type when blending between the keyframe and motion path animation. For more information see quaternion rotation in the Maya Help.

To edit the rotation interpolation type for blending

  1. In the Channel Box, click on the pairBlend1 channel.
  2. Scroll the Channel Box so you can view the Attributes for pairBlend1.
  3. Set the Rot Interpolation setting to Quaternions by clicking on the Euler angles name with the left mouse button.

  4. Click on the pairBlend2 channel.
  5. Click on the Euler angles name in the Rot Interpolation attribute and choose Quaternions.
  6. Click play on the Timeslider playback controls to play back the animation.

    The animation plays back smoothly. Observe how the blending also takes into account the rotation of the aircraft so it meets up with the motion path smoothly.