45
Tutorials: Car Rigging Autodesk ® 3ds Max ® 2009

3ds Max 2009 Tutorials Car Rigging0

Embed Size (px)

Citation preview

Page 1: 3ds Max 2009 Tutorials Car Rigging0

Tutorials: Car Rigging

Autodesk®

3ds Max®

2009

Page 2: 3ds Max 2009 Tutorials Car Rigging0

© 2008 Autodesk, Inc. All rights reserved. Except as otherwise permitted by Autodesk, Inc., this publication, or parts thereof, may not bereproduced in any form, by any method, for any purpose.Certain materials included in this publication are reprinted with the permission of the copyright holder.Portions Copyright © 2005 Microsoft Corporation. All rights reserved.Portions Copyright Max HTR created 2003-2005 by Motion Analysis.REALVIZ Copyright © 2006 REALVIZ S.A. All rights reserved.Portions of this software JSR-184 Exporter Copyright © 2004 Digital Element, Inc.JPEG software is copyright © 1991-1998, Thomas G. Lane. All Rights Reserved. This software is based in part on the work of the IndependentJPEG Group.Portions Copyright © 2005 Blur Studio, Inc.Portions Copyright © 1999-2005 Joseph Alter, Inc. Credit to Joe Alter, Gonzalo Rueda, and Dean Edmonds.Certain patents licensed from Viewpoint Corporation.This product includes Radiance software (http://radsite.lbl.gov/radiance) developed by the Lawrence Berkeley National Laboratory(http://www.lbl.gov). Copyright © 1990-2005. The Regents of the University of California through Lawrence Berkeley National Laboratory. Allrights reserved.Portions Copyright © 1990-2007 Info-ZIP. All rights reserved.For the purposes of this copyright and license, "Info-ZIP" is defined as the following set of individuals: Mark Adler, John Bush, Karl Davis, HaraldDenker, Jean-Michel Dubois, Jean-loup Gailly, Hunter Goatley, Ed Gordon, Ian Gorman, Chris Herborth, Dirk Haase, Greg Hartwig, Robert Heath,Jonathan Hudson, Paul Kienitz, David Kirschbaum, Johnny Lee, Onno van der Linden, Igor Mandrichenko, Steve P. Miller, Sergio Monesi, KeithOwens, George Petrov, Greg Roelofs, Kai Uwe Rommel, Steve Salisbury, Dave Smith, Steven M. Schweda, Christian Spieler, Cosmin Truta,Antoine Verheijen, Paul von Behren, Rich Wales, Mike White. This software is provided "as is," without warranty of any kind, express or implied.In no event shall Info-ZIP or its contributors be held liable for any direct, indirect, incidental, special or consequential damages arising out ofthe use of or inability to use this software. Permission is granted to anyone to use this software for any purpose, including commercial applications,and to alter it and redistribute it freely, subject to the above disclaimer and the following restrictions: 1) Redistributions of source code (in wholeor in part) must retain the above copyright notice, definition, disclaimer, and this list of conditions. 2) Redistributions in binary form (compiledexecutables and libraries) must reproduce the above copyright notice, definition, disclaimer, and this list of conditions in documentation and/orother materials provided with the distribution. The sole exception to this condition is redistribution of a standard UnZipSFX binary (includingSFXWiz) as part of a self-extracting archive; that is permitted without inclusion of this license, as long as the normal SFX banner has not beenremoved from the binary or disabled. 3) Altered versions--including, but not limited to, ports to new operating systems, existing ports with newgraphical interfaces, versions with modified or added functionality, and dynamic, shared, or static library versions not from Info-ZIP--must beplainly marked as such and must not be misrepresented as being the original source or, if binaries, compiled from the original source. Suchaltered versions also must not be misrepresented as being Info-ZIP releases--including, but not limited to, labeling of the altered versions withthe names "Info-ZIP" (or any variation thereof, including, but not limited to, different capitalizations), "Pocket UnZip," "WiZ" or "MacZip" withoutthe explicit permission of Info-ZIP. Such altered versions are further prohibited from misrepresentative use of the Zip-Bugs or Info-ZIP e-mailaddresses or the Info-ZIP URL(s), such as to imply Info-ZIP will provide support for the altered versions. 4) Info-ZIP retains the right to use thenames "Info-ZIP," "Zip," "UnZip," "UnZipSFX," "WiZ," "Pocket UnZip," "Pocket Zip," and "MacZip" for its own source and binary releases.Portions relating toOpenEXR Bitmap I/O Plugin © 2003-2005 SplutterFish, LLC.Portions relating to OpenEXR © 2003 Industrial Light and Magic a division of Lucas Digital Ltd. LLC.Portions relating to Zlib © 1995-2004 Jean-loup Gaily and Mark AlderPortions Copyright © 2000-2005 Size8 Software, Inc.Portions Copyright © 1988-1997 Sam Leffler.Portions Copyright © 1991-1997 Silicon Graphics, Inc. Permissions to use, copy, modify, distribute, and sell this software and its documentationfor any purpose is hereby granted without fee, provided that (i) the above copyright notices and this permission notice appear in all copies ofthe software and related documentation, and (ii) the names of Sam Leffler and Silicon Graphics may not be used in any advertising or publicityrelating to the software without the specific, prior written permission of Sam Leffler and Silicon Graphics.Portions Copyright © 2006 IntegrityWare, Inc.Portions © Copyright 1999-2005 Havok.com Inc. (or its licensors). All Rights Reserved. See http://www.havok.com for details.Portions Copyright © MAX2Obj and Obj2Max created 1996-2001 by Harald A. Blab.Portions developed by Digimation, Inc. for the exclusive use of Autodesk, Inc.Portions Copyright 1998-2003 by Neil Hodgson. All Rights Reserved. Permission to use, copy, modify, and distribute this software and itdocumentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that boththat copyright notice and this permission notice appear in supporting documentation.Portions of this software, Point Cache 2 are copyright © 2005-2006 Blizzard Entertainment, Inc.Portions Copyright © 2003 ATI Technologies, Inc. All Rights Reserved. Permission to use, copy, modify, and distribute this software and itsdocumentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and derivativeworks and that both the copyright notice and this permission notice appear in support documentation, and that the name of ATI Technologies,Inc. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.Portions Copyright © 1994 F. Kenton Musgrave.Portions of this software are Copyright © 1991-1994 by Arthur D. Applegate. All Rights Reserved. No part of this source code may be copied,modified or reproduced in any form without retaining the above copyright notice. This source code, or source code derived from it, may notbe redistributed without express written permission of the author.Portions Copyright ©1995, 1996 Guy Eric Schalnat, Group 42, Inc.Portions Copyright ©1996, 1997 Andreas Dilger.Portions Copyright © 1989, 1991, 1993 Aladdin Enterprises. All rights reserved.

Page 3: 3ds Max 2009 Tutorials Car Rigging0

Portions Copyright © 1999, 2000 NVIDIA Corporation. This file is provided without support, instructions or implied warranty of any kind. NVIDIAmakes no guarantee of its fitness for a particular purpose and is not liable under any circumstances for any damages or loss whatsoever arisingfrom the use or inability to use this file or items derived from it.Portions Copyright © 2006 NVIDIA Corporation.Portions Copyright 1990-1991 by Thomas Knoll. Copyright 1992-1995 by Adobe Systems, Inc.Portions Copyright 1993-1996, Adobe Systems, Incorporated. All rights reserved worldwide.This software contains source code provided by mental images GmbH.Portions Copyright Guruware OBJio © 2007 http://www.guruware.atPortions Copyright Orbaz Technologies © 2007Portions Copyright Mathew Kaustinen © 2007

TrademarksThe following are registered trademarks or trademarks of Autodesk, Inc., in the USA and other countries: 3DEC (design/logo), 3December,3December.com, 3ds Max, ActiveShapes, Actrix, ADI, Alias, Alias (swirl design/logo), AliasStudio, Alias|Wavefront (design/logo), ATC, AUGI,AutoCAD, AutoCAD Learning Assistance, AutoCAD LT, AutoCAD Simulator, AutoCAD SQL Extension, AutoCAD SQL Interface, Autodesk, AutodeskEnvision, Autodesk Insight, Autodesk Intent, Autodesk Inventor, Autodesk Map, Autodesk MapGuide, Autodesk Streamline, AutoLISP, AutoSnap,AutoSketch, AutoTrack, Backdraft, Built with ObjectARX (logo), Burn, Buzzsaw, CAiCE, Can You Imagine, Character Studio, Cinestream, Civil3D, Cleaner, Cleaner Central, ClearScale, Colour Warper, Combustion, Communication Specification, Constructware, Content Explorer,Create>what's>Next> (design/logo), Dancing Baby (image), DesignCenter, Design Doctor, Designer's Toolkit, DesignKids, DesignProf, DesignServer,DesignStudio, Design|Studio (design/logo), Design Your World, Design Your World (design/logo), DWF, DWG, DWG (logo), DWG TrueConvert,DWG TrueView, DXF, EditDV, Education by Design, Exposure, Extending the Design Team, FBX, Filmbox, FMDesktop, Freewheel, GDX Driver,Gmax, Heads-up Design, Heidi, HOOPS, HumanIK, i-drop, iMOUT, Incinerator, IntroDV, Inventor, Inventor LT, Kaydara, Kaydara (design/logo),LocationLogic, Lustre, Maya, Mechanical Desktop, MotionBuilder, Mudbox, NavisWorks, ObjectARX, ObjectDBX, Open Reality, Opticore,Opticore Opus, PolarSnap, PortfolioWall, Powered with Autodesk Technology, Productstream, ProjectPoint, ProMaterials, Reactor, RealDWG,Real-time Roto, Recognize, Render Queue, Reveal, Revit, Showcase, ShowMotion, SketchBook, SteeringWheels, StudioTools, Topobase, Toxik,ViewCube, Visual, Visual Bridge, Visual Construction, Visual Drainage, Visual Hydro, Visual Landscape, Visual Roads, Visual Survey, Visual Syllabus,Visual Toolbox, Visual Tugboat, Visual LISP, Voice Reality, Volo, Wiretap, and WiretapCentral.The following are registered trademarks or trademarks of Autodesk Canada Co. in the USA and/or Canada and other countries: Backburner,Discreet, Fire, Flame, Flint, Frost, Inferno, Multi-Master Editing, River, Smoke, Sparks, Stone, and Wire.All other brand names, product names or trademarks belong to their respective holders.

DisclaimerTHIS PUBLICATION AND THE INFORMATION CONTAINED HEREIN IS MADE AVAILABLE BY AUTODESK, INC. "AS IS." AUTODESK, INC. DISCLAIMSALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY ORFITNESS FOR A PARTICULAR PURPOSE REGARDING THESE MATERIALS.

Page 4: 3ds Max 2009 Tutorials Car Rigging0

Rigging a Car

. You shouldeering wheelividually

ts to “rig”

1

Rigging a CarThere is more to animating a car than simply giving it a trajectoryalso consider such aspects as wheel rotation, the link between the stand front wheels, as well as body roll. Animating these aspects indhowever, can become quite complicated.

In this tutorial you will establish relationships and other constrainthese moveable car parts so they can easily be animated together.

1

Page 5: 3ds Max 2009 Tutorials Car Rigging0

el

trollers

am disc in copy theprogram

In this tutorial, you will learn how to:

■ Use list controllers to manage animated components of a mod

■ Define controller behaviour though the use of expressions

■ Use the MacroRecorder to automate the assignment of List Con

■ Create a custom toolbar

■ Use wiring and expressions

Skill level: Advanced

Time to complete: 1+ hours

Files for This Tutorial

All the files necessary to do the tutorials can be found on the progrthe \tutorials\animation\rigging\ folder. Before doing the tutorials,\tutorials\animation\rigging\ directory from the disc to your local installation.

2 | Chapter 1 Rigging a Car

Page 6: 3ds Max 2009 Tutorials Car Rigging0

Using List Controllers

A Controller in 3ds Max/3ds Max Design is a plug-in that manages the valuesinvolved in keyframe animation, such as changes in object scaling, color ortranslation. List controllers combine two or more controllers and can be very

ndcularly ifhe listntrol over

ained to

is tutorial,o turn theis (basedl’s localbject, you

ront left

rollers | 3

useful when combining relationships between objects.

List controllers, for example, are helpful when using expressions aconstraints to control a child object through a parent object, partithe child and parent objects are not using the same orientation. Tcontroller uses added internal controllers that lets you maintain cothe child object’s local orientation, even though it remains constrthat of its parent.

Local orientation of child object (wheel, shown at left) differs fromparent object (car body shown at right)

The child object (car wheel) of the rig you are about to animate in this oriented differently to that of the parent object (the car body). Twheel using wiring, you would have to rotate the wheel on its Y-axon the orientation of the body of the car), not its X-axis (the wheeorientation). To regain control of the local orientation of the child owill add list controllers to the position and rotation tracks of the fwheel animation.

Using List Cont

Page 7: 3ds Max 2009 Tutorials Car Rigging0

Set up for this lesson:

■ From the \tutorials\animation\rigging\ folder, open Car_Rig_01-Start.max.

Manually assign list controllers:

sition and

e Selection

hildren of typical to

ler rollout.

In this procedure, you will manually assign list controllers to the porotation tracks of the front left wheel of your Chevy.

1 On the main toolbar Selection Sets list, choose Garage_All.

2 Select, then right-click the Perspective viewport and choose Hidfrom the quad menu.

All scene objects other than the car are hidden.

3 Press H to display the Select From Scene dialog.

Notice how the four wheels as well as the steering wheel are ca parent object called Chassis (the car body). This hierarchy is3D car models.

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

The front left wheel in the scene is now selected.

5 Go to the Motion panel and expand the Assign Control

4 | Chapter 1 Rigging a Car

Page 8: 3ds Max 2009 Tutorials Car Rigging0

A list of default animation controllers display as tracks in an Explorerformat.

6 Highlight the Position:Position XYZ track, then click the Assign Controllerbutton.

n List.

, click the

ton again.

n XYZ.

n createdontrolosition of

ller to the

rollers | 5

7 On the Assign Position Controller dialog, double-click Positio

This is the list controller you will assign to the child object.

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

9 Click the Available track, then click the Assign Controller but

10 On the Assign Position Controller dialog, double-click Positio

In the explorer, a second Position XYZ: Position track has beebelow the first. This track represents the controller that will ckeyframe information of X, Y and Z axes based on the local pthe child object (the front left wheel).

Next, you will repeat the procedure by assigning a List Controrotation track of the front left wheel.

Using List Cont

Page 9: 3ds Max 2009 Tutorials Car Rigging0

11 On the Assign Controller rollout list of tracks, click Rotation: Euler XYZand click the Assign Controller button.

on List.

ation: List

n.

YZ.

ls rotationoordinates

ctions int you can

tation listoRecorderels, as wellme

here on

12 On the Assign Rotation Controller dialog, double-click Rotati

13 On the Assign Controller rollout list of tracks, expand the Rottrack by clicking its + icon.

14 Click the Available track and click the Assign Controller butto

15 On the Assign Rotation Controller dialog, double-click Euler X

A second Rotation: Euler XYZ track is created. This track controkeyframe information of X, Y and Z axes based on the local cof the front left wheel.

Automating the assignment of List Controllers:

MacroRecorder is a simple scripting utility that records your intera3ds Max/3ds Max Design. It converts your actions into a script thare-use to accomplish repetitive tasks.

In the previous procedure, you manually assigned position and rocontrollers to a single wheel on your Chevy. You will now use Macrto automatically assign list controllers to the remaining three wheas the car body and steering wheel so that the entire rig uses the sacoordinate system in its animation.

1 Go to the bottom left corner of the interface, right-click anywthe MAXScript area and choose Open Listener Window.

6 | Chapter 1 Rigging a Car

Page 10: 3ds Max 2009 Tutorials Car Rigging0

downwardible.

Max/3ds

list

rollers | 7

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

3 From the menu bar, choose MacroRecorder > Enable.

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

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

5 Repeat steps 6 through 15 of the previous procedure to assigncontrollers to the position and rotation of the rear left wheel.

Using List Cont

Page 11: 3ds Max 2009 Tutorials Car Rigging0

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

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

rs tab is

ly-created

into the

ppearance.

the label

7 On the Customize User Interface dialog, make sure the Toolbaselected, then click New.

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

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

10 Highlight lines 2 to 5 of the script, then drag and drop them myTools toolbar.

A button is created.

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

12 On the Edit Macro Button dialog, turn on Text Button and infield, type List Con and click OK.

8 | Chapter 1 Rigging a Car

Page 12: 3ds Max 2009 Tutorials Car Rigging0

Recorder >

ax.

ls toolbar

controllers

heel-FR

e Positioned by the

n again.

t at a time.t you want

e for all

rollers | 9

13 On the MAXScript Listener window menu bar, choose MacroEnable to turn off script recording.

The MacroRecorder stops recording your interactions in 3ds M

14 Close the MAXScript Listener window, then resize the myToountil the List Con label is fully displayed.

You are now ready to use the List Con tool to quickly assign list to the remaining wheels of your car model.

15 In any viewport, select the front right wheel of the car (the Wobject).

16 On the myTools toolbar, click List Con.

On the Motion panel > Animation Controller rollout, expand thXYZ track to display one of the list controllers that was assignscript you just created.

17 Select the last remaining wheel in the model and click List Co

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 objecYou must therefore click the List Con button once for each objecto modify.

20 Save your work as myCar_Rig_02.max.

The myTools toolbar you created in this procedure is now availablfuture 3ds Max/3ds Max Design work sessions.

Using List Cont

Page 13: 3ds Max 2009 Tutorials Car Rigging0

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

Rotating the Wheels

nt that

ting the

radius ofount of the radius

13 units.

by the car

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

Let’s start by taking a look at the trigonometry involved in calculawheel rotation.

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

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

■ the arc length, when flattened, represents the distance travelledand its wheels.

10 | Chapter 1 Rigging a Car

Page 14: 3ds Max 2009 Tutorials Car Rigging0

distance /e distance

chooseig_02.max.

n working

ose Wire

XYZ > X

heels | 11

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

Set up the lesson:

■ Continue from the previous lesson or go to the File menu and Open. From the \tutorials\animation\rigging\ folder, open Car_R

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 begiat this coordinate level.

2 Right-click the car body object and from the quad menu, choParameters.

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

Rotating the W

Page 15: 3ds Max 2009 Tutorials Car Rigging0

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

your two

YZ > Z

w above

el-FL Z

ays thed as

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

A rubber band shows the link you are about to make betweenselected objects.

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

6 On the Parameter Wiring dialog, click the right-pointing arrocontrol direction.

This ensures that the Chassis X position is controlling the Wherotation and not the other way around.

The bottom-right corner of the Parameter Wiring dialog displwheel object Expressions panel. It shows the distance travelleX_Position.

7 Next to X_Position, type /13.

12 | Chapter 1 Rigging a Car

Page 16: 3ds Max 2009 Tutorials Car Rigging0

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

ou addedller in the. You needg process)

