Traffic
Traffic Behavior (beTraffic) makes an entity present on the traffic system. Its parameters defines vehicle properties (size, speeds and accelerations).

For more information on traffic in Golaem Crowd, see Traffic Locator & Traffic tutorial
To use a Traffic Behavior, a Traffic Locator is mandatory. A Traffic Behavior uses the Traffic Locator Locator attached to its related CrowdField.
To define a goal for the car, see Traffic Goto. Without Traffic Goto, the entity will stay still.
The car size in the simulation, is defined by the Entity Type Attribute / Traffic Attribute section.
When started, the entity is moved to the closest position on lanes, and its orientation is matched to the chosen lane. By default, it will be adapted on the ground if available, or it will be placed on the matching curve height if there is no ground, or if there is no adaptation asked.
CREATION
- Behavior Editor / Behavior Library:
- Golaem Menu: Crowd Behaviors / Behaviors / CrowdBe Traffic Node
- MEL command: glmCrowdBeTrafficCmd;
CONFIGURATION
A Traffic Behavior defines the following specific attributes. For common attributes see Behavior Common Attributes.
static configuration of a car
Here is the static configuration of a car, LN stands for lateral noise, SD for Safety Distance.
To configure a car, select one while running the simulation, and in the visual feedback, scroll the Maya viewport settings to enable display of the car box. It will display a blue box around the car to check that everything is configured correctly.
- First set the safety distance of the behavior to 0, to configure the base size of the car.
- Run the simulation and select a car
- In the car EntityType, the width and length ratio must define exactly the size of the car (this is the box used to compute collision avoidance)
- repeat simulation run / ratio setup until you are happy with the ratio
- then add some safety distance and lateral noise in the Traffic Behavior. Safety distance is a ratio applied on radius, as for the length of car.
The lateral noise use the free space in the lane width, to add some random jitter to the car. If the noise is set to 1, the car can be placed anywhere from the center of the lane, up to touch the lane side. If the noise is 0.5, only the half of space closer to the lane center can be used for jitter, etc... Note that if the lane width equals the car width, there will be no jitter possible.
Traffic Attributes

A vehicle is defined by its size (length & width in meters) in its EntityType. It also have some acceleration / deceleration properties and speed limits.
All the speeds and acceleration parameters can be multiplied by a random ratio, provided as min/max limits or ppAttributes.
Max Speed |
Maximum speed that the car can reach in optimal conditions (sufficient time with no obstacle) |
Speed When Turning |
This is the speed the car should adopt when turning on a sharp turn (the car adapts its speed when the road is more curvy) |
Max Acceleration |
The maximum acceleration that the car should respect (m.s-2) |
Max Deceleration |
The maximum deceleration that the car should respect when braking (m.s-2) |
Max Angular Speed |
When the car should turn from a big amount at once, this parameter insures that the car is not exceeding this angular speed (degrees per second), else it will span the change on several frames. |
Speeds Ratio Mode |
Speeds and accelerations multiplier mode : could be random, or per particle attribute. If no randomization is desired, just set min & max to 1 |
Speeds Ratio Min |
Minimum bound of random speed and accelerations ratio (in random mode) |
Speeds Ratio Max |
Maximum bound of random speed and accelerations ratio (in random mode) |
Speeds Ratiopp Name |
The name of the per particle attribute, if using a per particle speeds and accelerations ratio |
Lateral Noise Scope | The lateral noise is picked randomly, either once for all simulation, or once each time the car reach a new lane |
Lateral Noise Mode |
Lateral Noise could be random, or per particle attribute. If no randomization is desired, just set min & max to the same value |
Lateral Noise Min |
Minimum bound of random Lateral Noise (in random mode) |
Lateral Noise Max |
Maximum bound of random Lateral Noise (in random mode) |
Lateral Noise PP Name |
The name of the per particle attribute, if using a per particle Lateral Noise |
Safety Distance Mode |
Safety Distance could be random, or per particle attribute. If no randomization is desired, just set min & max to the same value |
Safety Distance Min |
Minimum bound of random Safety Distance (in random mode, will be multiplied by radius) |
Safety Distance Max |
Maximum bound of random Safety Distance (in random mode, will be multiplied by radius) |
Safety Distance PP Name |
The name of the per particle attribute, if using a per particle Safety Distance, will be multiplied by radius |
Advanced Attributes
Advanced Attributes of the Traffic behavior
Rotation Pivot Offset |
Usually, the length is spanned evenly on the front and the back of the pelvis, as configured in the Character Maker. Thus, if the pelvis is not positioned at the center of the vehicle meshes (thus rotation pivot not centered), this attribute will offset the front / back to match the reality :
|