Animating Tank Treads in XSI

Based on excellent and crucial information and tips from Manny Papamanos (XSI Specialist at Softimage), who created a great training video; Alan Jones, who described on the XSI mailing list the method of using a straight curve deformed to the tread path curve; and AndreZX who found the way to get the individual links to stay oriented correctly.

Caveat: I'm relatively new to XSI, and the few details I added to this technique may, or may not, be the ideal way to do things. But what the heck, it seems to work. :)

 


First create a closed curve in the desired shape of the path the treads will follow. Align it with the Z Axis. (Would probably also work aligned with X axis, but the directions which follow are specific to starting out on the Z axis.) Change its name to "TreadPathCurve".

Two additional things you may want to do:
1) Reparameterize you curve. (Modify > Curve > Reparameterize). Using the "Centripetal" option, this will space the UVs evenly, and help keep the individual treads / links also evenly spaced.
2) Create Clusters with Centers (Edit menu, or Alt-RMB menu when points are selected) for some or all of the curve's points. This will give you the means of animating additional deformation of the curve path in order to, for example, add that up and down movement usually present in the slack part of the track along the top, or add the effect of driving over bumps and irregular terrain.




Move the Center of this curve upward to about the geographic center of the shape. This will be important later on when this curve will be used as the Up Vector constraint for each of the tread links. Mind you, I don't know why it works better this way, it just does. :)



In the Right view, create another curve, using "Create > Curve > Draw Linear". Put the first point at the origin, and second point down the Z axis a ways -- guessing at an approximate length to match the TreadPathCurve. You don't need to rename this curve since you'll be deleting it shortly.



With the second curve still selected, choose "Create > Curve > Fit on Curve". Use a large number of points (to keep the treads aligned better with the curve). I have "Linear" selected here, but "Cubic" works just as well. Rename this curve to "StraightCurve", and hit "Freeze M". Then delete the second curve, which was probably named "crvlist".



Now create a single tread "link" or "track". (I renamed mine "Link".) I used a cube, scaled it down quite a bit, and did a couple of "Inset Polygons" to create the "pad" on the base of the link. (It should have some kind of details or shape to distinguish top from bottom, so you can tell whether it is staying oriented correctly later on when it's animated.)

With the Link selected, choose "Edit" menu > "Duplcate/Instantiate" > "Duplicate Multiple". I made 39 duplicates for a total of 40. You may need to use more or less depending on the size of the curve and links, or maybe to match a particular tracked vehicle.

With all 40 Links selected, from the Constrain menu in the MCP panel choose "Curve (Path)", and select the StraightCurve.



In the "Path %age" (Path Percentage) field, enter L(0, X), where X = (N / N+1) * 100. (N being the number or links, or treads, you have). With 40 links, it's (40 / 41)*100 = 97.5609. This distributes all the links along the curve, but leaves a gap at the end for the first link, so that you don't have the first and last links overlapping.



Under the Tangency tab, turn on "Active" and set the "Axis to Align" to Z.

In the "Up Vector" tab, hit the "Optional Up Vector Control Object" button "Pick New", and select the TreadPathCurve.
Unlike the various other settings in the "Up Vector" panel, this step will keep each link oriented correctly. You'd think that "Point along Path Roll Frame Normal" would do the trick, but as far as I've been able to determine, it doesn't. (Turning the "tank" causes some of the links to start rotating out of alignment. Which may be either a bug, or perhaps it's just not the way it's supposed to work. Beats me.)

Now here's the fun part:

Select the StraightCurve, and choose "Deform > Deform by Curve". Pick the TreadPathCurve. In the Curve Deform properties, set the Axis to "Z Axis", and under the Constraint tab, turn on "Constrain to Deformer." This should get the curves and all the treads lined up correctly.

To animate the tank tread, use the "Translation along... Curve" control of the Curve Deform.

Note #1: You may need to scale the StraightCurve length some to fit the TreadPathCurve exactly. Use the "Curve Deform" > "Scaling Along.. Curve" control. I had to use a value of 0.997.

Note #2: If your individual links overlap, you can just select them all and scale them to allow a bit of space between them.

Note #3: I have not addressed how to automate the tank treads... I've done this in other applications, and it's not too difficult, but I have a slight ways to go yet to figure out the details of writing a SCOP to handle it correctly. I may put together another page describing this if it turns out ok.

Well, that's it. :)

 

-James Jones (7/16/07)