|
So far we have animated objects by moving them and
generating key frames. We have then been able to see the Trajectory
that we have created.
Another way of animating an object is to create
its trajectory first in the form of a Path.
A Path is basically a Spline,
and you link your object to the Spline by using a Path
Controller. Path animation is very useful
for animating flying objects and cameras. It also has many other applications,
just use your imagination!
Exercise: Following an airplane
-
Reset Max: File> Reset.
-
Using the modelling techniques you have learnt, create a simple
airplane.
-
The only requirements for this model are that it has wings, and
that the front and
back and the top and bottom all are slightly different.
-
Alternatively, download the file airplane.max from
the Lectures folder in Course
Documents and use that as your starting point.
-
Move your airplane's
pivot point to it's centre:
-
(With Airplane selected)-
-
Heirarchy Panel>Affect
Pivot Only>Centre To Object
-
Now, in the
Top Viewport, create a spline to act as a
path for your airplane.
You may have to zoom out to do this. (to learn about creating splines see Lecture
4 Page 4). Try to avoid sharp angles in your spline. Keep it simple, just a
few bends and turns.

-
Now
add a few boxes to represent buildings for the plane to fly between. Without
these, once we add a camera to follow it, it's hard to see that the plane's
actually moving at all.
-
Create
the bases of your boxes in the top viewport and give them varying heights.
-
Make
sure they do not come to close to your spline:


(All the stages up
until this point can be done in a variety of different ways. E.g. You could
build your city of boxes first and then draw a spline in between them. You could
then use an edit spline modifier and edit the spline to suit your needs.
Remember you can edit your Verticies on more than one plane. Your spline does
not need to remain flat).
-
Now change your animation
length to 200 frames and make sure the frame rate is set to
PAL (25 fps).
-
Now select your airplane.
-
Go to the Motion Panel: 
-
Open the Assign Controller rollout.
-
Select Position: Bezier Position
-
Click on Assign Controller: 
-
From
the dialog box that appears, choose Path Constraint
and click OK.
-
You now have a new rollout at the bottom of the Motion
Panel called Path Parameters.

-
Click on
Add Path. The button will
turn yellow. Now select your spline by either clicking on it in a
Viewport, or
using the Select by Name function (shortcut key =
H).
-
Your
airplane will move to the start of the path.
-
Scrub
through your animation (drag the time slider
around)
-
You
will notice that the airplane does not turn.
-
Activate
the Check-Box "Follow" in the Path
Parameters.
-
Your
airplane should now follow the path, but most of you will still be
experiencing problems, as the airplane is not oriented along the correct
axis:

-
Under
Axis, try selecting a different axis.
It might be necessary to flip your object's
orientation 180 degrees by activating the Flip
Check-Box.
-
For
those using my model, the correct orientation is: Axis
-Y, Flip - Checked.
-
Your
airplane should now follow the path.
-
To
get it to look more convincing, activate Bank
and Constant Velocity and increase the
Bank Amount:
-
Bank:
Activating this Check-Box makes the object bank (roll) as it turns the
curves of the spline.
-
Bank
Amount: Adjusts the amount of the banking to one side or the other,
depending on whether the value is positive or negative
-
Smoothness:
Controls how responsive the banking of the object is to bends in the
trajectory. Smaller values will make the object more responsive to subtle
changes in the curve, while larger values smooth out jerkiness.
-
Allow
Upside Down: If your plane were to do a loop the loop, you would need to
activate this Check-Box.
-
Constant
Velocity: Ensures that the object moves at a constant velocity along the
path. Without this being activated, the velocity of the object along the
path varies depending on the distance between the vertices on the path.
|