0% found this document useful (0 votes)
81 views42 pages

Pages From 3dsmax 2010 Animation

Uploaded by

api-511013857
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views42 pages

Pages From 3dsmax 2010 Animation

Uploaded by

api-511013857
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

In this tutorial, you will learn how to:

■ Use List controllers to manage animated components of a model

■ Define controller behaviour though the use of expressions

■ Use the MacroRecorder to automate the assignment of List controllers

■ Create a toolbar to hold custom tools

■ Use wiring and expressions to rig objects for animation

Skill level: Advanced


Time to complete: 1+ hours

Using List Controllers


A controller in 3ds Max is a plug-in that manages the values involved in
keyframe animation, such as changes in object scaling, color, or translation.
List controllers combine two or more controllers and can be very useful when
combining relationships between objects.

610 | Chapter 4 Animation Tutorials


List controllers, for example, are helpful when using expressions and
constraints to control a child object through a parent object, particularly if
the child and parent objects are not using the same orientation. The List
controller uses added internal controllers that lets you maintain control over
the child object’s local orientation, even though it remains constrained to
that of its parent.

Local orientation of child object (car wheel, shown at left in green)


differs from parent object (car body, selected, shown at right)

The child object (car wheel) of the rig you are about to animate in this tutorial,
is oriented differently from the parent object (the car body). To turn the wheel
using wiring, you would have to rotate the wheel on its Y axis (based on the
orientation of the body of the car), not its X axis (the wheel’s local orientation).
To regain control of the local orientation of the child object, you will add list
controllers to the position and rotation tracks of the front left wheel animation.

Manually assign List controllers:


In this procedure, you will manually assign List controllers to the position
and rotation tracks of the front left wheel of your Chevy.

1 On the Quick Access toolbar, click the Open File button, navigate
to the animation\car rigging folder and open car_rig_01-start.max.

2 From the main toolbar Selection Sets list, choose Garage_All.

Using List Controllers | 611


3 Right-click the Perspective viewport and choose Hide Selection from the
quad menu.
All scene objects other than the car are hidden.

4 Press H to display the Select From Scene dialog and expand the Chassis
object (the car body).

Notice how the four wheels, as well as the steering wheel, are children
of the object . This hierarchy is typical to 3D car models.

5 Choose Wheel-FL from the object list, then click OK.


The front left wheel in the scene is now selected.

6 Go to the Motion panel and expand the Assign Controller rollout.


A list of default animation controllers displays as tracks in an Explorer
format.

7 Highlight the Position:Position XYZ track, then click the Assign Controller
button.

612 | Chapter 4 Animation Tutorials


8 On the Assign Position Controller dialog, double-click Position List.

9 On the Assign Controller rollout > Position:Position List track, click the
+ icon to expand the position list.

10 Click the Available track, then click the Assign Controller button again.

11 On the Assign Position Controller dialog, double-click Position XYZ.


In the explorer, a second Position XYZ: Position track has been created
below the first. This track represents the controller that will control
keyframe information of X, Y, and Z axes based on the local position of
the child object (the front left wheel).
Next, you will repeat the procedure by assigning a List controller to the
rotation track of the front left wheel.

12 On the Assign Controller rollout list of tracks, click Rotation: Euler XYZ
and click the Assign Controller button.

Using List Controllers | 613


13 On the Assign Rotation Controller dialog, double-click Rotation List.

14 On the Assign Controller rollout list of tracks, expand the Rotation: List
track by clicking its + icon.

15 Click the Available track and click the Assign Controller button.

16 On the Assign Rotation Controller dialog, double-click Euler XYZ.


A second Euler XYZ track is created. This track controls rotation keyframe
information of X, Y, and Z axes based on the local coordinates of the
front left wheel.

Automating the assignment of List controllers:


