My technical piece was to create a control rig for one of the main "characters" in the movie, the demolition tank. This was divided into several pieces, as Maya decided to present a variety of challenges in each area.

Tread Units

The treads were created by doing an animated snapshot of a single tread piece along a tread curve. This generated twenty tread pieces per tread that then needed to be animated.

The treads were driven by an expression that synchronized their movement to the tank's velocity. Their animation was always along the motion path that was created from the tread curve. This meant that the animator could just set or animate the tank's velocity, and the treads would match up with the ground. Here is the expression, in pseudo-code, that animates the treads and wheels:

for each tread motion path, do:
motionPath.uValue = ((time * Body.Velocity * Body.TreadVelocityConstant) % 1000) / 1000.0;

for each wheel, do:
Wheel.rotateX = time * Body.Velocity;
	    

If I had more time, I would have added another feature that I feel would have been useful: tread slip. This way, an animator could "dial in" some tread slip when the tank is trying to get traction from a stand-still, or trying to slow down.

Suspension

My goal was for the tank to drive along an arbitrary surface of some sort and have its body react properly to the influence of its suspension. I first tried to do this by connecting the tread units to the body's hubs with springs, then connecting the hubs to the body with pin constraints. This worked well for certain things, but I encountered loads of instability problems. The tank's body would go flying out into space, or it would oscillate and never really look "right".

The main problem is that this tank would never have been designed in the real world; it is purely for the imagination. If it were to actually exist, some serious modifications would have to be made to make a suspension system feasible.

After a while, I decided to try putting a different kind of suspension system on the tank -- namely, an impossible one:

The highest cubes are parented to the tread units, which means they translate and rotate along with them. Then, the next set of four cubes (the ones connected directly to the body) are suspended from the first set, both to their nearest neighbors and to their farthest neighbors (for more stability). This second set of cubes is then pinned to the body, which has the entire main body of the tank as a child.

In general, this system works alright for very simple terrain. However, hilly terrain of any kind (read: interesting terrain) breaks the system almost immediately because the actual suspension system does not correspond to the visual suspension system. Take a look at the following image, where the rear tread unit has been rotated:

This causes the rear suspension cubes to unrealistically pull the body up and back, whereas the logical thing (based on the suspension system as modeled) would be for the tank to perhaps settle back a little. There are some things I was able to do to compensate for this problem (e.g., make it so that the suspension cubes are always directly above the tread units), but there are other issues that together make this problem a pointless one. In short, if I were to do this again, I would not use this approach, but would go back to rigging the suspension as it is modeled and applying some extra measures to keep stability in check.

A few tank parameters were tweakable:

"Ahead" was used to specify how far ahead of "center" the main body should be (this could be animated to show a collision impact or simply an attitude change).

"Height Delta" was used to specify how high the tank's stance should be.

"Velocity" is self-explanatory: it was used to drive the tank forward, and also to synchronize the tread and wheel animations with the tank's movement.


Matthew Anderson
Last modified: Thu May 30 18:45:14 CDT 2002