A quick and dirty large scale city production workflow

Β· 713 words Β· 4 minute read

Introduction πŸ”—

Open world games always fascinates me. But actually making one is pretty intimidating as a solo dev, while a procedural toolset might work, making a robust one might be tedious and thereby time consuming. After being burnt out from an older project, I decided to take a break and have some fun. So I decided to test how fast can I hack an open world with the least tools and costs.

The final result here is shown using Unity, but I believe the tools prior and general workflow is perfectly doable in any engine.

The Goal πŸ”—

The goal is to hack an open world with the least tools and costs. So let’s make it clear what it means:

  • Almost zero barrier to replicate the attempt for anyone
  • Making a large scale city is the actual attempt, it can serve as actual level but most probably usable as a background

Also I will be focusing on the workflow rather than the actual steps above, but all tools used here has a lot of YouTube tutorials out there, I’m just trying to hack them together.

The Workflow πŸ”—

Open Street Map is a community contributed map data, and this workflow relies heavily on it. OSM surprisingly has a lot of 3D building markers in it, so we can retrieve both the buildings and road information out of it.

Buildings πŸ”—

With Blender plugin Blender-GIS, one can retrieve models such like this:

buildings

They are mostly blocks extruded from outlines, but pretty serviceable for cities.

But with some other plugin like Blender-OSM, you can actually generate different kinds of roof:

roof

If you further purchase the premium version of Blender-OSM, textures will be included:

texture

I on the other hand wanted to challenge myself making shaders, also I think a less realistic but customable material is much useful, so I wired a Unity HDRP/URP shader out of Shader Graph

custom shader

building result

Here are some footage in motion:

moving across

flying across

day night cycle

Roads πŸ”—

Blender-GIS and Blender-OSM both provides road retrieval tool, but Blender-OSM provides a full mesh out of the box. Here’s an example:

road mesh

Roads are also separated by type, so I follow Roman Papush’s Road Shader Tutorial and made several variations.

all road materials

road showcase

Result πŸ”—

result1

result2

result3

result4

result5

Skybox is based on Jannik Boysen’s tutorial.

You definitely cannot make a GTA of the city you live in out of the box with this workflow, but I think the result is perfectly serviceable as a basis, more importantly already usable as a complicated background.

Limitation πŸ”—

It is free! So of course there are caveats. Here are some for you to consider:

Road intersection unsolved πŸ”—

OSM provides only nodes for roads, so intersection between roads remain unsolved and you’ll see disgusting Z-fighting. A custom mesh manipulating solution is needed to fix this. Potential solution here but it seems to be Blender version dependent so I can’t get it to work.

No sidewalks yet πŸ”—

This is probably the most important part to make the whole thing work on the ground, but unfortunately my attempts at using boolean operation in Blender to cut out road only doesn’t work properly.

No actually usable terrain πŸ”—

Though Blender-GIS can pull elevation data and elevates buildings along it, the resolution of 30 meters will result in weird fluctuation. A place where you can get away with flat plane is much preferable.

Inconsistent data quality πŸ”—

Since OSM is community contributed, the quality and density of data varies quite a lot depending on the location.

Improperly solved relation πŸ”—

OSM consists of some complicated relation, and the tools mentioned above can’t solve all of them properly. Here’s Shinjiku government building solved by Blender-GIS:

bad resolve

While the actual data contains a much detailed model:

good resolve

Conclusion πŸ”—

I initially though I can effortlessly made a driving game based in Tokyo open world, but it turns out much more work is required. But I’ve learnt quite a lot from this attempt and still believes this is possible. Thank you for reading this piece and hopefully it is any bit useful to you.

Extra Resources πŸ”—

My custom building exterior Shader Graph’s interior mapping part is based on the GameDevGuide tutorial:

Bonus πŸ”—

Houdini released a set of game dev tools last year focusing on utilizing OSM data. Might worth a try, and here’s an official tutorial playlist on the tool.

I think the highlight is the intersection solving tool.