Animate camera on a path

A motion path is a spline curve used to guide the animation of an item's transform node. This can be anything in Maya with a transform node. Using a motion path for a Maya camera is similar to using a track to guide a real-world movie camera—it's a good way to get smooth, predictable movement of your viewpoint through a scene. Unlike the real world, however, in Maya a camera setup isn't restricted by the laws of physics and construction budgets; you can create elaborate roller-coaster-like trajectories, gravity-ignoring 3D orbits, and film a scene from any conceivable vantage point without concern for the complexities and cost of an equivalent real-world scenario.

Create the motion path

Your first step is to create the path, for which you' ll use a circle to make the camera follow a smooth, horizontal arc around the moving geometry. So both the hemoglobin subunits and your camera will be moving.

1. Choose Create ^ NURBS Primitives. If Interactive Creation is checked, select it to turn it off.

Note: By default, the camera's overscan attribute is visible in the Attribute Editor but not the Channel Box. You can add overscan to the Channel Box attributes using the Channel Control Editor, available through the Channels menu at the top of the Channel Box.

  1. Choose Create ^ NURBS Primitives ^ Circle □.
  2. Set Normal Axis to Y and Radius to 150.
  3. Press Create.

This makes a spline called ci rcle1 that is centered at the world origin.

  1. Hit the hotkey to bring up the Animation menu set.
  2. Select camera1 and then circled
  3. Choose ^ Animate ^ Motion Paths ^ Attach to Motion Paths □.

The Time Range attribute determines the start and end times for the motion path animation. Leave this set to Time Slider. This makes the start time equal to frame 1 and the end time equal to frame 120 (provided you haven't altered the start and end frames in the Timeline). The remaining attributes are fine at their default values except for Follow, which makes a connection involving the camera's rotation The follow attributefora attributes. It must be unchecked, otherwise it will generate an error because the motion path determines how rotate attributes are already constrained to the aim locator. the attached object changes orientation as it follows the path.

8. Uncheck Follow then press the Attach button.

Edit the animation camera1 will automatically be set to begin its motion at the start of the curve and finish moving at its end. The beginning and end of a motion path are marked by objects called position markers . Each marks a normalized (between 0 and 1) position along the curve. This position is displayed in the Channel Box when the marker is selected, under the attribute name Local Position X. For a circle, both markers appear to lie at the same point because the start and end of a circle are coincident. However, a glance at the Local Position X attribute for each will show that they lay at positions 0 and 1,

Motion path position i

markers y

Motion path—i

■EIh

2)

FIGURE 09.08 Motion path position markers: (a) Positioned by default at the start and end of the motion path curve (top of the circle).

(b) Repositioned using the Move Tool.

These images were captured using the Top camera at frame 40, or one-third of the way through the hemoglobin animation.

FIGURE 09.08 Motion path position markers: (a) Positioned by default at the start and end of the motion path curve (top of the circle).

(b) Repositioned using the Move Tool.

These images were captured using the Top camera at frame 40, or one-third of the way through the hemoglobin animation.

It is difficultto select one position marker over another when the two overlap. It is easiest to take whichever one you are able to select and move it to the side so that you can grab the other one.

  1. You can drag a marker using the Move Tool to change its position on the curve and use the Attribute Editor to change its frame number. In this exercise you don't want a fast 360° rotation around the scene, but rather a slow 45° arc, with the camera facing primarily in the negative Z-direction. These choices are somewhat arbitrary and purely for the purpose of demonstration. Please take them further!
  2. Hit the hotkey "W" to activate the Move Tool.
  3. One at a time, select a position marker by clicking on its number beside the circle. If doesn't matter which one you grab first.
  4. Drag positionMarkerl (with frame label "1") to roughly 0.375.

Drag positionMarker2 (with frame label "120") to 0.625.

You can watch the Local Position X attribute update in the Channel Box until you're in the right spot.

Figure 09.08 shows the position markers before and after being moved. Play the animation to make sure the camera is working as it should. With the persp window active during playback you will see cameral tracking along the motion path between frames 1 and 120.

Path animation

Maya Help ^ Using Maya ^ Animation, Character Setup, and Deformers ^ Animation ^ Path Animation

Watershed Animation
0 0

Post a comment

  • Receive news updates via email from this site