MacroRecorder is a simple scripting utility that records your interactions in
3ds Max. It converts your actions into a script that you can reuse to accomplish
repetitive tasks.
In the previous procedure, you manually assigned position and rotation list
controllers to a single wheel on your Chevy. You will now use MacroRecorder
to automatically assign list controllers to the remaining three wheels, as well
as the car body and steering wheel, so that the entire rig uses the same
coordinate system in its animation.

1 Go to the bottom left corner of the interface, right-click anywhere on


the MAXScript area and choose Open Listener Window.

614 | Chapter 4 Animation Tutorials


2 Directly below the MAXScript Listener menu bar, click and drag downward
to reveal the pink MacroRecorder panel, if it is not already visible.

3 From the menu bar, choose MacroRecorder > Enable.


From this point onward, virtually any action you take in 3ds Max will
be recorded in a script.

4 Select the rear left wheel of the car (the Wheel-RL object).

5 Repeat steps 6 through 16 of the previous procedure to assign list


controllers to the position and rotation of the rear left wheel.

Using List Controllers | 615


As you progress, note how the pink MacroRecorder area accumulates
scripting data.

6 Right-click on a gray area of the main toolbar (below the Selection Sets
drop-down is a handy area), then choose Customize.

7 On the Customize User Interface dialog, make sure the Toolbars tab is
active, then click New.

8 On the New Toolbar dialog, type myTools and click OK.

9 Close the Customer User Interface dialog and reposition the new toolbar
to the right of the MAXScript Listener window.

10 Highlight the last four lines of the script, then drag and drop them into
the myTools toolbar.

A button is created.

11 Right-click the newly-created button and choose Edit Button Appearance.

12 On the Edit Macro Button dialog, choose the Text Button option and in
the Label field, type List Con and click OK.

616 | Chapter 4 Animation Tutorials


13 On the MAXScript Listener window menu bar, choose MacroRecorder >
Enable to turn off script recording.
The MacroRecorder stops recording your interactions in 3ds Max.

14 Close the MAXScript Listener window, then resize the myTools toolbar
until the List Con label is fully displayed.
You are now ready to use the List Con tool to quickly assign list controllers
to the remaining wheels of your car model.

15 In any viewport, select the front right wheel of the car (the Wheel-FR
object).

16 On the myTools toolbar, click List Con.


On the Motion panel > Animation Controller rollout, expand the Position
XYZ track to display one of the list controllers that was assigned by the
script you just created.

17 Select the last remaining wheel in the model and click List Con again.

18 Repeat the previous step for the Chassis object.

19 Repeat the previous step for the SWheel object.

NOTE You can apply the MacroRecorder script to only one object at a time.
You must therefore click the List Con button once for each object you want
to modify.

20 Save your work as mycar_rig_02.max.

The myTools toolbar you created in this procedure is now available for all
future 3ds Max work sessions.

Using List Controllers | 617


In the next lesson, you will learn how to animate the rotation of the car
wheels.

Rotating the Wheels


In this lesson, you will learn how to rotate the wheels by an amount that
corresponds to the distance travelled by the car model.

Let’s start by taking a look at the trigonometry involved in calculating the


wheel rotation.

In any circular object, the amount of rotation (α) is defined by the radius of
the circle and the arc length encompassed by the angle. That amount of
rotation (α) expressed in radians is equal to the arc length, divided by the
radius of the circle (arc length / R), where:

■ the radius of the car wheel is constant and equal in this case to 13 units.

■ the arc length, when flattened, represents the distance travelled by the car
and its wheels.

618 | Chapter 4 Animation Tutorials


Therefore, the wheel rotation calculation (arc length / R) becomes distance /
13. Whereas the radius of the wheel is constant and equal to 13, the distance
travelled is variable.

Set up the lesson:

■ Continue from the previous lesson or open car_rig_02.max.

Rotate the wheels (in World X coordinates):

1 In the Perspective viewport, select the car body.


The car is currently oriented on the World X axis: you will begin working
in this coordinate system.

2 Right-click the car body object and from the quad menu, choose Wire
Parameters.