rollout,

controller

heels | 13

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 ya position list controller to the car and wheel, the first controlist (the one that ensures the parent/child “lock”) is still activeto make the second position controller (the one used in the wirinthe 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 click Position.

12 On the Position List rollout, highlight the second Position XYZand click Set Active.

Rotating the W

Page 17: 3ds Max 2009 Tutorials Car Rigging0

13 Try moving the car on its X axis again.

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

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

tes in the

.

els on thexpression,

determinel along theel rotationntrollers

0 degrees

working

ou can see

Note how

ontrollers,n. You willrollers

AXScript

click Update.

15 Move the car on its X axis again and note how the wheel rotaproper direction.

16 Repeat steps 1 to 8 for each of the remaining three car wheels

Keep in mind that because the wheels were mirrored, the wheright side of the car do not need the minus sign added to their ewhereas those on the left side do.

17 Close all the Parameter Wiring dialogs.

Rotate the wheels (in World Y coordinates):

In the previous procedure, you learned how to add controllers thatcar wheel rotation for the length of distance travelled by the modeWorld X axis. However, if you tried to rotate the car in any way, whewould be reduced or stop altogether. You therefore need to add cothat account for the car’s displacement in a Y direction.

1 In the Top viewport, select the car body object and rotate it 9clockwise so that its front bumper pointing at 12 o’clock.

The car is now oriented on the World Y axis, so you will beginat this coordinate level.

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

3 Move the car on the Y axis so it moves forward and backward.the wheels do not rotate.

To get the wheels rotating, you will need additional animation cones that will control the car’s displacement in the Y directioadd these as sub-controllers, so you do not overwrite the contalready in place.

Go to the bottom left corner of the interface, right-click the Marea and click Open Listener Window.

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

$.rotation.controller.Available.controller = Euler_XYZ ()

14 | Chapter 1 Rigging a Car

Page 18: 3ds Max 2009 Tutorials Car Rigging0

5 Press Ctrl + C to copy this line to memory.

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

7 On the bottom left corner of the interface, click inside the white entry

t theded to the

need this

eels have

is visible.

, choose

XYZ > Y

heels | 15

box, press Ctrl + V to paste the line of code, then press Enter.

8 On the Motion panel > PRS Parameters rollout, make sure thaRotation button is active and a new sub-controller has been adrotation list.

9 Repeat step 8 to add a fourth rotation sub-controller. You willlater on in the tutorial.

The front left wheel should now have four Euler XYZ tracks.

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

11 Adjust the Perspective view until the front left side of the car

12 Select the car body, then right-click and from the quad menuWire Parameters.

13 From the menu, choose Transform > Position > (2nd) PositionPosition.

Rotating the W

Page 19: 3ds Max 2009 Tutorials Car Rigging0

YZ > Z

w aboverolling the

13

sition/13.

rotate the

rdinate

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

15 From the menu, choose Transform > Rotation > (3rd) Euler XRotation.

16 On the Parameter Wiring dialog, click the right-pointing arroControl Direction to ensure that the Chassis Y position is contWheel-FL Z rotation.

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

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

18 Click Connect.

19 Repeat steps 15 to 19 for each of the other three wheels.

NOTE The expression for the right-hand wheels should be -Y_Po

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

21 On the main toolbar, click Select And Move, then set the coosystem to Local.

16 | Chapter 1 Rigging a Car

Page 20: 3ds Max 2009 Tutorials Car Rigging0

ed from its

ting

ointing to

rotate theheels will the scene

g it on aquires a

ius) as thes constant,

