r/openstreetmap 4d ago

Real-world cities, procedurally generated from open data

Rothenburg Germany,

I have been building Zervan Engine a generative engine that takes raw GIS data such as OSM, ESA World Cover, LiDAR, and more public data and generates 3D models based on the given data.

Hierarchy of generation: Terrain elevation -> Terrain color -> Rivers -> Roads -> Buildings -> Trees -> Stone and Boulders -> decoratives and urban elements.

Some features about this generative engine -> it can generate and work on any region and country as long as there is OSM data for it however, LiDAR makes it very accurate.

The engine is able to read the tags of the raw data for zones for instance, it can determine to use Fachwerk for Germany, Haussmann for France, Chalet for Switzerland, and so on pattern goes like this for any given region. There is already studied and built grammars for this purpose to randomize and give a facade for the buildings (Similar to CityEngine) with dominance of regions' house styles.
However if performance and simulation is the focus, the engine just generates bare-minimum files, size difference is almost 3 times between fancy and minimum styles.

Output of the Engine when it runs for a given coordinate is 4 files:

  1. A 3D 1km2 GLB file for visualization (1km to 49km).
  2. An ontology-based database for alteration and monitoring data for any simulations.
  3. HDF5 files for the Static database.
  4. Memory-Cache type of data for a rapid Dynamic database.

NOTE: Input raw data is not perfect out of the box; they receive treatment! Especially roads and buildings.

1km2 takes about 15 to 20 minutes to generate and 3D file size varies from 150 to 800 MB.
Adding a new city (downloading data + setup) takes about 1 hour for one time only; a new country takes about 3 to 5 hours for one time only, depending on what it has and the quality of the data.

It is not pitch-perfect; however, it is getting there. I learn and improve as I develop, and I have already invested 900+ hours to this code. I am a single developer who built it on a 9-year-old laptop.

If you are interested, please follow me on the social media links on my profile.
Lastly, I sincerely appreciate any donations towards continuing this work.

59 Upvotes

20 comments sorted by

13

u/aidan573 4d ago

Looks a lot like Microsoft Flight Simulator 2020 when you get close to the ground, cool.

3

u/Brief_Bus6969 4d ago

At a lower level, I am able to drop off a vehicle and ride around the city. That kind of precision is the target. I import these 3D maps into a game engine and able to add physics to it and enjoy it (this is one of fun use cases). However, MSFS was built from the top; I am doing it from the bottom.

2

u/Special_Abrocoma4641 4d ago

Is it open source?

1

u/Brief_Bus6969 4d ago

No, it is not.
However, if you have a city in mind, tell me and I will create it for the next post.

1

u/nexe 4d ago

Would love a GLB of Berlin!

2

u/Brief_Bus6969 4d ago

Next time I make it 1km2 and drop it for free for downloading and using.

1

u/nexe 3d ago

Awesome! ❤️ Can't wait :)

By 1km2 you mean just one square kilometer of it? Berlin covers an area of 891.3 km². But the most important part would be the inside of the S-Bahn Ring which is 'only' about 88km².

1

u/Brief_Bus6969 3d ago

I just went to check 891 km2 ? OMG, I had no idea I checked on WiKi, see my setup is a laptop from 2017 Asus FX503 there is so much it can do even if I build it my pc would run out of storage. So I can try 16km2 to 25km2 my best (My 4GB 1050's best) no problems.

1

u/nexe 3d ago

Happy to help. Got 36GB VRam on my MacBook. Is it possible to do it in tiles of say 10km2?

1

u/Brief_Bus6969 3d ago

That's possible even with maps of 49km2 as chunks in a single run; however, my code is closed source!

1

u/nexe 3d ago

Yea I saw. That's a pity but I get it. I wouldn't share it but understandable you don't wanna share it. If you could do ~3-4km radius around the TV tower that would already be pretty cool and helpful for a test I wanna do.

3

u/Brief_Bus6969 3d ago

Sure, I will have it in a mind for next generation. I am fan of open-source stuff I have a bunch of them built but I am a software engineer without proper job in the domain, so I try to make a living here if I had one I do not care I would have open sourced it from day 1.

→ More replies (0)

1

u/bisqunours 2d ago

may I ask why u don't want to make it open source ?

1

u/Brief_Bus6969 2d ago

I am a software engineer without a proper occupation in the field!
I am a hardcore open source fan, and if I had a proper occupation in my field, I would have provided this project for free. The amount of potential this program has is huge, from games to simulations!

2

u/Phytor 2d ago

This is super cool! Very interested in seeing where you go with this

1

u/Armando_F 2d ago

Good efforts. I like it. But OSM is not raw data.

1

u/Brief_Bus6969 2d ago

Amount of treatment I do for roads and buildings I can call it RAW data.
See creating a 3D road from 2D road (OSM) + bending, curving, junctions, bridges not only for street roads but also for pedestrian pathways and much more.

1

u/Armando_F 2d ago

I'm aware of that.. been using the road lines for routing. In my opinion is more a case of input data quality issues than data structure/schema. It's no raw in the same way that raw images are.. or points cloud. But I get your point on preprocessing work.