Tank Rig Tutorial
< 1 2 3 4 5 6 >
The Ground Projection System
How are we going to project our tank to the ground?, there are several methods, some more complex than other, but the one that i'm going to explain right now is one of the most intuitive. The main Idea is to project our wheels' position using a mesh projection, we can do that using the "Conform" tool. If we have a mesh with one vertex for each wheel, we can project the mesh using this conform, and constraint the wheels' position to these projected vertices. We'll be using the conform Geometric/deformable space warp.
First, we are gonna clone the wheels, this is for helping us to define where the mesh's vertices are going to be. Then we'll work only with one wheel.
Select the frame and the Wheel (the big one) and hide unselected. Copy the wheel in the same place (ctrl+V) select copy in the dialogBox and press OK, then without unselect this copy, place it to the oposite side of the frame shifting its x-position from negative to positive value (this is to make sure its position is exactly oposite). Then, Select these both wheels and drag-copy them to the lower side of the screen, calculate a short distance from the first wheels, having in mind we're going to have 5 wheels each side along the frame. In the Clone Options Dialog select 4 in the Number of copies spinner. |
Now let's create a 4 length segs by 1 width seg plane. Before draw it into the viewport, configure the snap tool to snap to pivots. Right click over the Snaps Toggle button, in the Grid and Snap Settings Dialog check Pivot. Now, Hide the frame and from the top view create the plane snapping from the top-left wheel to the bottom-right wheel. Name this plane as ProjectedPlane.
Set zero the plane's z-position, the plane now is in the bottom of the wheels. Also add a shell modifier to it with zero in the Inner and Outer Ammount. without this modifier the projection isn't going to work, because the conform space warp doesn't conform open meshes. After this, we're gonna work over the first wheel, delete the rest of them. It seems like a waste of time make the copies and then delete them. But, they were useful to define from now the wheels' position and enabled us to create the projected mesh without having any future troubles with its vertices position. |
Create a point helper with size of 0.3 and the display form that you like, i choose box.
Snap it to the first plane's vertex (the vertex where the first wheel is going to be constrained), as we did before snaping to pivots we can do the same snaping to vertices, Name this helper as "Helper_Attached_01", this point will help us to constraint the wheels to the plane's vertices. It'll be attached to the plane's vertex using an attachment constraint, this controller attach nodes to mesh faces, but we can use it as a vertex attachment constraint just defining the point's position over the face. Rotate the wheel's pivot (with Affect Pivot Only, Hierarchy Panel) 90 degrees over its local y-axis. This is to make sure that our wheel's rotation will work fine setting its spinning over the x-axis which is the first one in the Axis order. Then, Link the Wheel to the Helper_Attached_01 (Helper_Attached_01 as parent). |
Select the Helper_Attached_01 and Add a Attachment constraint to it, select the plane as target. The point now is in other position, we have to configure its attachment constraint. In the motion pannel under the Attachment Properties Rollout set the next parameters: Face=7, A=1, B=0. the face is where the point we'll be attached and A and B are the barycentric coordinates, useful to place the point just over its respective vertex. Make sure the "Align To Surface" property is checked.
If the wheel has a wrong orientation you have to rotate the helper to fix it, just make sure the wheel has the orientation that it had before. If the Face, A and B values doesn't work for you, you could change them until you get the right point's position. |
Finally we're going to create the conform space warp and project the plane. Create panel -> Space warps -> Geometric/Deformable -> Conform. Draw it from the top view with any size you like, it must be pointing downward. Unhide by name the Ground. In the modify panel choose the Ground as Warp to Object and set zero the Standoff Distance (This parameter defines an offset position from the Mesh)
Bind the projected plane to this space warp with the Bind to Space warp tool. And this is it for now!, our first part of the rig is finished, now we have a modifier over the ProjectedPlane projecting it over the ground's surface. If we move our projected plane we can see how it adapts itself in real time. |