What's the Crowd Unit? How do I set it?

That's a pretty common question! Thanks for asking!

Due to some dark and quite unknown reasons, even if Maya Linear Working Units are set to centimeters by default it is best to ignore this and assume that 1 Maya linear unit (1 square of the grid) equals 1 meter. We recommend that you do not change the Maya Linear Working Unit and let it to centimeters! (else you and your family will be cursed for 7 generations)

You can verify this for yourself by leaving the setting at "centimeter", making a polymesh box and then making it into a nCloth object. The size (or the weight) of the box doesn't matter for this experiment. Move it up 5 units and click play. The box will take 1 second to reach the ground (y=0 plane). Observe that the object took 1 second to fall 5 meters, not 5 centimeters (for a more accurate result you may want to set the Air Density of the Nucleus solver to zero for this experiment)

Thus, just as Maya, by default Golaem assumes that distances, velocities, gravity of the Golaem nodes are defined in meters. The Crowd Unit helps changing what's the actual unit of your environment. It's important to set the Crowd Unit depending on your environment and not depending on your Golaem Characters. If required, Golaem Characters can be rescaled to be adapted to the environment using the scale attributes in the Crowd Manager, Crowd Field and / or Entity Type Node.

Let's illustrate Crowd Unit with a use case: consider a door object (and assume it's a regular door 1m width * 2m height).

  • Left: door mesh is 1 Maya unit width * 2 Maya units height => 1 Maya unit equals 1m => Crowd Unit has to be in meters (default value)
  • Middle: door mesh 10 Maya units width * 20 Maya units height => 10 Maya units equals 1m => 1 Maya unit equals 0.1m => Crowd Unit has to be in decimeters.
  • Right: door mesh is 100 Maya units width * 200 Maya units height => 100 Maya units equals 1m => 1 Maya unit equals 0.01m => Crowd Unit has to be in centimeters.
  • And so on and so forth...

The Crowd Unit has to be set at two different places:

  • In the Crowd Manager Node, when starting a new scene. Finally notice that the Crowd Unit has to be set in the Crowd Manager Node BEFORE a Population Tool is created and Behaviors are applied.
  • In the Navmesh Creator when converting Maya geometry to a Golaem Navmesh (only required if you need to compute a Navmesh)

The default value of the Crowd Unit can be set by using the GLMCROWD_UNIT environment variable.