IK

An IK Behavior (beIK) makes an Entity reach a given target position with a given body limb.

IK Behavior in the Behavior Editor

Creation

  • Behavior Editor / Behavior Library: 
  • Golaem Menu: Crowd Behaviors / Behaviors / CrowdBeIK Node
  • MEL command: glmCrowdBeIKCmd;

Configuration

An IK Behavior defines the following specific attributes. For common attributes see Behavior Common Attributes.

IK Attributes

In Target Locator

Maya locator attached to the IK Behavior. The locator will be used as a target for the IK constraint on the given IK bone. Notice that, this locator can be animated. If no locator or curve are mapped and there is no target expression, the scene origin (0,0,0) will be used.

In Target Curve

Maya curve attached to the IK Behavior. The curve will be used as a target for the IK constraint on the given IK bone. If no locator or curve are mapped and there is no target expression, the scene origin (0,0,0) will be used.

In Target Expression Expression that evaluates to a target (3D vector). If no locator is mapped or there is no target expression, the scene origin (0,0,0) will be used.
Target Mode This attribute allows a choice of three target modes :
  • Absolute: The locator position will be used as a target for the IK constraint on the given IK bone.
  • Character Relative: The difference between the locator position and the center of the scene will be added to the root position of the Entity and used as a target for the IK constraint on the given IK bone.
  • Character and Ground Relative: The difference between the locator position and the center of the scene will be added to the root position of the Entity and used as a target for the IK constraint on the given IK bone. On top of that the height between the locator and the center of the scene will be conserved relatively to the Ground. To use this mode, a Terrain Locator should have be assigned to the Entities.



Character Relative Target Mode



Ground Relative Target Mode

Target Reach Threshold Maximum distance between IK bone and target to consider the target as reached.
Bone Name Name of the effector bone which will be used to reach the IK target (e.g. head, left wrist, right wrist).
Bone count

Number of bones of the body limb chain which will be used to reach the IK target;

Result of an IK behavior with a bone range of 2 (LEFT) and a bone range of 7 (RIGHT)

IK Orientation Attributes

Orientation Target Type IK Behavior can also apply an IK target orientation in different ways:
  • None: do not try to follow any specific orientation, and will use whatever the final orientation is to best match position requested position.
  • Same As Position Target Locator: use the In Target Locator orientation in combination with Orientation Target Mode as orientation target.
  • Orientation Locator: use the Orientation Target Mode and Locator
  • Up And Forward Expressions: uses two expressions to define up and forward axes, which define the target orientation..
Orientation Target Mode This attribute allows a choice of two target modes :
  • Absolute: The locator position will be used as a target for the IK constraint on the given IK bone.
  • Character Relative: The difference between the locator position and the center of the scene will be added to the root position of the Entity and used as a target for the IK constraint on the given IK bone.
Orientation Target Locator

Maya locator attached to the IK Behavior. The locator will be used as an Orientation target for the IK constraint on the given IK bone. Notice that, this locator can be animated. If no locator is mapped or there is no target expression, the default Maya orientation will be used.

Target Up Expr Defines an expression that evaluates as a vector for target orientation up Axis
Target Forward Expr Defines an expression that evaluates as a vector for target orientation forward Axis

Starting / Stopping Duration Attributes

The Starting / Stopping Duration value determines the time (in seconds) during which the animation goes from inactive to fully active (or vice versa). This time can be used to transition smoothly between two behaviors. When transiting from one behavior to another, it is the average time between the Stopping Duration of the stopping behavior and the Starting Duration of the starting behavior which is used as transition time.

Starting / Stopping Duration Mode

This attribute allows a choice of two modes :

  • Random: Randomly set the Starting / Stopping Duration value between the specified "Starting / Stopping Duration Min" and "Starting / Stopping Duration Max" bounds (this attribute is influenced by the random seed of the Crowd Manager)
  • Per-Particle Attribute: Use the "Starting / Stopping Duration Name" attribute to get the name of the float per-particle field of the relative particle system, containing the Start Percent value.

The Starting / Stopping Duration value is in seconds.

Starting / Stopping Duration Min See Random option of the Starting / Stopping Duration Mode above

Available only when the Starting / Stopping Duration Mode is set to "Random"
Starting / Stopping Duration Max See Random option of the Starting / Stopping Duration Mode above

Available only when the Starting / Stopping Duration Mode is set to "Random"
Starting / Stopping Durationpp Name Name of the float per-particle field of the relative particle system, containing the Starting / Stopping Duration Mode value which will be used (for more explanation about how to use ppAttributes, see ppAttributes Handling)

Starting / Stopping Duration value is set to 0 if the ppAttribute name is empty or invalid

Available only when the Starting / Stopping Duration Mode is set to "Per-Particle Attribute"