Tuesday 18th May 1999

3D Studio Max,

This is a very simple tutorial describing how to animate a ball or a wheel rolling down an irregular path. It was devised by my in answer to a need for a car which could drive around corners but still have the wheels rotate accordingly. I assume you know a fair amount about MAX and won’t bother explaining every little detail.

1. Create a sphere, and add a checked diffuse map to it.
Make sure the map is displayed in the view port (click on the little rubix cube like icon in the material’s editor).

2. Convert the radius to a linear float controller.


Open the track view window (see above), find the controller for the sphere’s radius and assign a linear float controller to it. This enables us to access this number in our expression later on.

3. Create a path.


In the top view draw a simple S-curve (as above). Now go to the tools tab and select”measure” from the utilities panel, select the path and you’ll notice it gives you the length in units of the spline. Make a note of this number as you’l need it later.

4. Set the sphere to follow the path.
In the motion tab assign the sphere to follow the path you’ve created. Make sure you select “follow” so that the sphere orientates itself to the path.

5. Create an expression.

Just as you did for radius controller in step 2, assign a Eular controller to the rotation controller of your sphere.

Go back to the track view and assign an expression controller to the Y rotation of the sphere. In the expression window you’ll need to create three variables as outlined below :

Travelled – controller – assigned to the path. percent controller within the sphere position controller.
Radius – controller – assigned to sphere linear float radius.
Length – constant – type in the length of your path.

Next enter the expression :
((travelled * length) / radius)

6. Experiment !
Now click play and your sphere should roll along the path. You can experiment with pulling the path controller curve around, making the ball roll back on itself or rest at any point.

Remember if you change the spline around you’ll have to re enter the length to the length controller.
If anyone knows a way of dynamically reading out the length of the spline I’d be very interested to know.