3 From the menu, choose Transform > Position > (2nd) Position XYZ > X
Position.

Rotating the Wheels | 619


NOTE It is important to always leave the first animation controller at the top
of the list (in this case, the Position XYZ Controller) untouched, since it serves
as a “lock” for the parent/child relationship. When choosing controllers to
work on, always work from top of the controller list downward, starting with
the second controller.

A rubber band shows the link you are about to make between your two
selected objects.

4 Select the front left wheel of the car (Wheel-FL).

5 From the menu, choose Transform > Rotation > (2nd) Euler XYZ > Z
Rotation.

The Parameter Wiring #1 dialog opens. You use this dialog to set up one
and two-way control relationships between objects. The position and
rotation of the two objects you just selected to affect one another are
highlighted.

6 On the Parameter Wiring dialog, click the right-pointing arrow above


“control direction”.

620 | Chapter 4 Animation Tutorials


This ensures that the Chassis X position is controlling the Wheel-FL Z
rotation and not the other way around.
The bottom-right corner of the Parameter Wiring dialog displays the
wheel object Expressions panel. It shows the distance travelled as
X_Position.

7 Next to X_Position, type /13.


The expression should now read X_Position/13, the distance divided by
the radius of the wheel.

8 Click Connect, but do not close the dialog.

9 Test your work by moving the car body on its X axis.


Note how the front left wheel does not rotate. Even though you added
a position list controller to the car and wheel, the first controller in the
list (the one that ensures the parent/child “lock”) is still active. You need
to make the second position controller (the one used in the wiring process)
the active one.

10 If you moved the car model, press Ctrl+Z to undo the move.

11 With the car selected, on the Motion panel > PRS Parameters rollout,
click the Position button at the bottom of the rollout.

Rotating the Wheels | 621


12 On the Position List rollout, highlight the second Position XYZ controller
and click Set Active.

13 Try moving the car on its X axis again.

TIP To better see the wheel rotation, you can switch your viewport display
to Smooth + Highlights.

The wheels now rotate and at the correct rate, but they do so in a
backward direction.

14 On the Expressions panel, add a minus (-) in front of the expression and
click Update.

15 Move the car on its X axis again and note how the wheel rotates in the
proper direction.

16 Repeat the preceding steps for each of the remaining three car wheels.
Because the wheels were mirrored, the wheels on the right side of the car
do not need the minus sign added to their expression, whereas those on
the left side do.

17 Close all the Parameter Wiring dialogs.

622 | Chapter 4 Animation Tutorials


Add subcontrollers for Y rotation:
In the previous procedure, you learned how to add controllers that determine
car wheel rotation for the length of distance travelled by the model along the
World X axis. However, if you tried to rotate the car in any way, wheel rotation
would be reduced or stop altogether. You therefore need to add controllers
that account for the car’s displacement in a Y direction.

1 In the Top viewport, select the car body object and rotate it 90 degrees
clockwise so that its front bumper points at 12 o’clock.
The car is now oriented on the World Y axis, so you will begin working
in this coordinate system.

2 If required, adjust the view in the Perspective viewport until you can see
the front left side of the car.

3 Move the car forward and backward on the Y axis. Note that the wheels
do not rotate.
To get the wheels rotating, you will need additional animation controllers,
ones that will control the car’s displacement in the Y direction. You will
add these as sub-controllers, so you do not overwrite the controllers
already in place.

4 Go to the bottom-left corner of the interface, right-click the MAXScript


area and click Open Listener Window.

5 On the MacroRecorder panel, highlight the line that reads:


$.rotation.controller.Available.controller = Euler_XYZ ()
Be sure not to include the line’s carriage return when you make your
selection.

6 Press Ctrl+C to copy this line to memory. If you are not continuing from
the previous lesson, this line will not be available from the Open Listener
window. If this is the case, copy the line from this .pdf document.

7 Close the MAXScript Listener window, then select the front left wheel
(Wheel-FL).

