Motion

A Motion Behavior (beMotion) plays a Motion Clip on Entities. If several Motion Clips are running at the same time (in parallel through Motion or Locomotion Behaviors), they can be mixed according to different blend modes. See the Blending Motions tutorial for a more detailed explanation on how this blend modes work.

A Motion Behavior in the Behavior Editor

Creation

  • Behavior Editor / Behavior Library: 
  • Golaem Menu: Crowd Behaviors / Behaviors / CrowdBeMotion Node
  • MEL command: glmCrowdBeMotionCmd;


Result of a Motion Behaviors applied on an Entity

Configuration

A Motion Behavior defines the following specific attributes. For common attributes see Behavior Common Attributes.

Motion Attributes

Motions Files (.gmo file)

Motion Clips to play when this behavior is started. If several Motion Clips are specified, each character will pick one sequentially when the behavior starts (first character will play the first motion...). The same chosen Motion Clip will be played if the Motion Behavior loops (see below) or restarts.

Use the "Add New Motion Clip" button and the trash icon to add or remove motions.
Use the ">" button to select the related Motion Clip node and access to its attributes.
Use the  icon to mirror the relative animation ( to load the original animation, to load the mirrored animations,  to load both original and mirrored animation). For mirror animation to work properly, the mirror must be correctly configured on the skeleton mapping, as explained on this page.
Use the  icon to enable / disable a Motion Clip without removing it from the behavior.

You can add Motion Clips (and their related motion files) directly by double-clicking on the behavior in the Behavior Editor and by selecting one or several motion files in the dialog.

Motion Id PPName Name of the float per-particle field of the relative particle system, containing the Motion Clip index value which will be played for this Character (for more explanation about how to use ppAttributes, see ppAttributes Handling). If the index value is out of bounds it's moduloed and if the PPAttribute does not exist, the regular behavior (sequential picking) is executed.
Loop If checked, the Motion Clip will loop automatically when it reaches the end. If not, the behavior will be stopped automatically at the end of the motion (whatever the Stop Trigger contains)
Motion Mapping Mode / MotionMapping File

This attribute allows a choice of three motion mapping mode :


Motion Mapping Mode of a Motion Behavior

  • Motion Mapping File (default mode): In this mode, a valid Motion Mapping File (.gmm) should be provided. To learn how to create your Motion Mapping File, see here
  • Identity: In this mode, each channel will replay the same channel index (ie. channel 0 in entity's skeleton will replay chanel 0 in motion's skeleton, channel 1 will replay channel 1, ...). Use this mode when playing an animation built from the same skeleton as the entity's skeleton
  • Automatic: In this mode, Golaem Crowd will try to build a Motion Mapping automatically. This will work in most cases but you may have to build a Motion Mapping File if the motion is not replayed as desired (see here)

Starting / Stopping Duration Attributes

The Starting / Stopping Duration value determines the time (in seconds) during which the animation goes from inactive to fully active (or vice versa). This time can be used to transition smoothly between two behaviors. When transiting from one Motion/Locomotion behavior to another, it is the average time between the Stopping Duration of the stopping behavior and the Starting Duration of the starting behavior which is used as transition time.

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 Durationpp Name 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"
When fine-tuning the transition between two consecutive Motion or Locomotion behaviors, it's advised to use the Animation Transitions, which will automatically fill the starting/stopping durations of the behavior.

Body Mask Attributes

By default, a motion is played on the entire body (as specified in the Motion Mapping File). But the Motion Mapping File configuration can be filtered by the body mask to replay the animation only on specified channels.



Body Mask Attributes of a Motion Behavior

Pelvis If this box is checked, the pelvis part of the motion will be played. The pelvis part includes the global position and orientation of the animation. If not checked, the animation will be played "in place" 
Spines If this box is checked, the spines parts of the animation will be played on the entity
Limb Channels

