BeamNG.drive Gets an Open-Source Real-World Map Generator

BeamNG.drive Terradrive

BeamNG.drive modders now have another way to turn real-world locations into driveable maps. TerraDrive is a new open-source map generator capable of converting OpenStreetMap and elevation data into roads, terrain and buildings before exporting the result as a BeamNG.drive level, potentially allowing users to recreate almost any road network on Earth.

The project is called TerraDrive and has been released as open-source software under the MIT license. Rather than simply producing a heightmap or placing an aerial image over terrain, the tool attempts to reconstruct the actual road network using geographic data.

That includes lanes, divided roads, road edges, curbs, bridges, ramps and intersections. Buildings can also be generated from OpenStreetMap information, while terrain elevation comes from openly available elevation datasets.

TerraDrive is not an official BeamNG project and remains in early development, but its ability to export generated environments directly into BeamNG.drive makes it particularly interesting for the game’s mapping community.

Generate a BeamNG Map From Almost Anywhere

The basic concept is straightforward. Users select a real-world location, choose the size of the area they want to generate and allow TerraDrive to download the necessary geographic and elevation information.

The current interface allows areas between approximately 0.3 and 5 kilometres to be selected. Users can search for a location or enter coordinates manually before starting the generation process.

According to the developer, generating a 0.6 km square section of Lviv’s old town took approximately 40 seconds on the development system. Generation time will naturally vary depending on the size and complexity of the selected area and the hardware being used.

Once processed, TerraDrive creates what the developer describes as an engine-neutral world package. That data can then be exported either to the project’s own Godot-based driving environment or as a BeamNG.drive level ZIP that can be placed into the game’s mods folder.

More Than a Simple Heightmap Generator

Tools for bringing real-world terrain into BeamNG.drive already exist, including projects such as MapNG. TerraDrive approaches the problem differently by focusing more heavily on reconstructing the road network itself.

OpenStreetMap provides information about road geometry, lanes and intersections, while separate elevation data determines the underlying terrain. TerraDrive then uses those inputs to construct driveable streets rather than simply painting roads onto a terrain texture.

The generator currently handles:

  • Road layouts from OpenStreetMap
  • Multiple lanes and divided carriageways
  • Road edges and curbs
  • Bridges and ramps
  • Intersections
  • Building footprints
  • Terrain elevation
  • Road markings
  • BeamNG-compatible level exports

This is an important distinction for BeamNG because usable road geometry matters significantly more than a visually accurate satellite overlay. Properly generated roads can be used by vehicles and can provide the foundation for functioning traffic routes.

The BeamNG export also includes road information intended to work with the simulator’s traffic system, although users should not confuse that with the more advanced traffic simulation included in TerraDrive’s separate Godot application.

TerraDrive Also Includes SUMO Traffic Simulation

TerraDrive for BeamNG.drive
TerraDrive for BeamNG.drive

TerraDrive is actually broader than a BeamNG map generator. The project includes its own driving environment built with Godot 4.6, where traffic is simulated using SUMO — Simulation of Urban MObility.

SUMO runs locally through libsumo and controls vehicles according to the generated road network. AI traffic can yield at priority junctions, stop at traffic lights and queue behind other vehicles rather than simply following predetermined visual paths.

The player’s vehicle is also represented within the SUMO simulation, allowing AI drivers to react to its position. Nearby vehicles are rendered at higher detail while more distant traffic can be simplified to reduce the performance impact.

The developer reports testing city environments with around 100 vehicles and has also implemented tools for creating temporary incidents such as crashes, stalled cars, roadworks, lane closures, traffic jams and altered speed limits.

Traffic lights can also be overridden and scripted scenarios can combine multiple events over a timeline.

However, this SUMO system currently belongs to TerraDrive’s own driving application. The BeamNG export should primarily be viewed as a generated map containing road geometry and traffic-compatible road data rather than a direct port of the complete SUMO simulation.

Real Data Where Possible, Generated Data Where Necessary