8 On the bottom-left corner of the interface, click inside the white entry
box, press Ctrl+V to paste the line of code, then press Enter.

9 On the Motion panel > PRS Parameters rollout, make sure that the
Rotation button is active verify that a new sub-controller has been added
to the rotation list.

Rotating the Wheels | 623


10 Repeat step 8 to add a fourth rotation sub-controller. You will need this
later on in the tutorial.
The front left wheel should now have four Euler XYZ tracks.

11 Select another wheel and repeat steps 8 to 10 until all four wheels have
four Euler XYZ tracks in their respective rotation lists.

Rotate the wheels (in World Y coordinates):

1 Adjust the Perspective view until the front left side of the car is visible.

2 Select the car body, then right-click and from the quad menu, choose
Wire Parameters.

3 From the menu, choose Transform > Position > (2nd) Position XYZ > Y
Position.

4 Select the front left wheel (Wheel-FL).

5 From the menu, choose Transform > Rotation > (3rd) Euler XYZ > Z
Rotation.

624 | Chapter 4 Animation Tutorials


6 On the Parameter Wiring dialog, click the right-pointing arrow above
Control Direction to ensure that the Chassis Y position is controlling the
Wheel-FL Z rotation.

7 On the right-hand Expressions panel, type /13.


The expression for the left-hand wheel should be Y_Position/13

8 Click Connect.

9 Repeat steps 3 to 8 for each of the other three wheels.

NOTE The expression for the right-hand wheels should be -Y_Position/13.

10 Close the Parameter Wiring dialogs and in the Top viewport, rotate the
car so that it is not pointing horizontally or vertically.

11 On the main toolbar, click Select And Move, then set the coordinate
system to Local.

12 Adjust the Perspective viewport, so you can see the car from its side.

13 Move the car on its local X axis. Note how the wheels are rotating
properly.

Rotating the Wheels | 625


14 In the Top viewport, rotate the car until the front bumper is pointing to
the left.

15 Save your file as mycar_rig_03.max.

Rotate the wheels (under a path constraint):


In the previous procedure, you learned how to add controllers that rotate the
car wheels for any distance of travel in World X and Y space. The wheels will
therefore rotate properly when you manually move the car around the scene
in any direction.
However, you would most often animate motion of a car by placing it on a
pre-defined path using Path Constraint. This type of animation requires a
different expression.
This new expression uses the same formula (distance divided by radius) as the
ones you have been using, but while the radius of the wheel remains constant,
the distance travelled is calculated differently.

1 Continue from the last procedure or open the file car_rig_03.max.

2 From the main menu Selection Sets list, choose Car Path.

A warning message displays.

3 Click Yes to display the path you will use to animate the car motion.

4 From the main menu, choose Create > Helpers > Point.

5 On the Parameters rollout, turn on Box and set Size to 100.0.

626 | Chapter 4 Animation Tutorials


This increases the size of the helper gizmo and makes it easier to select
in the scene.

NOTE Many animators use the Dummy helper instead of Point. The advantage
of using a Point helper is you can adjust its size without having to scale it.
Scaling a helper in a hierarchy will affect its children objects, something you
usually want to avoid.

6 In the Top viewport, click a point near the car to place a Point helper.

7 With the Point helper still active, on the main toolbar click
Align, then in any viewport, select the car body.

8 In the Align Selection dialog > Align Position group, make sure X Position
and Y Position are on and Z position is off.

9 In the Current Object and Target Object groups, choose Pivot Point, then
click OK.

Rotating the Wheels | 627


10 In the Front viewport, move the Point helper on its X axis to the right
until it is just to the left of the rear axle of the car.

Point helper to left of rear axle

The Point helper location you specify becomes the pivot point of the car
when the front wheels turn.

11 On the command panel > Name And Color rollout, rename the helper
Dummy_CAR.

12 In any viewport, select the car body.

628 | Chapter 4 Animation Tutorials


13 On the main toolbar, click Select And Link, then in the Front
viewport, click the car body and drag to the Point helper. This makes the
car body the child of the Point helper.

