3D Nuts! Tutorials - Rigging Robotic Joints in 3D Studio MAX
 



Like most tasks in 3D Studio Max and similar products, rigging robots is easy, if you know how. Depending on the complexity of the robot, some may find it even easier than rigging a human or animal character. This is because most parts of a robot do not deform during movement, with the exception of cabling and other flexible parts, so you don’t have to ‘skin’ it. One of the primary challenges in building a cool robot, which still looks cool when animated, is creating realistic mechanical joints. Although you may prefer a simpler look for your robot, during this tutorial we will assume you want to aim for realism.

The first version of our example robotic leg below is not very realistic however, because it would collapse like a bone structure without muscles. In the second version, we will add some robotic ‘muscles’, and the third version will include a hose. Click on the download links below some of the pictures to download the corresponding scene.


 
 
 
1. The Human Leg
 

When rigging a human leg, the mesh deforms when the knee bends, pushing vertexes away from each other on one side and towards each other on the opposite side. This is accomplished by using a Skin modifier that binds vertexes of the mesh to the bones. The colors of the vertexes indicate the weight values which dictate how much influence moving the joint will have on those vertexes. Red vertexes represent the most rigid parts.


 
 
 
2. Our Example Robot Leg
 
 

Robots however, are typically made of metal, plastic, or some other hard and rigid material that does not deform. Picture 2a shows the five objects that form the basis of our example leg.


Picture 2a.                                                                                       Picture 2b.


 
 
 
3. Rigging our Example Robot Leg
 

As usual, I have to make a note that the following is just a way of doing this, which doesn’t necessarily means it is the way (we’ll actually show another way later on). Picture 3a below shows the (unsmoothed) wireframe of the objects that make up this leg. Click the link below it to download the scene, or download the scene including the bones by clicking the link below Picture 3h, or just watch the pictures if you do not feel like actually doing any of this right now.


Picture 3a. Download scene here.

The red dots in the picture above represent the pivot of the object. In the scene you can download, I have already moved them to the correct position. The UpperLeg’s pivot is positioned at exactly the same position as the pivot of Cylinder01, and LowerLeg’s pivot is at the same position as the pivot of Cylinder02. When switching to the top view, they are all aligned. It is essential that the bones you add start or end exactly at those pivot points.

A way of making sure the bones are positioned correctly is to snap to pivots. When you use this method it is also essential that all the pivots are aligned when viewing from the top. If in your robot they aren’t and it is too complex or difficult to align them, you can skip the following snap settings and just draw the bones, select them all and move them to the center of the leg (Top view). To use the snap setting, right-click the Snaps Toggle button on the main toolbar and select Pivot and clear others if necessary (see Picture 3b). Now click the Snaps Toggle button again (with the left mouse button) to enable it.


Picture 3b.

Click the Bones button in the Systems section on the Create tab of the Command Panel as displayed in Picture 3c below. Choose SplineIKSolver as the IK Solver and enable Assign to Children (you can use another IK Solver or none at all, if you prefer).


Picture 3c.

Now draw the bones, by clicking on the spots 1, 2, and 3 shown in Picture 3d and then right-click anywhere in the viewport to stop. Spots 1, 2 and 3 are the pivot points of Cylinder01, Cylinder02, and Cylinder03.


Picture 3d.

When the Spline IK Solver dialog shown in Picture 3e below opens, just click OK.


Picture 3e.

Now before you link the bones to the leg, you should make sure that the pivots of the bones are positioned correctly on the pivot of the limbs, the Spline IK Solver we added moved them slightly. To move a bone's pivot, click the Affect Pivot Only button on the Hierarchy tab of the Command Panel, and disable the Enabled button on the Motion tab of the Command Panel.


Picture 3f.

Then select the pivot of the bone and move it to the correct position. Make sure you zoom in and place it exactly in the center of the limbs' pivots. You also might want to disable the snap to pivot setting first by clicking the Snaps Toggle button again. If for some reason you cannot get them in the right position, there is no need to continue, as the whole setup depends on the pivots’ position.

