Setting Restrictions on Movement

When you create a skeleton with many chains, you may find that each chain doesn’t always move the way you would like it to when you invoke IK. Another problem is that, unlike real limbs, chains don’t have that many restrictions in their ability to move. This can cause problems, such as a leg bending in an alarmingly unnatural manner! The way to solve these problems is to set “rules” that determine how much each joint should rotate.

Here are the ways you can constrain joints and effectors to limit their movements:

• Limit the movements of joints by setting Rotation Limits and Stiffness — see Setting Rotation Limits below and Setting Joint Stiffness.

• Constrain the chain’s orientation using the up-vector and/or preferred axis constraints — see Constraining the Chain’s Up Vector (Direction).

Using rotation limits or stiffness on 3D chains may cause the chain to jitter. To help solve this problem, try lowering the error threshold for the 3D chain’s solver — see Setting the Solver’s Error Threshold.

Displaying Rotation Limits and Stiffness

To display rotation limits and stiffness

1. Click the eye icon in a viewport and choose Visibility Options from the viewport menu bar.

2. In the property editor, click the Attributes tab and select Chain Joint Rotation Limits from the Selected Objects or Unselected Objects area.

A

The stiffness is indicated by filling in the joint. The degree to which the joint is filled in represents the degree of stiffness. In this image, the stiffness is at 0.75.

B

A joint’s rotation limits are indicated by a circle with two lines. The space opened between the lines indicates the range of motion for the joint.

If the joint is 2D, the circle is red. If the joint is 3D, there are three circles in red, green, and blue for the X, Y, and Z axes, respectively.

The lines move interactively as you change the rotation limits in the Kinematic Joint property editor.

Setting Rotation Limits

The Skeleton > Rotation Limits commands restrict the range of rotation of one or more chain elements. For example, setting rotation limits could prevent a head from rotating 180 degrees (unless, of course, this is the desired effect!).

Local coordinates are always used for the restriction unless the element is not parented, in which case global coordinates are used.

A

Rotation limits: The bone can only rotate about its Z axis and not beyond the surface of the blocks.

B

Settings: Set minimum (clockwise direction) and maximum (counterclockwise) allowable values for Z-axis rotation. Restrict rotations in X and Y. In this image, the minimum value is –138 and the maximum is 42.

Regardless of the rotation limits settings, IK will continue to prevent joints from bending backward against their preferred angles. However, if both the rotation limits are on the opposite end of the joint’s preferred angle, the preferred angle (and the joint) will flip.

To apply rotation limits interactively

1. Select the joint to be restricted. It’s usually best to start with the first joint in the chain. Because each bone is parented to the next bone in the chain, you need to consider all three axes and see how changes affect the subsequent joints.

2. Click the Rotate icon in the Transform panel.

If you are working with a 2D chain, remember that the rotation axis for a 2D joint is Z. Rotating only in the Z axis keeps the joint properly in the resolution plane.

3. Rotate the joint to its minimum position, which is the farthest clockwise point (assuming the Z axis points toward you) at which you want it to stop.

4. Choose Create > Skeleton > Set Minimum Rotation Limit from the Animate toolbar.

5. Rotate the joint to its maximum position, which is the farthest counterclockwise point at which you want it to stop.

6. Choose Create > Skeleton > Set Maximum Rotation Limit from the Animate toolbar.

Repeat these steps for the next joint, if necessary.

If you’re using FK chains, you can also set the rotation limits on the chain’s Local Transform > Rotation Limits property page. If you set the rotation limits there as well as with the Skeleton commands here, the most extreme limit values are used. The rotation limit settings on the Local Transform page have no effect on IK chains.

To apply rotation limits from the Kinematic Joint property editor

When you add rotation limits to a chain, its joint angles are not recalculated automatically. To update the chain, you must move the effector.

1. Select the joint to be restricted. It’s usually best to start with the first joint in the chain. Because each bone is parented to the next bone in the chain, you need to consider all three axes and see how changes affect the subsequent joints.

2. Open the Kinematic Joint property editor for the selected bone and click the Rotation Limits tab.

3. Click the Rotate icon in the Transform panel.

If you are working with a 2D chain, remember that the rotation axis for a 2D joint is Z. Rotating only in the Z axis keeps the joint properly in the resolution plane.

4. Rotate the joint to its minimum position, which is the farthest clockwise point (assuming the Z axis points toward you) at which you want it to stop.

5. On the Rotation Limits property page, set the Minimum Angles for the appropriate axes.

6. Rotate the joint to its maximum position, which is the farthest counterclockwise point at which you want it to stop.

7. In the Rotation Limits property page, set the Maximum Angles for the appropriate axes.

8. Check Active to activate the rotation limits for the joint.

The restricted object never rotates beyond the minimum and maximum values set in the Kinematic Joint property editor.

It’s best to activate the rotation limits after setting the values because the preferred angles might be changed by the settings if they were “violating” the limits.

Setting Joint Stiffness

Another way to restrict a joint’s range of motion is to set its stiffness. A joint’s stiffness is a measure of its resistance to bending while using IK. While you may not want to give your character arthritis, a little stiffness in the joints can be a useful thing.

The chain at the top is the original chain. To show how stiffness affects joint behavior, the stiffness of the fourth bone has been set to three different levels, and the effector translated to the same spot.

A

On chain A, the stiffness is 0 and the joints bend evenly, like an accordion.

B, C

On chains B and C, the stiffness is 0.25 and 0.5 respectively and the other joints bend more than the fourth.

D

On chain D, the stiffness is 1 and the fourth joint is at the same angle as in the original chain.

To apply stiffness to a joint

1. Select the bone whose joint is to be restricted and open its Kinematic Joint property editor.

2. In the Joint Behavior area, select the Use Stiffness option to activate the stiffness for the joint.

3. Set the Stiffness value. This value must be from 0 to 1, inclusively. The higher the value, the stiffer the joint.

When you add stiffness to a chain, its joint angles are not recalculated automatically. To update the chain, move the effector.



Autodesk Softimage 2011 Subscription Advantage Pack