14 On the main toolbar, click Select Object to exit link mode.

15 From the main toolbar Selection Sets list, choose Garage_All. Click Yes to
dismiss the warning and unhide the rest of the scene geometry.

16 In the Top viewport, use Zoom Extents to view the entire parking
lot.

17 In the Perspective viewport, click the Perspective label and from the
menu, choose Cameras > Camera_Wall-E.

Animate the dummy by constraining it to a path:

1 In any viewport, select the Dummy_CAR helper.

2 From the main menu, choose Animation > Constraints > Path Constraint.

3 In the Top viewport, click on the green path (CarPath).


The helper and the linked car are repositioned at the start of the path.

NOTE You could, as an alternative, constrain the car directly to the path. In
this case, however, it is preferable to constrain the helper parented to the car
so you can retain extra control over the car’s behavior (such as defining skids
around tight corners).

4 Scrub the animation.


The car’s orientation remains constant throughout the animation.

5 In the Motion panel > Path Parameter rollout > Path Options
group, turn on Follow.

6 Scroll down to display the Axis group and turn on Flip.

Rotating the Wheels | 629


The Flip option prevents the car from driving in reverse.

7 Scrub the animation again.


Car motion is improved, but at the last frame the car points at an awkward
angle. This is a common behavior to paths based on a NURBS curve. You
will now correct this problem.

NOTE NURBS curves, when used as animation paths, provide a smoother


“ride” than regular splines.

8 Go to the last frame of the animation (frame 150), and make sure the
Point helper is selected.

9 Turn on Auto Key mode.

10 In the Motion panel > Path Parameters rollout > Path Options group >
% Along Path box, type 99.9 and press Enter.

11 Turn off Auto Key and scrub the animation.


The car is properly oriented on the path, but the wheels no longer rotate.
This is because the expression that defined the wheel rotation you
formulated earlier no longer applies. The distance travelled by the car
was dependent on the X and Y displacement in the World coordinate
system. Displacement is now tied to the length of the path and the

630 | Chapter 4 Animation Tutorials


percentage of the path that the car has travelled. You must therefore
modify the expression to reflect this change.

Wire wheel rotation to a path:

1 In any viewport, select the animation path (CarPath) then go to


the Utilities panel.

2 Click Measure and in the Shapes group, take note of the path length.

3 Select and right-click the Point helper, then from the menu choose Wire
Parameters. (You may need to adjust the model in the Perspective viewport
to better select the helper.)

4 From the menu, choose Transform > Position > Path Constraint > Percent.

5 Click one of the car wheels and choose Transform > Rotation > 4th Euler
Rotation > Z Rotation.

Rotating the Wheels | 631


6 On the Parameter Wiring dialog, set the control direction to the right,
which places the Percent parameter in control of the wheel rotation.

7 On the right-hand Expressions panel, type (2365*Percent)/13.

NOTE The value 2365 is the length of the animation path you measured
earlier. When multiplied by the percent variable, it calculates the distance
the car has travelled at any given moment in time along the path. When
divided by the radius of the wheel (13), it provides the amount of rotation
needed for the wheel to turn.

8 Click Connect.

9 Scrub the animation to see the wheel rotation.

10 To better see the animation, click the Time Configuration button


and in the Time Configuration dialog > Time Display group, turn on
FRAME:TICKS.

11 Repeat steps 3 to 8 to link the Point helper to each of the remaining three
car wheels.

632 | Chapter 4 Animation Tutorials


Remember to add a minus (-) operator to the expression of the wheels
on the right side of the model so they don’t rotate in the opposite
direction.

12 Save your file as mycar_rig_04.max.

Pivoting the Wheels


You now need to make sure the front wheels pivot or “turn” as the car moves
left or right along the animation path. For added realism, you will also establish
a relationship between the wheel pivot and the turn of the steering wheel.

Set up the lesson:

■ Continue from the previous lesson or open car_rig_04.max.

Set up helpers for the front wheels:


In the same way you created a Point helper to direct the car animation along
a path, you will also create two more Point helpers to control the pivot of the
front wheels by the rotation of the steering wheel.

1 In the Top viewport, zoom in on the car and press F3 to switch to


Wireframe mode.

2 From the main menu, choose Create > Helpers > Point.

Pivoting the Wheels | 633


3 Click anywhere around the car body and in the Parameters rollout, turn
on Box, then in the Size box, type 50.0 and name the helper Dummy_FL.

4 With the helper still selected, click the List Con button on the myTools
toolbar you created earlier in the tutorial.
The List Con script automatically assigns the two Position list and
Rotation list controllers you set up earlier, permitting you to retain control
over the helper’s local orientation.

NOTE If the myTools toolbar is not currently displayed on your interface,


right-click a gray area on the main toolbar and choose myTools from the
menu.

634 | Chapter 4 Animation Tutorials


5 From the main toolbar, click Align and in the Top viewport,
select the car body.

6 In the Align Selection dialog > Align Position group, turn off X Position,
Y, Position and Z Position. In the Align Orientation group, turn on X
Axis, Y Axis and Z Axis.

Pivoting the Wheels | 635


These settings ensure that the car and the helper have the same
orientation.

7 Click OK to close the dialog.

8 From the main toolbar, use Shift+Move and drag the helper to make a
copy.

TIP Set the coordinate system to Local to make moving the Point helper
easier.

9 In the Clone Options dialog, name the copy Dummy_FR.


Next, you will align the helper and the right front wheel pivot to pivot
in X, Y and Z positions.

10 In the Top viewport, select the Chassis object, right-click and


choose Hide Selection. Click the Align tool then zoom in and click
Wheel_FR.

636 | Chapter 4 Animation Tutorials


11 In the Align Selection dialog > Align Position group, turn on X Position,
Y Position, and Z Position and choose Pivot Point for both the Current
Object and Target Object.

12 In the Align Orientation group, turn off X Axis, Y Axis and Z Axis.

13 Click Apply, then OK to exit the dialog.

14 Select Dummy_FL and from the main toolbar click the Align tool. In the
top viewport click Wheel_FL.

15 Repeat steps 11 to 13 to align the helper to the front left wheel.

Pivoting the Wheels | 637


Point helpers aligned to front left and right wheels

You will now rework the hierarchy and parent/child relationships of the
car setup to prepare for the body roll you will rig in the next lesson.

16 On the main toolbar, click Select And Link.

Link the wheel helpers to the car helper:

1 Ctrl+select the two wheel helper objects, then drag to the Dummy_CAR
object.
This links the helpers as children of the Dummy_CAR object.

638 | Chapter 4 Animation Tutorials


2 With the Select and Link tool still active, select both rear wheels (Wheel-RL
and Wheel-RR) and drag to the Dummy_CAR helper.

3 Select the front left wheel (Wheel-FL) and link it to the Dummy_FL helper.

Linking front left wheel to front left wheel helper

4 Select the front right wheel (Wheel-FR) and link it to the Dummy_FR helper.

5 In the viewport, right-click and choose Unhide By Name. On the Select


From Scene dialog, choose Chassis.

Rotate the wheels (in World X coordinates):

1 Click the Camera_Wall-E viewport label and from the menu, choose
Cameras > Camera_Birdseye.

2 On the main toolbar, click the Select tool.

3 In the camera viewport, select the steering wheel (SWheel).

4 Right-click the steering wheel and choose Wire Parameters.

Pivoting the Wheels | 639


5 From the menu, choose Transform > Rotation > (2nd) Euler XYZ > Z
Rotation.

6 Select the Dummy-FL object, which is the front left wheel helper, and
choose Transform > Rotation > (2nd) Euler XYZ > Z Rotation.

7 On the Parameter Wiring dialog, set the control direction to both ways,
since the manual turning of either object affects the other.

