Keep up-to-date with Free tutorials!!


Sign up to our twice-monthly newsletter today for the latest tutorials, interviews and product information.

Sign me up to receive third-party emails from 3dtotal's partners, too!

- Latest news
- Exclusive Shop Offers
- Preview early content
- Plus much more


Not Ready to take that step? OK, Why not just Subscribe to the RSS Feed

submit tutorial
1 | 2 | 3 | 4 | 5 | 6 | 7
Tank Rig Tutorial

| Your Rating:
rating star fullrating star fullrating star fullrating star fullrating star full
(Score 4.77 out of 5 after 13 Votes)
| Comments 2
Date Added: 9th December 2009
Software used:

The Spinning Expresion

We'll need a mathematical expression in the wheel's x-rotation controller. In this expression we need to find the x-rotation value regards the distance travelled by the tank. I could give you the expression and you could use it without knowing how it was made, but I wouldn't be a good teacher if I make it so easy!

Seriously speaking, its better that you start understanding how to make expressions for future rigs challenges. So, here we go, a small and very easy mathematical lesson:

How can we find the wheel's x-rotation? Think about the distance that a circumference needs to travel to make a full turn. This distance is equal to its perimeter (2*pi*radius).

To find the numbers of turns along a distance, we could take this distance and divide it by the distance travelled by one turn (as mentioned before, one turn is equal to the perimeter). For example, if we have a distance of three times the wheel's perimeter, dividing the first value over the perimeter will give us a number of 3 turns.

And what do we do next with the turn's number? We could multiply it by its equivalent in degrees, 360º or 2*pi in radians, and we got our expression!

This expression goes as follows:
(Distance / (2*pi*Radius)) * 2*pi

Actually, we may cancel the (2*pi) values by themselves. 2*pi / 2*pi is equal one (1), so we can remove these numbers, they're irrelevant now.

We got: Distance / Radius.

And what about the distance? How can we find it? We could do it using the percent along path of the path constraint, and the path's length. One value by the other will give us what we wanted: Distance= (Percent/100)*SplineLength, we divide Percent by 100 because here we need a percent that goes from 0 to 1. When the percent is 0% the distance is 0, when the percent is 100% the distance is equal the Spline's Length. 50% will give us a half of the spline's length, and so...

Finally the expression goes as follows: (Percent/100)*SplineLength / Radius

Now, we're going to put this expression in the wheel's x-rotation controller, we'll be using the script controller.

Select the wheel, in the Motion Panel open the Assign Controller rollout, select the Rotation: Euler XYZ Controller and click in the assign controller button, select Rotation List. With a list of rotations we may have 2 controller layers, one for the script and the other one for manual adjustments. Open the rotation List, in the Available controller assign an Euler XYZ controller, this controller is for manual adjustment, so we need to set it to active by double clicking it in the Rotation List rollout, or by clicking the "Set Active Button". When a controller is active this one will be the one that we'll be modifying by the rotation gizmo (manual adjustment).

Go back to the first Euler XYZ controller in the Assign Controller Rollout, open it, and in the x-rotation controller assign a float script controller

In the Expression Text Box write: SplineLength=curveLength Path, this line enables us to get the path's length using the curvelength maxscript function (it doesn't work well if the path spline is scaled). In the next line write the expression, (Percent/100)*SplineLength / Radius.

Then, we have to create the variables, and assign them their respective values.

In the Create Variable Group you have to write the names of the variables exactly as they're written in the Expression text box. Start writing the Path, then click on the Create Button, do the same with the Percent and radius.

We do not need to create the SplineLength variable because it going to get its value inside the script.


If we evaluate the expression now, we're going to get nothing, because we need to assign the variables to their respective values.

- Select Path in the Variables List and click in the Assign Node button, select the "Path" spline object in the "Track view Pick" DialogBox.

- Select Percent in the Variables List and click in the Assign Track button, select the control_Main's path constraint percent controller.

- Select radius in the Variables List and click in the Assign Constant button, write 0.473 (you can find it using the tape helper object measuring the wheel's diameter and then dividing by two).

You could assign the wheel's radius parameter to the radius variable if you need to change the wheels radius in the future.

If you evaluate now, we get our auto spinning system! You can check it out by moving the control_main object.


< previous page continued on next page >

1 | 2 | 3 | 4 | 5 | 6 | 7
Related Tutorials

Making Of 'Colossus'

by Andre Holzmeister
published on 2009-12-09

Keywords: character, creature, colossus, max,

rating star fullrating star fullrating star fullrating star nonerating star none (2)
Comments 1 Views 45593

Making Of 'Alfa Romeo 2600 Sprint'

by Aleix Serra
published on 2013-03-13

Keywords: vehicle, car, alfa romeo,

rating star fullrating star fullrating star fullrating star fullrating star full (17)
Comments 0 Views 154859

Hard surfaces in Softimage

by Paul H. Paulino
published on 2014-12-09

Keywords: Softimage, Maya, vehicle, sci-fi

rating star fullrating star fullrating star fullrating star fullrating star full (53)
Comments 1 Views 53239

Modeling and Texturing a Classic Fiat 500

by Filippo Veniero
published on 2013-07-29

Keywords: vehicle, car, fiat, 500,

rating star fullrating star fullrating star fullrating star fullrating star half (15)
Comments 2 Views 109118
Readers Comments (Newest on Top)
Strob on Tue, 29 November 2016 7:48pm
Hi, nice tut! Can you tell us how would be the best way to scale that entire rig?
John Nulty on Sat, 30 April 2016 3:15pm
Great Tutorial, just some parts i am struggling with. Would you please do a video tutorial for the tank rigg? Thanks
Add Your Comment..