Crowd Field

A Crowd field is a particle field which makes the correspondence between Maya particles and Entities.
 
For each particle of a particle system connected to a Crowd Field, there is an animated Entity. Thus, an Entity relative to a particle is enslaved to this particle: both elements have always the same XZ position (the Y position is defined by the NavMesh) (see Figure 67). A Crowd Field also defines the attributes shared by all Entities.
 
Correspondance between particles and Entities, made by a Crowd Field (notice that Entities are projected on the navmesh although particles have been initialized higher)
 
Like the other Maya fields, the Crowd Field does not support backwards plays or jumps in the timeline: wether the user goes forward of 10 frames at once, or backward 50, each evaluation of the field just step one frame forward. On the other hand, each time the current time reaches the start frame, the Crowd field is reinitialized.
 
The attributes of a Crowd field are not keyable. Once a Crowd field has been initialized, if attribute values are changed they will not be taken into account until the next reinitialization of the node (start frame).
 

Creating a Crowd field can be performed through the following options:

  • Crowd Shelf: 
  • Crowd Menu: Crowd Field
  • MEL command: glmCrowdFieldCmd;
If a particle system is selected when a Crowd Field is created, both nodes will be automatically connected.
 
Connection between a particle system and a Crowd Field.
 

Connection with a Particle System

To know how to connect a Crowd Field to a particle system, please refer to usual manipulations
 
Notice that, like the other Maya fields, a Crowd Field can be connected to several particle systems. Obviously, if a Crowd Field is detached from a particle system, the Entities corresponding to the particles of this particle system will not be animated nor exported.
 
It is also important to remember that following Maya convention, a hidden object is no more computed: if a particle system is hidden, its Crowd field will not be updated.
 

Configuration

A Crowd field defines the following attributes:
 
Attributes of a Crowd Field
 

General Attributes

This part describes the available General Attributes:
 
Start Frame Frame from which the Entities of the Crowd Field will be initialized (must be equal or higher than the start frame of the Crowd Manager in the scene or reinitialized each time the current time reaches the start frame
Simul Entity Percent Percentage of particles which will be initialized and animated. This parameter is mainly for debug purpose
Draw Entity Percent Percentage of simulated particles which will be drawn in Maya. Notice that, even if a Entity is not displayed, it is updated and it can be exported at each frame.

Import Attributes (Per Particle)

Per particle attribute can be useful to specify precisely parameters for each Entity. There are three types of Import Attributes per particle:
 

Init Import Attributes (Per Particle)

These attributes are only used at the initialization (start frame) of the Entities:
 
Entity TypePP Name Name of the float per-particle field of the relative particle system, containing the id of the Entity Type of the particle (between 1 and n). If left to default value, this field is automatically filled by the particle tool. If none or invalid name is given and if the Entity TypePP Random box is not checked, the CrowdEntityType will be 0 (which is an invalid entity type).
Entity TypePP Random If this box is checked, the Entity Type will be chosen randomly amongst the available Entity Types. This attribute is influenced by the random seed of the Crowd Manager
Init DirectionPP Name Name of the vector per-particle field of the relative particle system, containing the init direction of the Entities ((1, 0, 0), X-front aligned). If left to default value, this field is automatically filled by the particle tool. If none or invalid value is given, the Entities will be X-front aligned
ScalePP Name Name of the float per-particle field of the relative particle system, containing the scale of the CrowdEntities (1 for none). If none is given and if the ScalePP Random box is not checked, the CrowdEntities will have a 1x scale
Scale Random If this box is checked, the Entities will be scaled randomly between the specified "ScalePP Random Bound Min" and "ScalePP Random Bound Max". This attribute is influenced by the random seed of the Crowd Manager
Scale Random Bound Min see above
Scale Random Bound Max see above

Init Navigation Import Attributes (Per Particle)

These attributes are relative to the navigation of the Entities and are only used at the initialization (start frame):
 
Init navigation import attributes (per particle)
 
Radiuspp Name Name of the float per-particle field of the relative particle system, containing the radius of the Entities. If left to default value, this field is automatically filled by the Population Tool. If none or invalid name is given the one define by the radius attribute bellow will be used
Radius If none or invalid name is given to Radiuspp Name, this value will be used has default radius of the Entities
Personal SpacePP Name Name of the float per-particle field of the relative particle system, containing the personal space. If none or invalid value is given, the one stored in the personal space attribute will be used as default
Personal Space Defines the distance added to the radius of Entity to define its own sphere, where it would feel more comfortable that no one enters
Heightpp Name Name of the float per-particle field of the relative particle system, containing the height of the Entities. If none or invalid value is given, the one stored in the height attribute will be used as default
Height If none or invalid name is given to Heightpp Name, this value will be used has default height of the Entities.

Update Import Attributes (Per Particle)

These attributes are used for each frame of the Entities simulation (after the start frame):
 
Update import attributes (per particle)
 
DirectionPP Name Name of the vector per-particle field of the relative particle system, containing the current direction of the Entities ((1, 0, 0) for X-front aligned). If none is given, the Entities will be velocity-oriented.

 

Export Attributes (Per Particle)

This part describes the available export Attributes:
 
Export attributes (per particle)
 
Distance To Target PPName  this is the name of the PP attribute on which the distance of each particle to the target will be exported. This distance can then be used in various trigger to change the behavior of a character depending on how far he is from his target. If left empty or if the attribute doesn't exist, the distance to target is not exported.

Advanced Attributes

This part describes the available advanced Attributes:
 
Crowdfield advanced attributes
 
Adaptation Mode set the current adaptation mode for the particle height (see Set Terrain Adaptation Mode Behavior)