Free 3d tutorials: from 3d tips & tricks to advanced 3D software tutorials in 4 seconds.

Tank rig tutorial

There are some methods to deform a spline using nodes, like the Spline IK Control modifier. But i didn’t use it in this rig because in some tank’s orientations the vertices didn’t behave well, also, it has problems when you clone it. So, finally i decided to use the skin modifier. this modifier will affect the spline’s vertices as it does with mesh vertices, it’s not expensive for the pc (the spline has a very few vertices) and it doesn’t have problems like the Spline IK Control does.

Add the skin modifier to the spline, and then, add all the Helper_CaterpillarPoints as bones. Modify the weight for each vertex and its tangents points in respect to their respective Helper, until you get the desired result.

Now, link The bottom helper_CaterpillarPoints to their respective Helper_Attached points, doing this the spline will be attached to the ProjectedPlane too. Link the rest of the CaterpillarPoints to the Frame, and link the Frame to the ProjectedPlane (Do not forget do this).

To make the helpers follow the wheel’s position, we’ll need a position constraint. Select the wheel_01 caterpillar helper add a position constraint to it selecting the wheel as target. We cannot use the “Keep Initial offset” option because it defines positions not relative to the tank, therefore in some tank’s orientations this helper will have a wrong position. To place it where it was before assign a Position XYZ controller in the available controller of the position list and make it active in the position list Rollout, you can delete the first Poistion XYZ controller, it’s useless now. Then place the helper where it was before (you can do it aligning it to the Helper_Attached object).

Do the same process with the rest of the wheels. The upper caterpillar helpers need to be constrained to the small wheels.

CATERPILLAR PIECES

The pieces will slide using a path constraint over the spline that we have created, then we’ll add a script controller in its percent along path controller to define its slidding in respect to the distance traveled by the tank.

Unhide by name the Caterpillar_Piece_01, link to the Frame and add a path constraint to it using the CaterpillarSpline as target. In the motion panel in the path parameters rollout set the parameters as shown in the picture. The Allow Upside Down option will enable the piece to have the right orientation through the spline without any flipping.

Then rotate the piece -90 degrees over its local x-axis and then -90 degrees over its local z-axis.

Now, we’ll add the script to the percent controller. In the motion panel -> Assign controller rollout (you can also do it in the track view) assign a float list controller in the percent controller, in the list’s available controller assign a Bezier float controller, and in the First controller (Linear Float) assign a Float Script. We created a list of controllers to define an extra value with the second controller, so, in this way, we can define an offset to each caterpillar’s piece having the same script controller for all of them.

The script is almost the same than the wheel’s spinning. But in this time we’re not using a radius, instead, we’ll be using the Caterpillar length. Start writting the first line of the previous script:

SplineLength=curvelength Path

Then add the next line after the first one:

CatLength=curvelength Caterpillar

In the last line replace radius by CatLength and place a minus at the beginning of this line:

-(Percent/100)*SplineLength/CatLength

And don’t forget to create the variables and assigning their respective nodes or tracks. In the Caterpillar variable we need to assign the CaterpillarSpline as node.

In this case we’re finding the number of the piece’s turns along the caterpillar dividing the distance by the caterpillarLength (the perimeter).
This is what the controller handles, a value from 0 to 1, 1 as 100%, in this case as 1 turn along the spline.

Pages: 1 2 3 4 5 6 7 8 9 10 11 12

5 comments

  1. Thank you ever so for you blog post.Thanks Again. Really Great!!!

  2. Can anyone download the file “video_tank.mov” ? I can’t download it.

  3. what a rubbish is this…….
    where is its start………….

  4. hi, please try again. i just tried to download the file and it worked.

  5. Lathander /

    would you re-upload the file: tank_rig_start.rar.

    It seems as its not longer online.

Leave a Reply