Tutorial

Setting Up IK



Your Ad Here

Before you can operate the assembly with inverse kinematics, you must set up the rotational limits for each part of the assembly. These limits will cause the parts to rotate only along specific axes, and only by a specific number of degrees.

Joint constraints are set axis-by-axis, based on the an object’s parent coordinate system. The parent coordinate system is the local coordinate system of the parent object to which the current object is linked. To figure out the axes about which the Head and Yoke should rotate, you will use the Parent coordinate system.

Determine rotation axis for Head object:

You can continue with the file from the previous lesson, or open the file tut_luminaire_prepare_link.max from the tutorials\mech_design folder.

  1. On the main toolbar, click Select And Rotate.

  2. From the Reference Coordinate System drop-down menu, choose Parent.

  3. Select the Head object.

  4. In the Perspective viewport, rotate the Head along each axis. Be sure to undo the rotation after each motion. As you rotate, watch the display to see which axis is affected by the rotation.

    From this experiment, you can see that you want the Head to rotate around its parent’s local X axis about the sides and top of the assembly, but not the bottom.

Set joint constraints for Head object:

Now that you know the axis around which you want the Head object to rotate, you can set its rotation limits.

  1. Make sure the Head object is still selected.

  2. In the Hierarchy panel, click IK.

    By default in the Rotational Joints rollout, the Active option is turned on for all axes, allowing the object to rotate around any axis.

  3. In the Rotational Joints rollout > Y Axis and Z Axis groups, turn off Active.

    Turning off Active for these axes will prevent the Head object from rotating around these axes.

  4. In the Rotational Joints rollout > X Axis group, leave Active turned on, and turn on Limited.

    Next, you will set rotational limits interactively in viewports.

  5. Drag the From spinner downward, and watch the Head object in viewports.

    The Head object rotates in viewports to show the beginning of the range.

  6. When the Head object is rotated about -90 degrees off its original orientation, release the mouse.

    The Head object snaps back to its original orientation, and the lower limit of the range (the From value) is set to the rotational value you just set interactively with the spinners.

  7. Drag the To spinner upward until the Head object is rotated by about 90 degrees (in the opposite direction), and release the mouse.

    When you use IK later on, these settings will cause the Head object to rotate only about its parent’s X axis over the set range.

    You have just seen how you can set rotational limits interactively in viewports. You can also set limits by typing values directly into the From and To entry fields.

Set joint constraints for Yoke and Bracket objects:

  1. Rotate the Yoke object on each of its axes, and undo the rotation after each movement.

    Here, you can see that the yoke should rotate on its local Z axis without any limitations.

  2. In the Hierarchy panel > IK > Rotational Joints rollout, turn off Active in the X Axis and Y Axis groups.

    This will allow the yoke to rotate freely around the Z axis only.

    Now you must indicate that the bracket is the terminator of the chain. This will hold the bracket still while the rest of the assembly responds to the animation.

  3. Select the Bracket object.

  4. In the Hierarchy panel > IK > Object Parameters rollout, turn on Terminator.

Assign a HD solver:

The HD (history-dependent) solver will allow you to point the light housing in different directions by moving the light's target.

  1. Select the light target.

  2. Choose Animation menu > IK Solvers > HD Solver, and move the cursor to stretch the rubber band to the Yoke. Click the Yoke.

    Yellow lines appear in viewports indicating that the IK chain was created correctly. In addition, the Motion panel appears automatically.

  3. To test the IK setup, move the light target. The light swivels and turns to point in the direction indicated by the light target.

    The light setup is working correctly. Let's see what happens when you try to move the entire light setup to place it in a different part of the scene.

  4. Move the Bracket.

    The light and its housing move, but the target does not. To make the target move with the entire light setup, you will need to link it to the Bracket through the IK settings.

  5. Select the light target.

  6. In the Motion panel > IK Controller Parameters rollout, in the End Effectors group, click Link, then click the Bracket.

  7. Move the Bracket.

    Now the entire light moves together.

  8. Save the scene as my_luminaire_prepare.max.

    You can find a finished version of this scene in the file tut_luminaire_prepare_finish.max.

Next

Setting Up Sliding Joints


Comments

Return to Autodesk Index

Your Ad Here