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.

GroundAdaptation Attributes

Ground Adaptation Attributes of a Ground Adaptation Behavior
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.
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).

Advanced Attributes

Advanced Attributes of a Set Terrain Adaptation Behavior
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.

Orient Pelvis Attitude

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.

Orient Pelvis Bank 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).
Max Pelvis Ori Speed Maximum orientation speed for the pelvis on ground normal alignment. In degree/s.
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
Sampling Radius Radius around footprint that will be used to make ray samples.
Sampling Ray Count Number of ground ray evaluations to average.