List of the limbs channels to play on the entity. Use the  button to open a window with the name of all the available Limbs for the Character Files loaded in the scene. Those names can also be found in the Motion Mapping Panel of the Character Maker.
Star ( * ) wildcard is authorized at the beginning or/and end of names (i.e. left*, *arm, etc.).
Separate the channel names by comma ( , ), leading and trailing spaces will be ignored.
Use the * wild card to use all limbs.
Names are NOT case sensitive (compared as lowercase).

Effector Channels List of the effectors ​channels to play on the entity. Use the  button to open a window with the name of all the available Effectors for the Character Files loaded in the scene. Those names can also be found in the Motion Mapping Panel of the Character Maker.
Star ( * ) wildcard is authorized at the beginning or/and end of names (i.e. left*, *arm, etc.).
Separate the channel names by comma ( , ), leading and trailing spaces will be ignored.
Use the * wild card to use all effectors.
If an effector channel is selected, the corresponding limb channel is automatically added also.
Names are NOT case sensitive (compared as lowercase).
Blind Data Groups

List of Blind Data Nodes or Blend Shape Groups to play on the character. Use the  button to open a window with the name of all the available Blind Data Nodes and Blend Shape Groups for the Character Files loaded in the scene. Those names can also be found in the Skeleton Mapping panel of the Character Maker
Star ( * ) wildcard is authorized at the beginning or/and end of names (i.e. mouth*, *eye, etc.).
Separate the Group names by comma ( , ), leading and trailing spaces will be ignored.
Use the * wild card to use all Groups.
Names are NOT case sensitive (compared as lowercase).

Blind Data List of Blind Data or Blend Shape to play on the character. Use the  button to open a window with the name of all the available Blind Data and Blend Shape for the Character Files loaded in the scene. Those names can also be found in the Skeleton Mapping panel of the Character Maker.

Star ( * ) wildcard is authorized at the beginning or/and end of names (i.e. mouth*, *eye, etc.).
Separate the Blind Data / Blend Shape names by comma ( , ), leading and trailing spaces will be ignored.
Use the * wild card to use all Blind Data / Blend Shape.
Names are NOT case sensitive (compared as lowercase).

Start Percent Attributes

The Start Percent value determines the percentage of the Motion at which the Motion is started. For instance, use value 0 to start at the beginning of the motion, or use value 0.5 to start at the middle of the motion ...

Start Percent Mode This attribute allows a choice of two Start Percent modes :

Start Percent mode of a Motion Behavior
 
  • Random: Randomly set the Start Percent value between the specified "Start Percent Random Min" and "Start Percent Random Max" bounds (this attribute is influenced by the random seed of the Crowd Manager)
  • Per-Particle Attribute: Use the "Start Percentpp Name" attribute to get the name of the float per-particle field of the relative particle system, containing the Start Percent value
Start Percent  Random Min See Random option of the Start Percent Mode above
Available only when the Start Percent Mode is set to "Random"
Start Percent  Random Max See Random option of the Start Percent Mode above
Available only when the Start Percent Mode is set to "Random"
Start Percentpp Name

Name of the float per-particle field of the relative particle system, containing the Start Percent value which will be used on the Motion (for more explanation about how to use ppAttributes, see ppAttributes Handling)
Start Percent value is set to 0 if the ppAttribute name is empty or invalid
Available only when the Start Percent Mode is set to "Per-Particle Attribute"

Speed Ratio Attributes

The Speed Ratio is applied when playing the Motion. If set to 1, the Motion is played at its original speed.

Speed Ratio Attributes of a Motion Behavior
Speed Ratio Mode This attribute allows a choice of three Speed Ratio modes :

Speed Ratio mode of a Motion Behavior
  • Random: Randomly set the Speed Ratio value between the specified "Speed Ratio Random Min" and "Speed Ratio Random Max" bounds (this attribute is influenced by the random seed of the Crowd Manager)
  • Per-Particle Attribute: Use the "Speed Ratiopp Name" attribute to get the name of the float per-particle field of the relative particle system, containing the Speed Ratio value. The value of this PPAttribute can be animated.
  • Automatic: Analyze the input motion velocity (root total translation / duration of the motion) and change it at each frame depending on the particle velocity and the size of the character.
