Locomotion
A CrowdBeLocomotion is a Behavior able to choose amongst a set of motions and change their speed replay in order to reach the current position and orientation of the particle. Each time a motion file is loaded in this behavior, it extracts its velocity (based on the complete translation of the motion and its duration). Thus, when the particle moves, depending on its velocity and on the character legs size, the behavior will chose the most relevant motion to play and adjust its speed replay if needed.
For now, notice that this behavior is only able to analyze one axis translation motions (i.e. idle, walk, run and their derivatives…).
A locomotion behavior in the behavior editor
Notice that the provided motion files need to define a root translation (used to compute the original velocity of the motion), as explained in the motion prerequisites.
Creating a Locomotion Behavior can be performed through the following options:
- Behavior Editor / Behavior Library:
- Crowd Menu: Crowd Behaviors / Behaviors / CrowdBeLocomotion Node
- MEL command: glmCrowdBeLocomotionCmd;
Configuration
A locomotion Behavior defines the following specific attributes. To get more information about shared parameters, see here
Motion Attributes
Motion attributes of a locomotion behavior
Motions Files (.s4d file) | Motions to play when this behavior is started. The Locomotion Behavior changes the speed of the motion and/or blends several motions together depending on the velocity of the corresponding Entities |
Starting Duration / Stopping Duration (in seconds) | Time used to start/stop the motion. It ensures smooth transition when starting/stopping the motion. These durations can be viewed as a time during which a multiplier weight is applied to priority: from 0 to 1 for starting (from inactive to fully active motion), from 1 to 0 for stopping (from active to inactive motion) |
Animation Priority | If several behaviors are played at the same time on the same part of the body, it defines the relative weight of this behavior compared to the others. If one behavior has a motion priority higher than "the max motion priority of the other behaviors + 5", it will be played at 100% on the specified body parts. See the Animation Mask attribute to know how to apply a behavior on specific parts of the body |
Animation Mask | If wanted, motions can be played on specified body parts. This attribute allows selecting those body parts. By default, a motion is played on the entire body (all body parts checked) |
Synchro | Activate Synchronization when blending several motions (see Introduction Glossary) |
Footprint | Activate Footprint computation for ground adaptation (see Set Ground Adpatation Mode behavior) |
Advanced Attributes
Advanced Attributes of a locomotion behavior
Time to turn around at rest | Minimum time to make a complete U-turn at rest (the higher the value, the more difficult it will be to turn) |
Time to turn around in motion | Minimum time to make a complete U-turn when moving forward/backward (the higher the value, the more difficult it will be to turn) |
Distance Treshold | Maximum distance from the navigation target for stopping |
Extrapolation Duration | Number of frame to take into account for computation |
Max Update Period | Maximum number of frame to wait before updating the locomotion state |
Orientation Low Pass Filter | Number of low pass filter samples for adapting orientation. It represents the number of frames used for smoothing the orientation corrections applied to the entities (it's used to avoid orientation jitter). |