Terraforming

The editor has various options for terraforming (modifying) the terrain. This can be used to generate raised or recessed roads, or enforce natural banking/camber into the terrain directly. It can generate natural-looking verges and open tunnels in the terrain, and it avoids having roads floating in the sky.

Terraforming operations support Undo/Redo operations (using the CTRL+Z and CTRL+Y commands respectively) so that if unwanted terraforming operations are made, they can quickly be undone.

Terraforming Single Roads:

The terrain can be terraformed to suit a single road. This is done using the ‘Conform Terrain To Road’ button on the Road Edit Window.

Conform Terrain To Road Button Conform Terrain To Road Button

To illustrate this, we can create a simple road then raise and lower it in various places, along with adding some lateral rotation at various nodes.

Pressing the ‘Conform Terrain To Road’ button will then raise the terrain up to the road level. The ‘Domain Of Influence’ slider (also on the Road Edit Window) can be used to define how sharp the raising of the terrain is - smaller values raise the road tightly near the road, creating cliff-like features in the terrain, and higher values terraform over a wider area, creating more gradual inclines up towards the road level.

The image below shows a single road which has been terraformed with different domain of influence values.

Single Roads Single Roads

Terraforming Multiple Roads (At Once):

The Roads List Window also contains a ‘Conform Terrain To Road Network’ button and ‘Domain Of Influence’ slider. In this case, the terrain will terraform to the full road network.

Conform Terrain To Road Network Button Conform Terrain To Road Network Button

In the case where roads overlap (eg a bridge going over a road underneath), the terrain will terraform only to the lower road. This will create a natural bridge and embankment from the terrain. The user can experiment with the ‘Domain Of Influence’ slider to make this appear as natural as possible.

The image below shows a selection of roads, to which the terrain has been terraformed.

Multiple Roads Multiple Roads

Note the natural tunnelling which happens at locations where one road passes above another road. In this case, the terraforming is done to the height of the lower road. This creates a natural banking on the terrain, where the ground slopes up from the lower road to the higher road in regions outside the roads themselves. The image below shows this feature.

Natural Tunnelling Natural Tunnelling

Some Considerations:

A. When terraforming multiple roads at once, the algorithm does not take the current terrain height into consideration. On some maps (for example, those with water planes which are set to an elevation greater than zero), performing this kind of terraforming may force some of the terrain away from roads under the water plane (ie underwater). This may appear as unwanted behaviour. In such cases, the water plane elevation can be changed by selecting the water plane and changing the elevation (the position’s Z value) in the World Editor Inspector window.

Top Of Inspector Window Top Of Inspector Window

B. Unwanted artifacts may appear to be floating in the sky after terraforming multiple roads at once. This is due to the way the BeamNG maps are made; there are various layers, including the terrain and its materials, then laid on top of this are extra (mesh) objects such as foliage, rocks, or decals. When we terraform the terrain, these objects will not conform to the terrain (they will stay in their original positions), which will often look unnatural. These can be removed using the World Editor Scene Tree (the user may find using the Scene Tree in conjunction with the Inspector Window to be useful for this purpose - see https://documentation.beamng.com/world_editor/windows/) . The left image below shows some typical artefacts, while the right image shows the extents of the ’terraform zone’ (the extents of the region which is terraformed).

Artefacts/Terraform Zone Artefacts/Terraform Zone

Note that these considerations only apply to the algorithm which terraforms multiple roads together - not to the algorithm which terraforms the terrain with respect to a single road (see above).

Terraforming On Import:

When importing OpenDRIVE (.xodr) files from disk, there is the further option to terraform the terrain to suit the road network to be imported. This works in the same way as described above.

Conform Terrain To Import Checkbox Conform Terrain To Import Checkbox

The following image shows some examples of road networks which have been imported along with terraforming options applied.

Imported Roads Imported Roads

Last modified: May 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.