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 Time Slider to frame 1.
  3. In the Channel Box, set Translate Y to 0.

    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 Rotate Y to -90.

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

  7. Select the Rotate Y channel, then right-click and select Key Selected from the drop-down list.

    A keyframe is set for the aircraft.

    Additional channels appear 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.

  8. 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:
    • Set the frame in the Time Slider.
    • Set the Translate and Rotate values in the Channel Box.
    • Select only the channels for those values. Right-click on the selected name and choose Key Selected.
      Frame Select Set channel attribute Choose

      20

      Aircraft

      Translate Y: 1

      Key Selected

      30

      Aircraft

      Translate Y: 2

      Key Selected

      30

      Aircraft

      Rotate Z: 170

      Key Selected

      40

      Aircraft

      Translate Y: 3

      Key Selected

      40

      Aircraft

      Rotate Z: 170

      Key Selected

  9. Click play on the Time Slider 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 Time Slider to frame 30.
  2. In the Channel Box, ensure the blend values are set as follows:
    • Blend Add Double Linear: 0
    • Blend Motion Path: 0
  3. Select both the Blend Add Double Linear1 and Blend Motion Path1 channels, then right-click on either name and select Key Selected from the drop down list.

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

  4. Set the Time Slider to frame 70.
  5. In the Channel Box, set the following:
    • Blend Add Double Linear1: 1
    • Blend Motion Path1: 1
  6. Select both the Blend Add Double Linear1 and Blend Motion Path1 channels, then right-click on either name, and select Key Selected from the drop down list.

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

  7. Click play on the Time Slider 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.

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 Time Slider 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.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License