| 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.
|