Path animation is a way of animating an object's translate and rotate attributes by specifying a NURBS curve as the object's trajectory. The object automatically rotates from side to side as the curve changes directions. If the object is geometry, it can also be automatically deformed to follow the contours of the curve.
Path animation is useful for animating objects such as trains, boats, airplanes, and moving cameras. To do this with keyframe animation would require you to laboriously create and edit many keys for the motion. By having the object move along a curve, you can easily adjust the camera's path by editing the curve.
Creating a path animation
Creating a motion path animation is a simple procedure.
1. Create a NURBS curve. The curve is the path along which the object moves. The direction you create the curve is the direction the object moves.
2. Select the object you want to animate on the path, then Shift-select the curve. You can animate many objects along the same path curve by first selecting the objects, and then selecting the curve. You must select the curve to be used as the path curve last.
3. Select Animation > Animate > Motion Paths > Attach to Motion Path. The object will move to the point on the curve where it will be positioned for the current time. You will also see two motion path markers with numbers on the curve. These are motion path markers, and each one represents a key of an animation curve. The time of the key is the number drawn on the marker.
4. To view the animation of the object, press the Play button.
Editing a path animation
Using the Attach to Motion Path command will create a motionPath input node for the object that is attached to the path. You can alter the path animation by using the attributes of this node.
U Value
The U Value attribute, for example, controls the position of the object on the path. A value of 0 is the start point, a value of 1 is the end point. A value of 0.582 is a position 58% of the length of the path. Setting keyframes on this attribute will create position markers. The value of a position marker is the U parameter value (or percentage of the curve, if the path animation is in Fraction Mode,) of the marker's position on the curve. Having the markers displayed in the modeling window is very useful for editing the timing of the path animation. By changing the position of the marker along the curve, you can edit the timing curve of the path animation. To reposition a marker, select the marker you would like to reposition. Use the Move Tool to reposition the marker along the curve.
Follow
The Follow option, if on, forces Maya to compute the object's orientation as it moves along the curve.
Maya uses a front vector and an up vector to compute the orientation of the object. Maya aligns the object's local axes with the front vector and the up vector so that it knows how the object should be pointing upwards and frontwards as it moves along the curve.
Front Axis
The Front Axis specifies which of the object's local axes aligns with the front vector. This specifies the frontwards orientation of the object as it travels along the curve.
X aligns the local X axis with the front vector, specifying the X axis as the forward facing axis of the object.
Y aligns the local Y axis with the front vector, specifying the Y axis as the forward facing axis of the object.
Z aligns the local Z axis with the front vector, specifying the Z axis as the forward facing axis of the object.
Up Axis
The Up Axis specifies which of the object's local axes aligns with the up vector. This specifies the upwards orientation of the object as it travels along the curve. The up vector aligns with the world up vector specified by the World Up Type.
X aligns the local X axis with the up vector, specifying the X axis as the upward facing axis of the object.
Y aligns the local Y axis with the front vector, specifying the Y axis as the upward facing axis of the object.
Z aligns the local Z axis with the front vector, specifying the Z axis as the upward facing axis of the object.
World Up Type
The World Up Type attribute specifies the type of world up vector that the up vector aligns with. Selections include Scene Up, Object Up, Object Rotation Up, Vector, and Normal.
Scene Up specifies that the up vector try to align with the scene's up axis instead of the world up vector. The world up vector is ignored. You can specify the scene's up axis in the Preferences window. The default scene up axis is the world space positive Y-axis.
Object Up specifies that the up vector try to aim at the origin of a specified object instead of aligning with the world up vector. The world up vector is ignored. The object whose origin the up vector tries to aim at is called the world up object. You can specify the world up object with the World Up Object option. If no world up object is specified, the up vector tries to aim at the origin of the scene's world space.
Object Rotation Up specifies that the world up vector is defined relative to some object's local space instead of the scene's world space. The up vector tries to align with the world up vector after transforming it relative to the scene's world space. The object whose origin the up vector tries to aim at is called the world up object. You can specify the world up object with the World Up Object option.
Vector specifies that the up vector tries to align with world up vector as closely as possible. The world up vector is defined relative to the scene's world space. (This is the default.) Use World Up Vector to specify the direction of the world up vector relative to the scene's world space.
Normal specifies that the axis specified by Up Axis will try to match the normal to the path curve. The interpretation of the curve normal is different depending on whether the path curve is a curve in world space, or a curve on surface curve. If the path curve is a curve in world space, then the normal of the curve is the direction that points to the center of curvature of the curve at any point on the curve. The normal to a curve will flip 180 degrees when the curve changes from a convex to concave (or vice versa) shape. This makes the Normal option for the Up Direction not very desirable when using a world-space curve in your path animation. If the path curve is a curve-on-surface, then the normal to the curve is the normal to the surface at that point on the curve. The Normal option will give the most intuitive results when the path curve is a curve-on-surface.
World Up Vector
Specifies the direction of the world up vector relative to the scene's world space. Because Maya's world space is "Y-up" by default, the default world up vector points in the direction of the world space's positive Y-axis (0.0000, 1.0000, 0.0000).
World Up Object
Specifies the object the world up vector tries to align with if World Up Type is set to Object Up or Object Rotation Up. For example, you could specify the world up object as a locator that you can rotate as needed to prevent any sudden flipping problems as the object moves along the curve.
Inverse Up
If this option is on, Up Axis tries to align itself with the inverse of up vector.
Inverse Front
Reverses the frontwards direction an object is pointing along the curve. This is especially useful when you are trying to orient a camera so that it points frontwards along a curve. For example, you have got the camera pointing backwards along the curve, but are having difficulty getting the camera to point frontwards. By clicking Inverse Front on, you can have the camera point forwards along the curve as desired.
Bank
Banking means the object will lean in towards the center of the curvature of the curve that it travels along (like a motorcycle going around a corner). The bank option is only available if the Follow option is on, as banking also affects the rotations of the object.
The path animation automatically computes how much banking should occur depending on how curved the path curve is. You can adjust the banking using Bank Scale and Bank Limit.
Bank Scale
If you increase the Bank Scale, then the banking effects will be more pronounced. For example, if the Bank Scale is set to 2, then the object will bank twice as much as the default that is computed. You can enter a negative number for Bank Scale. This will cause the object to lean out, away from the center of the curvature of the curve, rather than in towards the curvature. For example, you could use this in animating characters thrown from side to side in a roller coaster.
Bank Limit
The Bank Limit lets you restrict the amount of leaning. For example, the Bank Scale may be increased to obtain pronounced effects, but then this may cause the object to lean too much where the curve is very curved. This option will limit the leaning to the given amount. No banking occurs where the curve is a straight line.