A set of animation tools is provided to simulate traffic on roads or highways. These tools enable you to create a road network to place and animate vehicles. The vehicles can be animated at varying speeds. You can also have exiting and merging traffic lanes.
The vehicles maintain contact with the underlying roadway at all times, even on super elevated roadways. The vehicles can be made to optionally repeat to keep a steady flow of traffic during the animation. The multi-lane script is automatically created with no need to tediously create actors for each vehicle.
Setting Up Lanes
You need to define a series of paths or lanes to animate the vehicles along the road or highway. The vehicles will follow these lanes. The animator uses these lanes just for calculating the points on the road surface on which the vehicles move. Therefore these lanes need not be accurately placed on the road surface. In most cases these lanes can be placed anywhere above the road surface. You can even reference a 2D layout file with the path information and then use it as a basis for the lanes. In the case where a single lane goes under a bridge and then curves around and crosses itself, the path needs to be defined in 3D such that it is above the correct part road surface as the road curves around over itself.
If you link entrance and exit lanes together in a traffic simulation and then delete the lanes when the animator is not running, the animator leaves references to the deleted lanes as attributes on the linked lane. The animator displays a warning message about this in the message center and suggests you to run the ANIMATOR TRAFFIC LINK CLEANUP key-in to clean up the references. When you execute this key-in it verifies that all the lane links are correct and removes the lane links which are not correct.
Entrance and Exit Ramps
When defining lanes for entering and exiting a highway, the lane paths should not be joined together. The lane paths for entrance and exit ramps are defined by the lane’s center line. The traffic simulation system will perform the merging of the vehicles from entrance or exit lane to the main highway automatically. This is based on the vehicles in the lane being merged by taking into account both their speed and the speed of the vehicles entering or exiting. This can also be seen in the images below: