Real world map to game terrain (osm2terrn2 Project)

Great project !

I have just tried it and I had some issues I want to share:
- Downloading a city fails if the OpenTopography API key is not set in the OPENTOPO_ELEVATION_API_KEY environment variable.
- Export fails for me because the "output" directory doesn't exists. I was confused by the fact that main.py is not in the root directory but in "src" directory. So i changed to src directory and launch "python main.py". And it fails. It seems that the right thing to do is staying in the root directory and launch "python src/main.py".

I finally managed to get a map but it seems broken (see attached screenshot)
Anyway it's a great start.

I have made a similar project a while ago. If it can help in any way, here it is:

And some videos of maps created with it:


That looks like an awesome map, not perfect but it works
 
Great project !

I have just tried it and I had some issues I want to share:
- Downloading a city fails if the OpenTopography API key is not set in the OPENTOPO_ELEVATION_API_KEY environment variable.
- Export fails for me because the "output" directory doesn't exists. I was confused by the fact that main.py is not in the root directory but in "src" directory. So i changed to src directory and launch "python main.py". And it fails. It seems that the right thing to do is staying in the root directory and launch "python src/main.py".

I finally managed to get a map but it seems broken (see attached screenshot)
Anyway it's a great start.

I have made a similar project a while ago. If it can help in any way, here it is:

And some videos of maps created with it:


Hello, greetings.

Thank you very much for taking the time to test the project and share your feedback — it is truly valuable at this stage.


🔧 About the OpenTopography API: The use of elevation data is completely optional.
The project can generate flat maps (streets and basic structures only) without requiring any external data.

OpenTopography queries are only used for heightmap generation.

If you want to use elevation data, you need to:

  1. Register on OpenTopography
  2. Obtain an API key
  3. Create a .env file in the root directory of the project with the following content: OPENTOPO_ELEVATION_API_KEY=your_api_key_here
I will improve the documentation to make this step clearer and more visible.


📁 About the missing output folder: You are absolutely right on this point.
The output folder should either be included in the repository or created automatically, and this is currently not handled properly.

This will be fixed in the next update to prevent this issue.


🛣️ About the road generation issue: Based on the screenshot you shared, it seems that the roads are being generated incorrectly, forming a kind of radial pattern from a single point.

The road generation system is still in an experimental stage, and the issue is likely related to:

  • Offset handling
  • Spatial references
  • Coordinate transformations
I am currently working on restructuring this part, likely moving toward a graph-based street traversal approach to improve geometric consistency.

This is one of the areas I will prioritize in upcoming iterations.


The project is still in an early stage, and several components are under active development.
The current goal is to stabilize the pipeline and improve the consistency of the generated results.

Once again, thank you for your feedback. Real-world testing like this is essential to identify issues and guide development.

I will continue to implement improvements progressively, so any further testing or feedback is more than welcome.

Best regards,
Joaquin (Joako360)
 
Last edited:
It is a very cool project, as a test I tried making a large portion of Pittsburgh, but Rigs of Rods crashes when I try to load.
Hello, thanks for testing the tool and sharing your experience

Regarding the crash when loading the map, I have not yet tested maps as large or complex as Pittsburgh, so I cannot confirm the exact cause. However, based on your results, it is very likely related to the map size and overall data complexity.

At the current stage of development, the tool performs a relatively direct or “raw” parsing between OpenStreetMap data and Rigs of Rods terrain formats. This means that most of the data obtained from OpenStreetMap is transferred with minimal processing.

As a consequence:

  • If the OpenStreetMap data is dense or extensive
  • The resulting terrain will also be heavy and complex
At this stage, the project does not yet include optimization processes, such as:

  • Geometry simplification
  • Data filtering
  • Level of detail (LOD) handling
These features are planned for future development, where the goal will be to reduce and compress the information in order to generate lighter and more efficient maps.

📏 Recommendations for now
In the meantime, I recommend working with:

  • Smaller map sizes (e.g., 1024 or lower)
  • Less dense areas (small towns, neighborhoods, etc.)
For example, I have been testing primarily with small areas, such as the neighborhood where I live in Buenos Aires, which keeps both terrain and geometry manageable.

🌍 About selecting areas in OpenStreetMap
When selecting areas from OpenStreetMap:

  • If the result appears as a boundary relation, it can be used directly
  • Otherwise, you can define a bounding box using coordinate limits
Using smaller and well-defined areas will significantly improve stability at this stage.

Handling large-scale maps and improving scalability is definitely part of the long-term roadmap.

Thanks again for your feedback — it is very helpful for guiding the development of the project.

Best regards,
Joako360
 
Back
Top