Constraint

A Constraint Behavior (crowdBeConstraint) constraints any Maya object (emitter, locator, light…) to an Entity bone.
 
A Constraint Behavior in the Behavior Editor
 
This behavior allows to interact with other Maya objects, generating footsteps, making simple cloth, dust and various FX… The animation generated on the constrained objects can be keyframed by the behavior so the result can be provided to people who do not use Golaem Crowd.
Example of entities interacting with NParticles thanks to the Constraint Behavior

Due to Maya's refresh order, the constrained objects may be one frame late when playing simulation continuously in the viewport. This behavior is not happening when playing frame by frame. If you want to be able to playblast your scene correctly, use the Add Keyframe attribute in the Constraint Behavior, export it and switch your scene to Simulation Cache Replay mode.

Creation

  • Behavior Editor / Behavior Library:
  • Golaem Menu: Crowd Behaviors / Behaviors / CrowdBeConstraint Node
  • MEL command: glmCrowdBeConstraintCmd;

Configuration

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

Constraint Attributes

Constraint Attributes of a Constraint Behavior
Bone Name Name of the Bone which position and orientation will be used to constraint the Maya Object. Works with any bone of the character.
Object Name Template

Name of the Maya Object which will be constrained to each character. This field may contain special tags such as #pid#, #ps# or #gid# to assign one object per character (e.g. locator#pid# will assign locator1 to the particle of id 1…). If the object does not exist for one particle, a warning message is returned. (see Technical Documentation).

 Position Attributes

Constraint Position If checked, the position of the Maya Object will be constrained
Position Offset Maya 3d position offset to apply between the bone position and orientation and the Maya Object
Scale Position Offset If checked, the character scale is applied to the position offset (the final offset being Offset * Character Scale). See Entity Type or Crowd Field for more information about scale.

 Orientation Attributes

Constraint Orientation If checked, the orientation of the Maya Object will be constrained
Orientation Offset Maya 3d orientation offset to apply between the bone orientation and the Maya Object

Scale Attributes

Contraint Scale If checked, character scale will be applied to the constrained object. Thus, make sure, the scale transformation of your Object has been reseted before using it in a Constraint behavior.

 Keyframe Attributes

Add Keyframe Generates keyframes (one per frame) on the attached objects so that they can be animated without a Golaem Crowd simulation (e.g. to be passed to other departement not using Golaem Crowd)