Terraforming

Road networks are rarely completely flat, and urban areas often consist of multiple graded (height-separated) levels, such as cities with elevated highway sections. The world editor offers various features for sculpting the terrain on which roads can be laid. The Road Architect tool provides several extra options for terraforming (modifying) the terrain, allowing for the creation of raised or recessed roads, natural banking/camber, and realistic verges. An example of terraforming appear in the image below.

Terrain Terraforming Terrain Terraforming

When terraforming, there are two key parameters that the user can adjust, described below:

Domain of Influence: This is a value, measured in meters, which controls how far the terrain modification extends from the road. Smaller values localize the terraforming to the road, creating sharp changes such as narrow plateaus. Larger values smooth out the terrain changes over a wider area, resulting in gentler slopes. The image below shows examples of terraforming operations applied to a road using different domain of influence values.

Margin: This is a value, measured in meters, which controls the size of the soft margin around the roads. It shapes the slope of the terrain as it approaches the road being terraformed. Smaller values create a narrow margin around the road edges, while larger values produce a wider plateau. The margin region itself is smoothed into its surroundings, so it won’t be completely flat. Instead, it’s best thought of as a way to shape the slopes leading up to the road, working in conjunction with the domain of influence parameter.

The image below provides a rough idea about the difference between the two parameters.

Terraforming Parameters Terraforming Parameters

The image below shows examples of terraforming operations applied to a road using different margin values. Changing the parameters described above will shape the slopes of the terrain as they approach the roads. Some examples of terraforming using various values for these parameters are shown in the images below.

Terraforming Single Roads With Different Parameters Terraforming Single Roads With Different Parameters

Terraforming Groups With Different Parameters Terraforming Groups With Different Parameters

Note 1: In certain cases — especially when a road has significant banking or a bend — the terraforming process may introduce small inaccuracies. This can result in bumpy roads while driving and may be visually noticeable. This is a known bug, potentially due to the terrain resolution (typically one meter per pixel). This requires further investigation.

Note 2: Terraforming operations support Undo/Redo (using the CTRL+Z and CTRL+Y commands), allowing the user to quickly undo any unwanted terraforming changes.

Terraforming Single Roads

The terrain can be terraformed to conform to a single road using the controls inside the Terraform Controls collapsible header, located under the Nodes List in the main tool window. The controls are shown in the image below.

Terraform Controls Terraform Controls

Note: If a single road is terraformed, neighboring roads may be affected, potentially causing them to appear floating above the ground or buried underneath it. If multiple roads need to be terraformed together, this can be done by terraforming all roads together or terraforming individual groups of roads (discussed below).

Terraforming Single Roads Terraforming Single Roads

Terraforming All Roads

The tool can terraform the terrain to all roads at the same time, using the second button in the terraforming controls. This solves the problem which arises when terraforming single roads when there are neighboring roads within the domain of influence.

This method handles some other cases too, such as when one road crosses over another road at a greater elevation - the terrain will conform to the lowest road for any (x, y) position, thus allowing the creation of natural cavities suitable for adding bridges. If the user wishes to create a bridge afterward, this can be done using the appropriate button under the Roads List. With the terrain terraformed, there will be two embankments over which the user can span a bridge, then adjust it to fit correctly. More roads can then be laid over the bridge, if required. An example of this process is shown in the sequence of images below.

Terraforming With Bridges Terraforming With Bridges

Terraforming Groups

A similar collapsible header under the Groups List allows for the terraforming of entire groups of roads. In cases where roads overlap (e.g., a bridge over a road), the terrain will terraform to the lower road, creating a natural bridge and embankment. The user can experiment with the domain of influence and margin controls to achieve a natural appearance. The sequence of images below outlines the terraforming process for groups.

Terraforming Groups Terraforming Groups

Terraforming on Import (BeamNG.tech Only)

When importing OpenDRIVE (.xodr) files from disk, there is an option to terraform the terrain to suit the imported road network. This works in the same way as described above, treating all roads being imported as a single group.

Last modified: September 17, 2024

Any further questions?

Join our discord
Our documentation is currently incomplete and undergoing active development. If you have any questions or feedback, please visit this forum thread.