One of the more interesting aspects of the project is that TerraDrive attempts to distinguish between genuine geographic information and values that have to be approximated.

Roads and building locations come from OpenStreetMap, while terrain is based on open elevation tiles. TerraDrive also records and hashes its raw source data, allowing the same environment to be regenerated later from the stored inputs.

Not everything can be obtained accurately from public mapping information, however. Building heights may be approximate when accurate values are unavailable, while traffic volumes, signal timings and various pieces of street furniture currently use generated or default values.

Road signage is another current limitation. The developer says automatic posted road signs are presently designed primarily around Ukrainian roads, meaning maps generated elsewhere may not yet receive locally accurate signage.

How to Generate a TerraDrive Map

The current version is aimed more at enthusiasts and developers than users expecting a one-click commercial application, although the process has been designed to remain relatively simple.

After installing and starting TerraDrive, users can open the map interface and select New Map. From there they can search for a place anywhere in the world or paste geographic coordinates.

The desired generation area is then selected and TerraDrive downloads the required OpenStreetMap and elevation information. After processing, the environment can be loaded in the bundled driving application or exported for BeamNG.drive.

The BeamNG output is created as a level package that can be installed through the game’s normal mods directory.

The source code is available through the developer’s TerraDrive GitHub repository.

This Is Still an Early Alpha

TerraDrive for BeamNG.drive
TerraDrive for BeamNG.drive

TerraDrive’s possibilities are impressive, but the current release should not be mistaken for a finished replacement for manually created BeamNG maps.

The project is still described by its developer as an early alpha. Geographic data quality also varies enormously between regions, meaning one city can contain detailed road, lane and building information while another location may have much less complete OpenStreetMap coverage.

Automatically generated buildings will also not reproduce individual real-world locations with the visual accuracy of a handcrafted map. The main attraction is currently the ability to create recognizable terrain and road networks quickly, leaving users free to improve the environment manually afterward if they want a more detailed result.

There is also an important difference between geographic accuracy and visual accuracy. TerraDrive can reproduce where a road goes and how the network connects without necessarily reproducing every wall, house, tree, sign or surface exactly as it appears in reality.

Real-World Maps Could Become Much Easier to Build

Creating an accurate BeamNG.drive environment manually can require substantial work before a creator even begins placing scenery. Terrain has to be prepared, roads reproduced, elevations corrected and a usable network built inside the World Editor.

Tools such as TerraDrive can automate much of that initial groundwork. Even if the resulting level still needs manual improvement, starting with correctly positioned terrain, roads and buildings can save a large amount of time.

That could make smaller local projects especially interesting. Instead of spending weeks reconstructing an entire city, a creator could generate several kilometres around a favourite mountain road, rally stage, local town or test route and then concentrate on improving the areas that matter most.

For BeamNG.drive, whose physics make ordinary real-world roads particularly entertaining to explore, that is a compelling possibility.

Not the Only Real-World BeamNG Mapping Project

TerraDrive is also part of a broader trend within the BeamNG community. Several open-source tools now attempt to simplify the process of generating maps from geographic data.

MapNG, for example, can create terrain using multiple elevation sources and export heightmaps, textures, GIS data, 3D assets and experimental BeamNG level packages. Other projects have developed automated pipelines for generating roads, buildings and vegetation from OpenStreetMap and public terrain datasets.

TerraDrive distinguishes itself through its lane-network approach and its separate traffic simulation environment, but the growing number of these projects suggests real-world map generation is becoming an increasingly accessible part of BeamNG modding.

The result is unlikely to replace carefully handcrafted maps anytime soon. What it can do is dramatically shorten the distance between choosing a location on a map and actually driving through a recognizable version of it in BeamNG.drive.

For an open-source project that is still in alpha, that already makes TerraDrive one of the more interesting new mapping tools to appear around BeamNG.drive.

See you on the track!


This website uses affiliate links which may earn a commission at no additional cost to you.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.