.max.

heels | 17

22 In the Perspective viewport, position the car so it can be viewside.

23 Move the car on its local X axis. Note how the wheels are rotaproperly.

24 In the Top viewport, rotate the car until the front bumper is pthe left.

25 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 thatcar wheels for any distance of travel in World X and Y space. The wtherefore rotate properly when you manually move the car aroundin any direction.

However, you would most often animate motion of a car by placinpre-defined path using Path Constraint. This type of animation redifferent expression.

This new expression uses the same formula (distance divided by radones you have been using, but while the radius of the wheel remainthe distance travelled is calculated differently.

1 Continue from the last procedure or open the file Car_Rig_03

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

Rotating the W

Page 21: 3ds Max 2009 Tutorials Car Rigging0

otion.

to select

advantage scale it.ething you

t helper.

ar click

A warning message displays.

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

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

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

This increases the size of the helper gizmo and makes it easierin the scene.

NOTE Many animators use the Dummy helper instead of Point. Theof using a Point helper is you can adjust its size without having toScaling a helper in a hierarchy will affect its children objects, somusually want to avoid.

6 In the Top viewport, click a point near the car to place a Poin

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

18 | Chapter 1 Rigging a Car

Page 22: 3ds Max 2009 Tutorials Car Rigging0

8 In the Align Selection dialog > Align Position group, turn on X Positionand Y Position.

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

the right

t of the car

heels | 19

10 In the Front viewport, move the Point helper on its X axis to 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 poinwhen the front wheels turn.

Rotating the W

Page 23: 3ds Max 2009 Tutorials Car Rigging0

11 On the command panel > Name and Color rollout, rename the helperDummy_CAR.

12 In any viewport, select the car body.

e Front

l. Click Yesetry.

re parking

nd from

onstraint.

he path.

he path. In the car soing skids

tion.

llow.

13 On the main menu, click Select and Link, then in thviewport, click the car body and drag to the Point helper.

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

15 From the main toolbar Selection Sets menu, choose Garage_Alto dismiss the warning and unhide the rest of the scene geom

16 In the Top viewport, zoom out and pan until you see the entilot.

17 In the Perspective viewport, right-click the Perspective label athe menu, choose Views > Camera_Wall-E.

18 In any viewport, select the Dummy_CAR helper.

19 From the main menu, choose Animation > Constraints > Path C

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

The helper and the linked car are repositioned at the start of t

NOTE You could, as an alternative, constrain the car directly to tthis case however, it is preferable to constrain the helper linked toyou can retain extra control over the car’s behavior (such as definaround tight corners).

21 Scrub the animation.

The car’s orientation remains constant throughout the anima

22 In the Motion panel > Path Options group turn on Fo

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

20 | Chapter 1 Rigging a Car

Page 24: 3ds Max 2009 Tutorials Car Rigging0

n awkwardte the path

moother

sure the

s group >

ger rotate. you the car

ordinated the

heels | 21

The Flip option prevents the car from driving in reverse.

24 Scrub the animation again.

Car motion is improved, but at the last frame the car points at aangle. This is because NURBS curves have been used to calculatrajectory. You will now correct this problem.

NOTE NURBS curves, when used as animation paths, provide a s“ride” than regular splines.

25 Go to the last frame of the animation (frame 150), and make Point helper is active.

26 Turn on Auto Key mode.

27 In the Motion panel > Path Parameters rollout > Path Option% Along Path box, type 99.9 and press Enter.

28 Turn off Auto Key and scrub the animation.

The car is properly oriented on the path, but the wheels no lonThis is because the expression that defined the wheel rotationformulated earlier no longer applies. The distance travelled bywas dependent on the X and Y displacement in the World cosystem. Displacement is now tied to the length of the path an

Rotating the W

Page 25: 3ds Max 2009 Tutorials Car Rigging0

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

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

length.

oose Wiree viewport

> Percent.

on > 4th

the Utilities panel.

30 Click Measure and in the Shapes group, take note of the path

31 Select and right-click the Point helper, then from the menu chParameters. (You may need to adjust the model in the Perspectivto better select the helper.)

32 From the menu, choose Transform > Position > Path Constraint

33 Point to one of the car wheels and choose Transform > RotatiEuler Rotation > Z Rotation.

22 | Chapter 1 Rigging a Car

Page 26: 3ds Max 2009 Tutorials Car Rigging0

he right,on.

.

easured distance. Whenf rotation

ion buttonrn on

g three car

heels | 23

34 On the Parameter Wiring dialog, set the control direction to twhich places the percent helper in control of the wheel rotati

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

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

36 Click Connect.

37 Scrub the animation to see the wheel rotation.

38 To better see the animation, click the Time Configuratand in the Time Configuarion dialog > Time Display group, tuFRAME:TICKS

39

40 Repeat steps 31 to 36 to link a helper to each of the remaininwheels.

Rotating the W

Page 27: 3ds Max 2009 Tutorials Car Rigging0

Remember to add a minus (-) operator to the expression of the wheelson the right side of the model so they don’t rotate in the oppositedirection.

41 Save your file as myCar_Rig_04.max.

car moveso establishg wheel.

chooseig_04.max.

tion alongivot of the

h to

Pivoting the Wheels

You now need to make sure the front wheels pivot or “turn” as theleft or right along the animation path. For added realism, you will alsa relationship between the wheel pivot and the turn of the steerin

Set up the lesson:

■ Continue from the previous lesson or go to the File menu and Open. From the \tutorials\animation\rigging\ folder, open Car_R

Rotate the wheels (in World X coordinates):

In the same way you created a point helper to direct the car animaa path, you will also create two more point helpers to control the pfront wheels by the rotation of the steering wheel.

1 In the Top viewport, zoom in on the car and press F3 to switcWireframe mode.

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

24 | Chapter 1 Rigging a Car

Page 28: 3ds Max 2009 Tutorials Car Rigging0

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

e myTools

d rotationtrol over

nterface,rom the

heels | 25

4 With the helper still selected, click the List Con button on thtoolbar you created earlier in the tutorial.

The List Con script automatically assigns the two position anlist controllers you set up earlier, permitting you to retain conthe helper’s local orientation.

NOTE If the myTools toolbar is not currently displayed on your iright-click a gray area on the main toolbar and choose myTools fmenu.

Pivoting the W

Page 29: 3ds Max 2009 Tutorials Car Rigging0

iewport,

Position, on X Axis,

5 F rom the main toolbar, click Align and in the Top vselect the car body.

6 In the Align Selection dialog > Align Position group, turn off XY Position and Z Position. In the Align Orientation group, turnY Axis and Z Axis.

26 | Chapter 1 Rigging a Car

Page 30: 3ds Max 2009 Tutorials Car Rigging0

e

to make a

t to pivot

and click

heels | 27

These settings ensure that the car and the helper have the samorientation.

7 Click Apply, then OK to close the dialog.

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

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

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

10 Click the Align tool then in the top viewport, zoom inWheel_FR.

Pivoting the W

Page 31: 3ds Max 2009 Tutorials Car Rigging0

Position,e Current

Axis.

ol. In the

el.

11 In the Align Selection dialog > Align Position group, turn on XY Position and Z Position and turn on Pivot Point for both thObject and Target Object.

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

13 Click Apply, then OK to exit the dialog.

14 Select Dummy_FL and from the main toolbar click the Align totop viewport click Wheel_FL.

15 Repeat steps 12 to 14 to align the helper to the front left whe

28 | Chapter 1 Rigging a Car

Page 32: 3ds Max 2009 Tutorials Car Rigging0

hips of thelesson.

mmy_CAR

k tool stillnd drag to

heels | 29

Point helpers aligned to front left and right wheels

You will now rework the hierarchy and parent/child relationscar setup to prepare for the body roll you will rig in the next

16 On the main toolbar, click Select and Link.

17 Ctrl + select the two wheel helper objects, then drag to the Duobject.

This parents the helpers to Dummy_CAR.

18 Switch from Top to Bottom view then, with the Select and Linactive, Ctrl + select both rear wheels (Wheel-RL and Wheel-RR) athe Dummy_CAR helper.

Pivoting the W

Page 33: 3ds Max 2009 Tutorials Car Rigging0

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

_FR helper.

ad menu,

YZ > Z

Linking front left wheel to front left wheel helper

20 Select the front right wheel (Wheel-FR) and link it to the Dummy

21 Right-click the Camera_Wall-E viewport label and from the quchoose Views > Camera_Birdseye.

22 On the main toolbar, click the Select tool.

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

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

25 From the menu, choose Transform > Rotation > (2nd) Euler XRotation.

30 | Chapter 1 Rigging a Car

Page 34: 3ds Max 2009 Tutorials Car Rigging0

er, and

oth ways,

ate system

oppositepression.o turn farf a front

ovement

heels | 31

26 Select the Dummy-FL object, which is the front left wheel helpchoose Transform > Rotation > (2nd) Euler XYZ > Z Rotation.

27 On the Parameter Wiring dialog, set the control direction to bsince the manual turning of either object affects the other.

28 Click Connect and leave the Parameter Wiring dialog open.

29 On the main toolbar, click Select And Rotate and set the coordinto local.

30 Rotate the steering wheel on its local Z axis.

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

Pivoting the W

Page 35: 3ds Max 2009 Tutorials Car Rigging0

heel’s

ion”, type:

ned, andtates in Z)

