Adapt Ground

An AdaptGround Behavior (beAdaptGround) change the ground adaptation mode of an Entity.
An AdaptGround Behavior in the Behavior Editor
 
Note that even if this Behavior only set a parameter, it has to be stopped by its Stop Trigger, like other Behaviors. Do not forget to stop it (e.g by setting its Stop Trigger to true).
 
Note that this Behavior needs a terrain. For explanation on how to set a terrain, see the Terrain Locator.

Creation

  • Behavior Editor / Behavior Library: 
  • Golaem Menu: Crowd Behaviors / Behaviors / CrowdBeAdaptGround Node
  • MEL command: glmCrowdBeAdaptatGroundCmd;

Configuration

An AdaptGround Behavior defines the following specific attributes. For common attributes see Behavior Common Attributes.
Note that an Entity Type advanced attribute allows to void the ground adaptation by default from start.
 
 
Adaptation Mode

Specify how to update the character

  • No adaptation : No adaptation is done (see Entity Type advanced attribute "def. ground adaptation" if this is wanted from the simulation start)
  • Particle : Only update the particle position
  • Animation: Update the animation posture according to footprints and ground Evaluation Mode.
Evaluation Mode This attribute allows a choice of three ground evaluation modes :
  • When Support Phase Changes: The ground height is evaluated only when the foot is on ground (see Computing Footprints). Best choice when the ground is static.
  • At Every Frame: The ground height is evaluated every frame. It's more suitable with dynamic and moving ground. This mode can give strange results with non continuous ground.
  • Foot Lock on Support Phase: The ground height is evaluated only when the foot hit the ground, and the foot is locked on its position fur the duration of the support phase.

Foot Lock Attributes

Only available when the "Evaluation Mode" is set to "Foot Lock on Support Phase".

Foot Strike Offset Offset of time between the beginning of the foot support (as defined in the animation) and the beginning of the foot lock
Foot Off Offset Offset of time between the end of the foot support (as defined in the animation) and the end of the foot lock
Foot Off Duration Duration of the interpolation when releasing the foot lock (interpolation between the locked position and the animated position)
Correction Start Ratio Ratio of leg extension from which adding posture corrections: foot roll first, and additionnal leg stretch if the foot roll is not enough to bring the leg's extension back to this ratio
Max Foot Roll Angle Maximum roll angle to add to the ankle
Max Stretch Correction Maximum stretch value to add to the leg

Sampling Attributes

Sampling Radius Radius around footprint that will be used to make ray samples.
Sampling Ray Count Number of ground ray evaluations to average.

Physics Ground Attributes

Include Physics World If checked, ground adaptation will also use physicalized Entities of the specified Physics Locator to compute footprint height
Physics Locator see above
Physics Projection Mode
  • Raycast (faster but less precise): ground's height will be computed by casting rays from the foot position and checking the position of collisions on the ray.
    This value is the best to use when dealing with physics collision having low height variation.
  • Sweep (more precise but slower): the shape of the foot (as defined in the Bone Physics Properties of the character) will be projected toward the ground to find the position of the first collision that occurs on the shape.
    This value is the best to use when dealing with high height variation on the physics collision.
Filter Physics Mode Ground adaptation will be done only on physics parts that are of the given physics mode (see the Physicalize Mode parameter of the Physicalize Behavior for more information on physics modes).
Filter On

This allows to filter the physics parts on which doing ground adaptation.

  • If an ID is selected, the ID and operator for the ground adaptation should be filled in the 'Filter Operator' and 'Filter ID value' attributes
  • If a color is selected, the color and operator for the ground adaptation should be filled in the 'Filter Operator' and 'Filter Color' value
Filter Operator Comparison operator (equal, greater than…)
Filter ID Value ID for the filter (to see how to set an ID, check the EntityType , the Crowd Rigid Body and the Physicalize Behavior).
Filter Color Value Color for the filter (to see how to set a color, check the EntityType, the Bone Physics Properties part of the character maker, and the Crowd Rigid Body).

Orientation Attributes

Attitude On Normal

Allow to orient the attitude of the entity on the ground's normal BEFORE adaptation the legs on the ground.
For multiped creatures, this can produce better results on sharp hills.

Bank On Normal Allow to orient the bank of the entity on the ground's normal BEFORE adaptation the legs on the ground.
For creatures that keep their pelvis/bust aligned with the ground (like spiders), this can produce better results (combined with the Orient Pelvis Attitude option).
Attitude On Footprints Allow to orient the attitude of the entity on the ground's footprints BEFORE adaptation the legs on the ground.
Bank On Footprints Allow to orient the bank of the entity on the ground's footprints BEFORE adaptation the legs on the ground.
Compensate Supports Limbs When the Orient Pelvis option is checked (attitude and/or bank), this option will compensate the supporting legs orientation to keep them  in the original orientation whatever orientation is set on the pelvis
Compensate Others Limbs When the Orient Pelvis option is checked (attitude and/or bank), this option will compensate the limbs orientation (other than the supporting ones) to keep them  in the original orientation whatever orientation is set on the pelvis
Max Pelvis Ori Speed Maximum orientation speed for the pelvis on ground normal alignment. In degree/s.

Advanced Attributes

 
Max Step Limb Ratio

The maximum proportion of leg length that the character can stretch between two footprints. This ratio depends on your character's morphology. 

In the example above, the character has a max Step Limb ratio of 0.3 (orange line). The Ground Adapt Behavior won't stretch his legs more than that amount.

Max Step Spine Ratio For characters that have legs after the spine (like horses), this is the proportion of leg length that can be compensated by rotating the spine up or down
Ground Detection Ratio

The Ground Detection Ratio sets the height from which the ray cast is done. The ray cast is used to determine the ground height at a foot step. It depends on the environment and the character morphology. This ratio influence how the next foot print position is found. On a high slopped terrain, increase the ratio so the character won't detect ground inside the terrain.

A value of 1 sets the start of the ray at the same height of the pelvis. A value of 2 sets the ray start higher.