Export Map as OpenDrive File Not Working

I was using the The Road Architect tool to try to export map into OpenDrive file as indicated in image below. However, when I open up the OpenDrive file, it is basically empty. Is this feature implemented?

Hi Lawrence1024,

The Road Architect tool is meant to export roads that you create using the tool itself—it does not automatically detect or export existing roads from the map.

From your screenshot, it looks like no roads or junctions have been added in Road Architect, which is why your OpenDrive file is empty. You need to manually create roads using Road Architect, then you can export them as an OpenDrive (.xodr) file.

However, if you are trying to export the entire existing road network of a map, you should use the BeamNG API instead.

Check out this script from BeamNGpy:
BeamNGpy/examples/road_network_exporter.py

This script allows you to extract the full road network from a map and export it to OpenDrive (.xodr) format.

Important Note for Modded Maps

If you’re using a custom or modded map, make sure it contains NavGraph roads, as BeamNGpy’s script requires them to generate an OpenDrive (.xodr) file.

How to Check for NavGraph Roads:

  1. Open BeamNG.tech, load your map, load the World editor from F11 key.
  2. Go to the View menu (top menu bar).
  3. Enable “Draw NavGraph Road Drivability” :white_check_mark:
  4. If you see no NavGraph roads highlighted, the map lacks the required data for BeamNGpy to export.

Let me know if you need help with that.

I’ve followed your suggestions, and after doing so, I’m seeing the attached image. From this, I assume the mod LVMS map is eligible for export to the .xodr file.

However, when I attempt to export it using the Python script you provided, it doesn’t seem to work. The resulting .xodr file is essentially empty. Interestingly, when I run the same script on a preset map like hirochi_raceway, it exports without any issues.

I suspect the problem could be related to the mod map not being loaded correctly. Initially, I had trouble loading my LVMS mod map (Level not found: “/levels/vegas/main.level.json”). After extensive debugging, I found that removing the main.level.json file from the mod vegas folder was necessary for the map to load correctly.

Could this be affecting the export process as well? I’m curious if the script may not be accessing the map data properly due to this issue.

Any thoughts or advice would be greatly appreciated!

Hi Lawrence1024,

Not all maps include main.level.json, and it is unrelated to the navgraph, which handles road network generation.

From the image, it looks like the NavGraph Road does exist in the mod map I’m working on. However, the export still isn’t working as expected—the .xodr file remains empty. Given that the same script works fine on a preset map like Hirochi Raceway, what could be causing this issue? Is there something specific about mod maps that might affect the export process? How do I debug the issue?

Hello,
can you share the mod’s link here to reproduce the issue?

Thank you

I am using the VegasV2 files from this link WIP Beta released - NASCAR TRACKS (thatonekidd789) | BeamNG

Hi Lawrence1024,

we’ve fix the issue, we’ve made changes to accept dead-end roads, the changes are pushed to od_exporter_fix branch.

we will update lua version of the exporter on next release ; 0.35, you can use it in GE lua console by:

  • extensions.load('tech/openDriveExporter')
  • tech_openDriveExporter.export('<EXPORT_MAP_NAME>')

Best regards,
Abdulrahman