Speed Ratio Random Min See Random option of the Speed Ratio Mode above
Available only when the Speed Ratio Mode is set to "Random"
Speed Ratio Random Max See Random option of the Speed Ratio Mode above
Available only when the Speed Ratio Mode is set to "Random"
Speed Ratiopp Name

Name of the float per-particle field of the relative particle system, containing the Speed Ratio value which will be used on the Motion (for more explanation about how to use ppAttributes, see ppAttributes Handling)
Speed ratio value is set to 1 if the ppAttribute name is empty or invalid
Available only when the Speed Ratio Mode is set to "Per-Particle Attribute"

Use Velocity From Motion Clip If checked, the input motion velocity will be computed from the Motion Clip; otherwise the Motion Velocity will be set from the "Motion Velocity" field below
Available only when the Speed Ratio Mode is set to "Automatic"
Speed Ratio Random Max See Use Velocity From Motion Clip above
Available only when the Speed Ratio Mode is set to "Automatic" and if the "Use Velocity From Motion Clip" option is not checked

Blending Attributes

If several Motion or Locomotion behaviors are played at the same time on the same part of the body, these attributes define how to mix the animation handled by each of those behaviors.


Blending Attributes of a Motion Behavior

Blend Mode This attribute defines how the animation handled by the Motion behavior is mixed with animations handled by other Motion or Locomotion behaviors. Two blend modes are available (refer to the animation tutorials):



Blend mode of a Motion Behavior

  • Interpolated (default mode): In this mode, the animation is interpolated and mixed "as is" with other animation using the same mode
  • Additive (Variations Only): In this mode, only the variations of the animation is added to the result of the blend between interpolated animations
  • Additive (Poature & Variations): In this mode, the entire animation is added to the result of the blend between interpolated animations
Note that footprints are not taken into account when using one of the additive modes. It's recommended to avoid animations that move footprints with this option

Priority/Weight Attributes (Interpolated Blend Mode only)

If several Motion behaviors (setup in Interpolated blend mode) or Locomotion behaviors are played at the same time on the same part of the body, only the behaviors with the highest priority will be played. If several behaviors share the same priority, they will be blended together according to their weight normalized value (for instance, if two Motion behaviors share the same priority with a weight value of 1, they will be blended each at 50%). 

See the Body Mask attribute to know how to apply a behavior on specific parts of the body

Priority/Weight Attributes of a Motion Behavior
Priority

Priority to affect to Motion Behavior

Weight Mode This attribute allows a choice of two Weight modes :

Weight mode of a Motion Behavior
  • Random: Randomly set the Weight value between the specified "Weight Random Min" and "Weight Random Max" bounds (this attribute is influenced by the random seed of the Crowd Manager)
  • Per-Particle Attribute: Use the "Weightpp Name" attribute to get the name of the float per-particle field of the relative particle system, containing the Weight value
Weight  Random Min See Random option of the Weight Mode above
Available only when the Weight Mode is set to "Random"
Weight  Random Max See Random option of the Weight Mode above
Available only when the Weight Mode is set to "Random"
Weightpp Name Name of the float per-particle field of the relative particle system, containing the Weight value which will be used on the Motion (for more explanation about how to use ppAttributes, see ppAttributes Handling)
Weight value is set to 0.5 if the ppAttribute name is empty or invalid
Available only when the Weight Mode is set to "Per-Particle Attribute"
For a Motion Behavior setup in Interpolated Blend Mode, the weight computed for interpolation depends on the Priorities & Weights parameters setup for all the interpolated Motion Behavior currently running. Only the behavior with the highest priority value is used. If there are several behaviors with the highest priority, then an interpolation is made between them according to their normalized weights, in order to always obtain 100% of animation. So for a Motion Behavior with a weight value of 0.5:
  • If it is the only interpolated Motion Behavior currently running, then 100% of its animation will be used in blend;
  • If another interpolated Motion Behavior with a lowest priority starts, then 100% of the first animation will still be used in blend (the starting animation will not be used);
  • If another interpolated Motion Behavior with the same priority and a weight value of 1.5 starts, then 25% of the first animation will still be used in blend, with 75% of the starting animation;
  • If another interpolated Motion Behavior with a highest priority starts, then the first animation will not be used in blend anymore (100% of the starting animation will be used).

