A Synchronized Motion Behavior (beSyncMotion) is exactly like a Motion Behavior, except that it will always plays the animation at a fixed position. This feature allows to synchronize an animation precisely with the environment. You can find one of the several use-cases described in the following tutorial.
- Behavior Editor / Behavior Library:
- Golaem Menu: Crowd Behaviors / Behaviors / CrowdBeSyncMotion Node
- MEL command: glmCrowdBeSyncMotionCmd;
A Sync Motion Behavior allows to play an animation precisely synchronized with the environment (left: configuration previz, right: runtime)
Transforms or curves of the scene with which the motion should be synchronized. For each mapped transform, the SyncMotion Behavior will display a preview of how will the animation be played (see the Display Configuration Attributes).
When curves are used, the behavior will use the nearest position between the curve and the entity to play the animation when it's triggered.
If several sync objects are set, the behavior will select the nearest to the entity to play the animation when it's triggered.
|Heading/Bank on curves||Rotate the animation replay on the normal of the curve|
Allow SyncMotion to work with moving objects (consumes more CPU)
Even when the Dynamic checkbox is not checked, the position of the transforms or curves are evaluated when the behavior starts, so it is possible to put keyframes on them before the start time.
|Sync Object Select||
Selection mode for the sync object. Two modes are available:
|Sync Object Select PP||
Name of the float per-particle field of the relative particle system, containing the Sync Object index value which will be used (for more explanation about how to use ppAttributes, see ppAttributes Handling)
The value of the PP attributes are read when the behavior starts, so it is possible to change these values during the simulation.
Display Configuration Attributes
To be able to perfectly synchronize the animation with the environment, the SyncMotion Behavior displays a preview of how the animation will be played during the simulation. This preview can be correctly placed in the environment by moving/turning the SyncMotion Behavior node.
Display Configuration of a Synchronized Motion Behavior
|Enable Display||Check this box to display the preview of the animation on all the configured Sync Objects of the behavior.|
|Entity Type||Select the entity type for which providing the display (the display will use the skeleton and color of the given entity type)|
|Display Scale||Scale to apply on the EntityType for the display|
Bone radius of the displayed skeleton animation.
|Display Animation index||When several animation clips are configured, this allow to choose the one to preview|
Set the type of display for the animation.
One Frame shows only one given frame of the animation (see the Display Frame attribute).
All Frames shows all the frames of the animation.
Frame to display when the Display Type is set to One Frame
|Decimate Frames||Interval of frames to display when the Display Type is set to All Frames|
|Display Count on Curves||Number of times to display the animation on curves (as every point on the curve is a potential position for the animation)|
Advanced attributes of a Synchronized Motion Behavior
|Compute distance from pelvis||If checked, the nearest SyncObject (transform or curve) will be computed from the pelvis. If unchecked, it will be computed from the particle's position|
|Synchronize 2d position||If checked, the behavior will force the 2d position of the entity|
|Synchronize height||If checked, the behavior will force the height of the entity (it might be useful to disable either this or the ground adaptation to get better results)|
|Synchronize orientation||If checked, the behavior will force the orientation of the entity|
|Remove Animation Offset||Check this option if the animation should be synchronized on the first animation frame's transform rather than the origin of the scene where the animation was created|
For all other attributes, please refers to the documentation of the Motion Behavior.