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.
- In the Top viewport, zoom in on the car and press F3 to switch to Wireframe mode.
- From the main menu, choose Create Helpers Point.
- 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.
- 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.
NoteIf 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.
- From the main toolbar, click (Align) and in the Top viewport,
click the car body.
- 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.
These settings ensure
that the car and the helper have the same orientation.
- Click OK to close the dialog.
- From the main toolbar, use Shift+Move and drag the helper to
make a copy.
TipSet the coordinate
system to Local to make moving the Point helper easier.
- 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.
- In the Top viewport, select the Chassis object,
right-click and choose Hide Selection.
- Select the new point helper.
Click (Align), and then click Wheel_FR.
- In the Align Selection dialog Align Position group,
turn on X Position, Y Position, and Z Position.
Make sure Pivot Point
is chosen in both the Current Object and Target Object groups.
In the Align Orientation
group, turn off X Axis, Y Axis and Z Axis.
- Click Apply, then click OK to exit the
dialog.
- Select Dummy_FL, and from
the main toolbar click (Align) tool again. In the
Top viewport, click Wheel_FL.
- Repeat steps 12 and 13 to align the helper
to the front left wheel.
Now you will now rework
the hierarchy and parent/child relationships of the car setup, so
you can pivot (steer) the wheels. These steps also prepare for the
body roll you will rig in the next lesson.
Link the wheel helpers to the car helper:
- On the main toolbar, click (Select And Link).
- 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.
Link the rear wheels to the car helper:
- With (Select And Link) still
active, select both rear wheels (Wheel-RL and Wheel-RR)
and drag to the Dummy_CAR helper.
Link the front helpers to their wheels:
- Link the front left wheel
(Wheel-FL)
to the Dummy_FL helper.
- Link the front right wheel
(Wheel-FR)
to the Dummy_FR helper.
- Click (Select Object) to turn
it on and turn off Select And Link.
Unhide the car body:
- In the viewport, right-click and choose
Unhide By Name from the quad menu. On the Select From Scene dialog,
choose Chassis, and then click Unhide.
Rotate the wheels (in World X coordinates):
- Click the Camera_Wall-E viewport label
and from the menu, choose Cameras Camera_Birdseye.
- On the main toolbar, click (Select) to turn it on.
- In the Camera viewport, select the steering
wheel (SWheel).
- Right-click the steering wheel and choose
Wire Parameters.
- From the menu, choose Transform Rotation (2nd) Euler XYZ Z Rotation.
- Click the Dummy-FL object,
which is the front left wheel helper, and choose Transform Rotation (2nd) Euler XYZ Z Rotation.
- On the Parameter Wiring dialog, set the
control direction to both ways, since the manual turning of either
object affects the other.
- Click Connect, and leave the Parameter
Wiring dialog open.
- On the main toolbar, turn on (Select And Rotate) and
set the coordinate system to Local.
- Rotate the steering wheel on its local
Z axis.
Notice 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.
- Cancel or undo the rotation you made
in the previous step.
- In the left-hand Expressions panel, under
“Expression for SWheel’s Z_Rotation”, type: –Z_Rotation*8.
- In the right panel, under “Expression
for Dummy_FL’s Z_Rotation”, type: –Z_Rotation/8.
The minus sign (-) 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.
- Click Update and test your work by rotating
the steering wheel on its local Z axis again.
Notice the more realistic
behavior.
- Repeat steps 4 to 14 to wire the steering
wheel and the front right wheel helper. (You can use H to select the front right wheel
helper.)
Be sure to specify exactly
the same expressions as you did in steps 13 and 14, since the right
wheel helper was copied, not mirrored, from the front left helper.
You can see the effect
of wiring the front right wheel in the Top viewport.
- Close the Parameter Wiring
dialogs.
Animate the steering:
- If your timeline is displayed in frames
and ticks, click (Time Configuration) and
in the Time Configuration dialog Time Display group, choose Frames.
- Activate the Top view, press F3 to switch back to Smooth + Highlights
mode, then click (Zoom Extents) so you can
see the entire animation path.
- Go to frame 50, the point where the car
is in the middle of its first turn.
- Select SWheel and on
the main toolbar, click (Select And Rotate).
- Turn on (Auto Key) and rotate the
steering wheel until the Z axis status bar reads –280.
- 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.
- Go to the end of the animation and
rotate the steering wheel until the Z axis status bar reads –220.
- Turn off (Auto Key) and test your
animation.
- Save your file as mycar_rig_05.max.