When you are sure the pivots are positioned correctly, select Cylinder01 and link it to UpperLeg. Select Cylinder02 and link it to the LowerLeg, and select Cylinder03 to LowerLeg as well. To link one object to another click the Select and Link button on the main tool bar, select the object you want to link and drag to the object you want to link to. If you do it correctly, the object you link to, will flash white once.

We will use the same select and link method to link the objects to the bones, instead of using a Skin modifier. Link UpperLeg to the upper bone, and link LowerLeg to the lower bone.


Picture 3g.

When you done all of the above, or download the scene including the bones by using the link below, select the IK Chain or any of the point helpers and move it. The knee joint should now operate as shown in Picture 3g, without any of the objects deforming during movement.


Picture 3h. Download scene here.


 
 
 
4. Another Approach (no bones)
 

Before we continue with this leg and add some muscles, we will use another method of rigging this leg. As someone kindly pointed out to me, there is no absolute need to use bones . If you are new to rigging characters or robots in particular, you may want to go for the bones method discussed above, but a robot is often a skeleton by itself, eliminating the need for bones. 3D Studio Max allows any object to act like a bone, and allows you also to assign IK solvers to any hierarchical set of objects. Also in this type of ‘bone’ setup, it is absolutely imperative that the pivots of the objects are in the correct position. We will illustrate this with some pictures later.

To make this work with the previous example (delete the previous bone structure or use the scene you downloaded earlier), and link the objects to each other as followed:

Cylinder03 --> LowerLeg
LowerLeg --> Cylinder02
Cylinder02 --> UpperLeg
UpperLeg --> Cylinder01

Press the Schematic View (Open) button on the main toolbar to check if the hierarchy is now correct as displayed in Picture 4a.


Picture 4a.

Now all you need to do is add an IK Solver to this hierarchy to make it act like a robotic leg. You can use the IK Solver you prefer, but in this example, we are going to use the History Independent solver. Select Cylinder03, choose HI Solver from the IK Solvers section in the Animation menu, and select Cylinder01. To prevent you from linking the solver to UpperLeg instead of Cylinder01, use the Select by Name option, which basically means you should press the H key on your keyboard after you choose HI Solver from the menu, and then pick Cylinder01 from the list, instead of clicking on it in the viewport.

If you performed the previous tasks correctly, the results should be like in Picture 4b with the IK Chain selected. If you move the IK Chain the leg should work. To make the task of animating this leg a bit more convenient, you should link the IK Chain to a Point Helper. A Point helper can be created by clicking the Point button in the Helpers section of the Create tab on the Command Panel, and clicking somewhere in the viewport, as depicted in Picture 4b below. In this case, I suggest you place it somewhere at the bottom of the leg. Use the same Select and Link method as discussed earlier to link the IK Chain to the Point helper, so you can animate the leg by moving the Point helper.


Picture 4b.

If your robot has a complex geometry and animating the individual objects slows down your computer too much, you can configure 3D Studio Max to display the objects as bones. When using our example leg from the previous steps, you should select Cylinder01, 02, 03, UpperLeg, and LowerLeg, and select Bone Tools from the Character menu. Enable the Bone On option on the Bone Tools dialog as shown below.


Picture 4c.

Next, open the Display tab on the Command Panel, scroll down, and in the Link Display section enable the Display Links option and the Link Replaces Object option.


Picture 4d.

The results should be as depicted in Picture 4e below.


Picture 4e.

Alternatively, you can enable only the Display Links option and right above the Link Display section enable the Display as Box option in the Display Properties section. The results should be as depicted in Picture 4f below.


Picture 4f. Download the scene here.


Continue with the second half of this tutorial on the following page that covers mechanical muscles and includes a detailed example of a piston with hose:

Next Page >>>

 
Sponsor Ad
 

 
 
 
 
 
 




Visit our Link Directory for a more complete listing of 3D Studio MAX related sites.


 
 
 
 
| Home | Copyright 2004-2008 | Link to us |