Adapt Orientation

An Adapt Orientation Behavior (beAdaptOrientation) provides different modes (according to the velocity, based on a locator...) to adapt the Entity orientation components (either heading, attitude and bank angles or front and up vectors). The Adapt Orientation Behavior may be particularly useful when Maya fields are used for moving the particles, or when animating an Entity with a Geometry Animation Behavior.
An Adapt Orientation Behavior in the Behavior Editor
 
It is important to notice that the Adapt Orientation behavior is a post process that only changes the orientation of the root bone of the Entity. Make sure that this bone is correctly placed depending on your Entity (i.e. between the feet for a human morphology, at the hips for a bird...).

Example of Entities oriented according to the terrain normal

Creation

  • Behavior Editor / Behavior Library: 
  • Golaem Menu: Crowd Behaviors / Behaviors / CrowdBeAdaptOrientation Node
  • MEL command: glmCrowdBeAdaptOrientationCmd;

Configuration

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

Orientation Attributes

Orientation Mode

Specify how the orientation of an Entity will be adapted:

  • Heading / Attitude / Bank Angles (see image below)
  • Forward / Up Vectors (see image below)
  • Low Pass Filter

 


The orientation of an Entity can be specified through 3 angles (heading, attitude and bank) and through 2 vectors (forward and up)

Heading / Attitude / Bank Angles Attributes

Those attributes are only available if the Orientation Mode is set to Heading / Attitude / Bank Angles.

Heading Attributes

Heading Mode

Mode defining the heading orientation adaptation:

  • Velocity Based: computes the character orientation automatically based on particle velocity
  • Fixed Value: enables to specify an orientation manually
  • Per Particle Attribute: the name of the Per Particle Attribute from which the values will be read
  • Golaem Attribute: the name of the Golaem Attribute from which the values will be read
  • Locator: computes the orientation so that the character faces a given locator
Adaptation Mode
  • Target Position: The input fixed value, or per particle attribute, is a target position that the character must face (see image below)
  • Direction: The input fixed value, or per particle attribute, is a Direction vector (see image below)
Fixed Value Position or direction value for the Fixed Value mode
Target Attr Name Name of the vector Per Particle or Golaem Attribute from which to load values if the Per Particle Attribute or Golaem Attribute mode is active.
Target Locator  Locator faced by the Entity if the Locator mode is used
Max Heading Speed Maximum adaptation of the heading (in °/sec)


Left: Target Position Adaptation mode: all Entities face the specified world position (1, 0, 0) - Right : Target Direction Adaptation Mode: all Entities face in the direction of the X axis (1, 0, 0)

Attitude Attributes

Attitude Mode

Mode defining the attitude orientation adaptation:

  • Same as Heading Mode: computes the attitude depending on the Heading Mode
  • Terrain Based: computes the attitude depending on the ground normal at the root position (see example below). This mode is usually useful for biped Entities
  • Bones and Terrain Based: computes the attitude depending on the projection on the ground of a Front Bone and a Back Bone (see example below). This mode is usually useful for rigid Entities (bikes or cars).
Front Bone Id Id of the front bone to use as adaptation reference for the Bones and Terrain Based mode. The bone Id can be found in the Skeleton Panel when opening the Character File (.gcha) with the Character Maker Tool.
Back Bone id Id of the back bone to use as adaptation reference for the Bones and Terrain Based mode. The bone Ids can be found in the Skeleton Panel when opening the Character File (.gcha) with the Character Maker Tool.
Max Attitude Speed Maximum adaptation of the attitude (in °/sec)


Difference between Terrain Based mode (left) / Bones and Terrain Based mode (right)

Bank Attributes

Bank Mode If the mode is changed, the Entity will also lean in towards the center of the curvature of the curve that it travels along (like a motorcycle going around a corner). No banking occurs when the orientation does not change.

The final banking orientation depends on how much does the orientation vary between two frames. Banking can be adjusted using Bank Scale and Bank Limit.

Bank Scale

If you increase the Bank Scale, then the banking effects will be more pronounced. For example, if the Bank Scale is set to 2, then the object will bank twice as much as the default that is computed. This parameter is the same as in Maya.

A negative number can be set for Bank Scale. This will cause the object to lean out, away from the center of the curvature, rather than in towards the curvature. For example, you could use this in animating characters thrown from side to side in a roller coaster.

Bank Limit Bank Limit lets you restrict the amount of leaning. For example, the Bank Scale may be increased to obtain pronounced effects, but then this may cause the object to lean too much where the curve is very curved. This option will limit the leaning to the given amount. This parameter is the same as in Maya.
Frames To Mean Bank Banking will be based on a mean of n last frames.
Max Bank Speed Maximum adaptation of the bank (in °/sec)

Forward / Up Vector Attributes

Those attributes are only available if the Orientation Mode is set to Forward / Up Vectors.

Vector Mode

3 modes are available to set the Forward / Up Vector Mode:

  • Fixed Value: enables to specify an orientation manually
  • Per Particle Attribute: the name of the Per Particle Attribute from which the values will be read
  • Golaem Attribute: the name of the Golaem Attribute from which the values will be read
  • Locator: enables to specify a Locator from which the values will be read
Forward Vector / Up Vector

Forward and Up vector values for the Fixed Value mode

Forward Attr Name / Up Attr Name

Name of the vector Per Particle or Golaem Attribute from which to load values if the Per Particle Attribute or Golaem Attribute mode is active.

Locator Forward Up Forward and Up vector values will be read from the Locator orientation

Low Pass Filter

The low pass filter applies what it is meant to, by two means : a cumulative circular buffer, keeping "low pass sample count" samples, and a cap on maximum angular speed.

Low Pass Sample Count

It is the size of a circular buffer for meaning the orientations.

Max Low Pass Angular Speed

It is the maximum angular speed, at which the entity will be visually be conformed.

Advanced Attributes

Rotate Pivot Mode

3 modes are available to set the pivot point:

  • Pelvis Bone : the entity will rotate toward the pelvis bone as defined in the Character Maker
  • Root Bone : the entity will rotate toward the first node of the skeleton, aka root node
  • Feet Bones : the entity will rotate around the feet mean position (in neutral posture).
Rotate Pivot Offset

In addition to pivot mode, the pivot point position can be shifted by an additional offset, local to pivot bone orientation

Starting / Stopping Duration Attributes

The Starting / Stopping Duration value determines the time (in seconds) during which the orientation adaptation goes from inactive to fully active (or vice versa). This time can be used to transition smoothly between two behaviors.

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 Duration Attr 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"