For more details, refer to the Priorities & Weights section in the Interpolated Blending Mode tutorial

Additive Blend Attributes (Additive Blend Mode only)

If several Motion behaviors (setup in Additive blend mode) are played at the same time on the same part of the body, each of these behaviors will be blend/added in a given amount  according to the specified Additive Blend Ratio, divided by the number of running additive behaviors (for instance, if two Motion behaviors M1 and M2 are run in Additive Blend Mode in the same time respectively with additive blend ratio of 1.0  and 2.0, the resulting animation will be added an amount of 50% of M1 and 100% of M2).


Additive Blend Attributes of a Motion Behavior

Additive Blend Ratio Mode This attribute allows a choice of two Additive Blend Ratio modes :


Additive Blend Ratio mode of a Motion Behavior

  • Random: Randomly set the Additive Blend Ratio value between the specified "Additive Blend Ratio Random Min" and "Additive Blend Ratio Random Max" bounds (this attribute is influenced by the random seed of the Crowd Manager)
  • Per-Particle Attribute: Use the "Additive Blend Ratiopp Name" attribute to get the name of the float per-particle field of the relative particle system, containing the Additive Blend Ratio value
Additive Blend Ratio Random Min See Random option of the Additive Blend Ratio Mode above
Available only when the Additive Blend Ratio Mode is set to "Random"
Additive Blend Ratio Random Max See Random option of the Additive Blend Ratio Mode above
Available only when the Additive Blend Ratio Mode is set to "Random"
Additive Blend Ratiopp Name Name of the float per-particle field of the relative particle system, containing the Additive Blend Ratio value which will be used on the Motion (for more explanation about how to use ppAttributes, see ppAttributes Handling)
Additive Blend Ratio value is set to 1.0 if the ppAttribute name is empty or invalid
Available only when the Additive Blend Ratio Mode is set to "Per-Particle Attribute"
For a Motion Behavior setup in Additive Blend Mode, the amount of animation added is controlled by the Additive Blend Ratio parameters. Notice that this ratio is divided by the count of Motion Behaviors currently running in additive blend mode, so for a Motion Behavior with an additive animation ratio of 0.8:
  • If it is the only additive Motion Behavior currently running, then 80% of the animation will be added;
  • If another additive Motion Behavior starts, then the amount of animation added will lower to 40% (whatever is the value of the additive animation ratio applied to this other additive Motion Behavior).

For more details, refer to the Additive Ratios section in the Additive Blending Mode tutorial

Advanced Attributes

Interpolate Between Frames

If checked, the motions will interpolate postures between frames of the animation.

This usually gives better results, but if your motions have a framerate superior to the Maya framerate, this option can be unchecked for performances purposes.

IK plane roll from animation This option should be checked when some specific animation produce a bad knee/elbow position on characters
Particle/Skeleton Sync

This option defines how the animation and particle's positions are linked. You usually don't need to change the default setting unless using a very specific setup.

  • None: the particle and the animation will be separated and won't be affected by each other
  • Both Way: the particle and the animation will be fully linked, each being affected by the other
  • Particle to Posture only: the particle's position will be sent to the animation, but the animation won't affect the particle's position
  • Posture to Particle only: the animation's position will be sent to the particle, but the particle won't affect the animation's position

Visual Feedback Attributes

Defines the Motion Behavior Visual Feedback displayed in the Crowd Visual Feedback. For common Visual Feedback attributes see Behavior Common Attributes.

Notice that these attributes can also be configured in the Crowd Visual Feedback

Visual Feedback Attributes of a Motion Behavior
Motion Show the Name of the Motion in use inside the Crowd Visual Feedback


Motion Clip visual feedback for a Motion Behavior