8 Click Connect and leave the Parameter Wiring dialog open.

9 On the main toolbar, click Select And Rotate and set the coordinate system
to local.

10 Rotate the steering wheel on its local Z axis.


Note how the steering wheel and the front wheel turn in the opposite
direction. You will correct this by modifying the controller expression.
A second adjustment is also required. The front wheel needs to turn far
less than the steering wheel. This is because the pivot range of a front
wheel is about 90 degrees, whereas a steering wheel range of movement
is two to three complete revolutions.

640 | Chapter 4 Animation Tutorials


Steering wheel and front wheel turn in opposite directions

11 Cancel or undo the rotation you made in the previous step.

12 In the left-hand Expressions panel, under “Expression for SWheel’s


Z_Rotation”, type: -Z_Rotation*8.

13 In the right panel, under “Expression for Dummy_FL’s Z_Rotation”, type:


-Z_Rotation/8.

The minus (-) operator ensures that the two rotations are aligned, and
the *8 and /8 factors ensure that the front left wheel pivots (rotates in Z)
eight times less than the rotation of the steering wheel.

14 Click Update and test your work by rotating the steering wheel on its
local Z axis again.
Note the more realistic behavior.

15 Repeat steps 4 to 14 to wire the steering wheel and the front right wheel
helper.

Pivoting the Wheels | 641


Be sure to specify the exact same expressions as you did in steps 13 and
14, since the right wheel helper was copied, not mirrored, from the front
left helper.

16 Close the Parameter Wiring dialogs.

Animate the steering:

1 If your timeline is displayed in frames and ticks, click the Time


Configuration button and in the Time Configuration dialog > Time
Display group, choose Frames.

2 Switch to Top view, press F3 to switch back to Smooth +


Highlights mode, then use Zoom Extents so the entire animation path
is in view.

3 Go to frame 50, the point where the car is in the middle of its first turn.

4 Select SWheel and on the main toolbar and click Rotate.

5 Turn Auto Key on and rotate the steering wheel until the Z
axis status bar reads -280.

642 | Chapter 4 Animation Tutorials


Steering wheel rotation at -280 degrees about the Z axis

6 Go to frame 115, the point where the car is in the middle of the second
turn, and rotate the steering wheel until the Z axis status bar reads 500.

Pivoting the Wheels | 643


Steering wheel rotation at 500 degrees in the Z axis

7 Go to the end of the animation and rotate the steering wheel until the
Z axis status bar reads -220.

8 Turn off Auto Key and test your animation.

9 Save your file as mycar_rig_05.max.

Setting Car Body Roll


Body roll is a phenomenon that occurs when a car rounds a sharp corner. This
behavior is not usually apparent in modern day cars unless they are travelling

644 | Chapter 4 Animation Tutorials


at high speed. In older cars, such as our 1957 Chevy, however, the amount
of body roll is discernible to both passengers and bystanders even when the
vehicle is travelling at low speed.

Set up for the lesson:

■ Continue from the previous lesson or open car_rig_05.max.

Create the body roll effect:


In this lesson, you will create the effect of body roll by rotating the car along
its local X axis. Roll direction will be based on the rotation of the steering
wheel.

1 Make sure you are at frame 1 in your animation.

2 In the Top viewport, zoom in on the car and press F3 to turn Wireframe
mode on.

3 On the main toolbar, click Rotate and make sure the coordinate
system is set to Local.

4 In any viewport, select the steering wheel object.


The steering wheel rotates about its local Z axis.

5 Select the car body object.


The car body rolls about its local X axis.

Setting Car Body Roll | 645


6 Select the steering wheel again, then right-click on it and from the Quad
menu, choose Wire Parameters.

7 Choose Transform > Rotation > (2nd) Euler XYZ > Z Rotation.

8 Select the car body and choose Transform > Rotation > (2nd) Euler XYZ
> X Rotation.

9 On the Parameter Wiring dialog, set the control direction to the right so
the steering wheel rotation in Z controls the body roll in X.

