Overview
The Vehicle Crowd parameters section is used to populate the roads with the vehicles from the library and to apply a different behavior to each one of them as they are generated. This includes essential aspects such as speed variation range, and decision-making at intersections (whether a vehicle is more likely to continue straight or make a turn).
Since these settings apply at the moment the vehicle is created, they will stay with the vehicle throughout its journey, even as it crosses intersections and moves onto other roads. This ensures that each vehicle maintains a unique driving style and decision-making process, making the simulation feel more natural and unique.
Vehicle Crowd Generation
The fastest and easiest way to populate the roads with multiple vehicles from the library is using the GENERATE button along with the parameters available in the Crowd section.
The types of vehicle models that will be generated can be defined by selecting them in the library and adding them to the vehicle model list available at the top of this section:
Using the contextual menu, the vehicle list can be easily cleared, or copy/pasted to another road’s list.
The number of vehicles generated can be defined by total count or by density:
Click on the gif to open it in full size
When using density, the value is defined between zero and one, so you can think of it as the percentage of the road that should be filled by vehicles. This method is especially useful when you are not sure how many cars will fit, but you have a clear idea about how full (or dense) you want the traffic of that road to be perceived by the viewers.
Click on the gif to open it in full size
Crowd Variances
The following parameters from the vehicle Crowd section can be used to define how Vroom will randomize the parameters applied to each vehicle generated on that road.
Speed
All the vehicles generated will always be trying to reach their respective top speed as long as the conditions in the environment allow it. But, this will not happen very often because, as in real life, there will probably be something on the road that causes the vehicle to react accordingly (a sharp curve, another vehicle with a lower speed blocking the road, intersections, pedestrians, etc.).
Therefore, the speed of each vehicle will be constantly updated based on the parameters that are defined by the Road properties where it is driving at that moment, by its own Vehicle properties, and most importantly, by the current state of its closer environment (other vehicles, pedestrians, geometry background, intersections with other roads, etc.).
Speed Variance
The Speed Variance applies a random value to each vehicle inside the range specified. This random value is then used as a percentage of the road's Max Speed and added (or subtracted) to that same Max Speed value for that road.
The Max Speed value is defined in the Road Properties section.
For example, a vehicle that drives on a road with 1 lane and a max speed of 50 Km/h, having a speed variance of +50% will be able to speed up to 75 Km/h:
- 50 Km/h + (50 Km/h * (+50/100)) = 50 Km/h + 25 Km/h = 75 Km/h
However, another vehicle generated on that same road may get a different speed variance of -10%, which will set their own max speed to only 45 Km/h:
- 50 Km/h + (50 Km/h * (-10/100)) = 50 Km/h - 5 Km/h = 45 Km/h
Lane Speed Variance
The Lane speed variance parameter (also in the Road Properties section) is the last step in the speed limit calculation process. It is only used in roads with multiple lanes, distributing the speed range defined across all the lanes of the road, assigning the maximum to the outer lane, and the minimum to the inner lane.
As it happens with the road Speed Variance, the Lane speed variance value is used as a percentage of the road's Max Speed.
For example, in a road with 3 lanes, if the Max speed of the road is 50 Km/h and the Lane speed variance is from -10 to +10, the speed limit for each lane would be:
- Outer lane → 50 Km/h + (50 Km/h * (+10/100)) = 50 Km/h + 5 Km/h = 55 Km/h
- Middle lane → 50 Km/h + (50 Km/h * (+0/100)) = 50 Km/h + 0 Km/h = 50 Km/h
- Inner lane → 50 Km/h + (50 Km/h * (-10/100)) = 50 Km/h - 5 Km/h = 45 Km/h
This value is updated for each vehicle every time it changes lanes, which usually happens several times during the simulation.
Inner Lane Tendency
This value defines the tendency of each vehicle to move to the inside lane. As you may have experienced, not everyone follows the rules that force drivers to use the inside lane whenever possible. In the same way, this value tries to emulate a number of different behaviors in this regard.
The value used here can be interpreted as a percentage:
- 0% means the vehicle will never change lanes, regardless of the availability of the action.
- 100% means the vehicle will use the inside lane whenever possible.
Click on the gif to open it in full size
Road-Staying Tendency
This value defines the tendency for each vehicle to change to another road when entering an intersection or to continue on the same one.
Again, this value is a percentage that means the following:
- 0% the vehicle will always take an exit at intersections.
- 100% the vehicle will always stay on the same road and keep the main trajectory through intersections.
Vehicle Properties
Once generated, each vehicle has its own set of attributes that can be fine-tuned individually. To show them, select any vehicle you want in the viewport and take a look at the node properties section.
All of these values can be modified at will and will only apply to the selected vehicle.
Click on the gif to open it in full size
The Color Variation parameter, highlighted in orange, defines the primary color of the asset. As with the Rigged, Posed and Ambient models, each vehicle contains multiple color variations by default. This helps to add variety to the simulation, while also improving efficiency, allowing a higher instancing rate to go unnoticed by the viewer.
The parameters highlighted in red are the ones randomly defined in generation time discussed above: Speed variation, Inner Lane Tendency and Road-staying tendency.
The parameters highlighted in blue are the ones defined in the model library for this particular asset. These are supposed to be constant across all simulations because they depend on the physical properties of the asset (mass, max speed, acceleration, wheels, pitch and roll angle ranges).
Finally, the parameters highlighted in green depend on the state of the simulation and are constantly updated during playback.