ROLLING A BALL ALONG A PATH
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’ll 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.
Next enter the expression :
6. Experiment !