el on its

nt rightnect.

Steering wheel and front wheel turn in opposite directions

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

32 In the left-hand Expressions panel, under “Expression for SWZ_Rotation”, type: -Z_Rotation*8.

33 In the right panel, under “Expression for Dummy_FL’s Z_Rotat-Z_Rotation/8.

The minus (-) operator ensures that the two rotations are aligthe *8 and /8 factors ensure that the front left wheel pivots (roeight times less than the rotation of the steering wheel.

34 Click Update and test your work by rotating the steering whelocal Z axis again.

Note the more realistic behavior.

35 Repeat steps 24 and 34 to wire the steering wheel and the frowheel helper, then on the Wiring Parameters dialog click Con

32 | Chapter 1 Rigging a Car

Page 36: 3ds Max 2009 Tutorials Car Rigging0

Be sure to specify the exact same expressions as you did in steps 33 and34, since the right wheel helper was copied, not mirrored, from the frontleft helper.

36 Close the Parameter Wiring dialogs.

the Time Time

om out

first turn.

ate.

ntil the Z

heels | 33

37 If your timeline is displayed in frames and ticks, click Configuration button and in the Time Configuration dialog >Display group, turn on Frames.

38 Switch to Top view, press F3 to exit Wireframe mode, then zountil the entire animation path is in view.

39 Go to frame 50, the point where the car is in the middle of its

40 Select SWheel and on the main toolbar and click Rot

41 Turn Auto Key on and rotate the steering wheel uaxis status bar reads -280. Press Enter to create akeyframe.

Pivoting the W

Page 37: 3ds Max 2009 Tutorials Car Rigging0

he secondreads 500.

Steering wheel rotation at -280 units in Z space

42 Go to frame 115, the point where the car is in the middle of tturn, and rotate the steering wheel until the Z axis status bar Press Enter.

34 | Chapter 1 Rigging a Car

Page 38: 3ds Max 2009 Tutorials Car Rigging0

until the

orner. This travelling

Roll | 35

Steering wheel rotation at 500 units in Z space

43 Go to the end of the animation and rotate the steering wheelZ axis status bar reads -220. Press Enter.

44 Turn off Auto Key and test your animation.

45 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 cbehavior is not usually apparent in modern day cars unless they are

Setting Car Body

Page 39: 3ds Max 2009 Tutorials Car Rigging0

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

chooseig_05.max.

car along wheel.

Wireframe

coordinate

Set up for this lesson:

■ Continue from the previous lesson or go to the File menu and Open. From the \tutorials\animation\rigging\ folder, open Car_R

Create the body roll effect:

In this lesson, you will create the effect of body roll by rotating theits axis. Roll direction will be based on the rotation of the steering

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 mode on.

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

4 In any viewport, select the steering wheel object.

The local rotation axis for this object is in Z space.

5 Select the car body object.

36 | Chapter 1 Rigging a Car

Page 40: 3ds Max 2009 Tutorials Car Rigging0

The rotation axis for this object (representing body roll motion) is in Xspace.

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

.

Euler XYZ

he right so

so it reads:

l rotation rotation ofes.

era_Wall_S

Roll | 37

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

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

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

10 On the right-hand Expressions panel, complete the expressionZ_Rotation/40, then click Connect.

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

11 Right-click the Camera viewport label and choose Views > Camthen scrub the animation to see the effect of the body roll.

Setting Car Body

Page 41: 3ds Max 2009 Tutorials Car Rigging0

eyes tendeft: when

ake the

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 to follow the direction of the turn. When you turn left, you look lyou turn right, you look right. In this lesson, your final task is to mviewpoint of the driver react to the rotation of the steering wheel.

38 | Chapter 1 Rigging a Car

Page 42: 3ds Max 2009 Tutorials Car Rigging0

chooseig_06.max.

amera to

n off

point | 39

Set up the lesson:

■ Continue from the previous lesson or go to the File menu and Open. From the \tutorials\animation\rigging\ folder, open Car_R

Change the driver’s point of view:

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

1 On the Display panel > Hide By Category rollout, turCameras to re-display the cameras in the scene.

2 In the Front viewport, select the Camera_Driver object.

Adjust Driver View

Page 43: 3ds Max 2009 Tutorials Car Rigging0

earlier in

lists local

nterface,rom the

d on the

displayed

Camera_Driver object

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

3 Click the List Con button on the myTools toolbar you createdthe tutorial.

The List Con script automatically adds position and rotation controllers, permitting you to retain control over the camera’orientation.

NOTE If the myTools toolbar is not currently displayed on your iright-click a gray area on the main toolbar and choose myTools fmenu.

4 With the camera object selected, go to the hierarchy panel anAdjust Pivot rollout, click Affect Pivot Only.

Note that the swivel axis needed for the camera is the Y axis (in green).

40 | Chapter 1 Rigging a Car

Page 44: 3ds Max 2009 Tutorials Car Rigging0

oose Wire

.

on > (2nd)

left to

so it reads:

point | 41

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 chParameters.

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

8 Select the Camera_Driver object and choose Transform > RotatiEuler XYZ > Y Rotation.

9 On the Wiring Parameter dialog, set the control direction fromright so the steering wheel controls the camera rotation.

10 On the right-hand Expressions panel, complete the expressionZ_Rotation/10 and click Connect.

Keep the dialog open for now.

Adjust Driver View

Page 45: 3ds Max 2009 Tutorials Car Rigging0

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

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

the wrong

ont of the.

again.

duct, fromx.

ts of amponentsodel alongt a child

12 Scrub the animation to observe the wiring effect.

As the steering wheel rotates, the camera viewpoint swivels indirection.

13 In the Wiring Parameters dialog, add a negative operator in frexpression, so that it reads: -Z_Rotation/10, then click Update

14 Close the Wiring Parameters dialog and scrub the animation

The rig is now complete. To view a version of the finished prothe \tutorials\animation\rigging folder, open Car_Rig_Final.ma

Summary

In this tutorial,you learned how to assign controllers to componenmodel and use expressions to ensure the controllers animate the cocorrectly. You also learned how to use point helpers to animate a ma path and were shown how to rework the model hierarchy so thaobject can respond to the animation of its parent.

42 | Chapter 1 Rigging a Car