10 On the right-hand Expressions panel, complete the expression so it reads:


Z_Rotation/40, then click Connect.

NOTE The /40 factor in the expression divides the steering wheel rotation
by 40 to ensure body roll rotation is significantly smaller than the rotation of
the steering wheel. If you like, try experimenting with other values.

11 Click the Camera viewport label and choose Camera > Camera_Wall_S
then scrub the animation to see the effect of the body roll.

646 | Chapter 4 Animation Tutorials


Body roll visible in Front, Left and Camera viewports.

12 Save your file as mycar_rig_06.max.

Adjust Driver Viewpoint


As a driver, when you use a steering wheel to initiate a turn, your eyes tend
to follow the direction of the turn. When you turn left, you look left: when
you turn right, you look right. In this lesson, your final task is to make the
viewpoint of the driver react to the rotation of the steering wheel.

Adjust Driver Viewpoint | 647


Set up the lesson:

■ Continue from the previous lesson or open car_rig_06.max.

Change the driver’s point of view:


In this procedure, you will wire the rotation of the “driver view” camera to
the steering wheel.

1 On the Display panel > Hide By Category rollout, turn off


Cameras to re-display the cameras in the scene.

2 In the Front viewport, select the Camera_Driver object.

648 | Chapter 4 Animation Tutorials


Camera_Driver object

This is the camera that occupies the driver’s seat.

3 Click the List Con button on the myTools toolbar you created earlier in
the tutorial.
The List Con script automatically adds position and rotation list
controllers, permitting you to retain control over the camera’s local
orientation.

NOTE If the myTools toolbar is not currently displayed on your interface,


right-click a gray area on the main toolbar and choose myTools from the
menu.

4 With the camera object selected, go to the hierarchy panel and on the
Adjust Pivot rollout, click Affect Pivot Only.
Note that the swivel axis needed for the camera is the Y axis (displayed
in green).

Adjust Driver Viewpoint | 649


Camera swivel on Y axis

5 Click Affect Pivot Only again to exit pivot mode.

6 Select the steering wheel, right-click it, and from the menu choose Wire
Parameters.

7 Choose Transform > Rotation > (2nd) Euler XYZ > Z Rotation.

8 Select the Camera_Driver object and choose Transform > Rotation > (2nd)
Euler XYZ > Y Rotation.

9 On the Wiring Parameter dialog, set the control direction from left to
right so the steering wheel controls the camera rotation.

10 On the right-hand Expressions panel, complete the expression so it reads:


Z_Rotation/10 and click Connect.
Keep the dialog open for now.

650 | Chapter 4 Animation Tutorials


NOTE The /10 factor in the expression prevents the camera from rotating
too far in either direction. You can experiment with different values to produce
the results you need.

11 In the Camera viewport, click the label and choose Views > Camera Driver.

12 Scrub the animation to observe the wiring effect.


As the steering wheel rotates, the camera viewpoint swivels in the wrong
direction.

13 In the Wiring Parameters dialog, add a negative operator in front of the


expression, so that it reads: -Z_Rotation/10, then click Update.

14 Close the Wiring Parameters dialog and scrub the animation again.
The rig is now complete. To view a version of the finished product, open
car_rig_final.max.

Summary

In this tutorial, you learned how to assign controllers to components of a


model, and use expressions to ensure the controllers animate the components
correctly. You also learned how to use Point helpers to animate a model along
a path and were shown how to rework the model hierarchy so that a child
object can respond to the animation of its parent.

Adding Sound Effects to Animation


In this tutorial, you have the scene of a World War One airfield somewhere
in the north of France. A biplane is poised for takeoff, but it has no sound.
Your task is to take a group of four .wav files and assemble them so that they
play back as the plane rolls down the runway and takes to the sky.
You will set up the audio files in your scene, then adjust the sync in the Dope
Sheet Editor.

Adding Sound Effects to Animation | 651

You might also like