Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Procedural cityscapes creation: Openstreetmap import in Unity and Houdini Engine (stinaflodstrom.com)
141 points by liotier on July 28, 2020 | hide | past | favorite | 29 comments


Related: I bought this on a whim and I'm yet to try it: https://www.citygen3d.com/

Mapbox have a Unity SDK that has similar functionality: https://www.mapbox.com/unity

And these guys are doing cool things built upon OSM: https://osmbuildings.org/



WRLD have a similar service and have textured buildings

https://www.wrld3d.com/3d-maps/

They have a Unity plugin


Hello! I'm also working on something similar: http://www.yourcityracing.com. I plan to make the toolset open source (https://twitter.com/jjmontes/status/1288109714631348226).


Is there a software library that has the same "procedural power" as tools like Houdini? Eg, where I could build something like this demo, but purely in Python.

I've tried using Houdini which was very powerful, but was put off by the "visual node builder". I'd like to be able to do something similar, but purely using code.


As other people have mentioned both Blender and Houdini are scriptable to quite a deep level.

Blender is also open source. I suspect a combination of Blender, Sverchok and your own code driving them both would be close to what you ask for.

I'm interested in real-time, interactive stuff so I'm doing similar things in Unity. Unity allows scripting and customization right down to close to the metal and the UI is extremely amenable to customization as well. Tools such as Archimatix show how far you can push this: https://archimatix.com/

I'm currently working on procedural geometry and I keep flip-flopping between a simple and fast UI (very creative and intuitive), a node-based UI (slower but powerful) and a purely code-based interface (a weird mixture - powerful, sometimes fast and intuitive and sometimes not). I don't think node-based UI's are inherently bad. It's just hard to make them not suck and I know of very few examples that aren't plodding, inspiration killers.

But code is equally hard to make fluent and inspirational. Discoverability is poor and to do creative "live coding" you need to have a good memory, a great API, awesome autocomplete and a degree of luck.

So I'm developing 3 different interfaces and trying to understand where the sweet spot might lie. Maybe I'll be able to whittle it down to one interface eventually. ;-)

A quick prototype of my "fast" UI is here: http://www.polyhydra.org.uk/media/fastui/ Entirely keyboard driven at the moment. Crashes a bit too much but you get the idea. I'm currently refactoring the thing to be more useful as a code library as well: https://github.com/IxxyXR/polyhydra https://github.com/IxxyXR/polyhydra-upm


GDScript in the Godot game engine is pretty similar to Python.

https://github.com/RodZill4/godot-procedural-maze

https://www.youtube.com/watch?v=YShYWaGF3Nc


Have a look at Gaffer, it's a great FOSS alternative node based vfx system. https://www.gafferhq.org/ can be a pain to build but really cool.



Only found this Python thing (not maintained): https://github.com/josauder/procedural_city_generation


still node based, but open source, in blender land there is sverchok: http://nortikin.github.io/sverchok/Gallery

probably your closest bet imo. they're honest about the strengths and weaknesses, and while it doesn't have all the conveniences of commercial packages, the script node is there and can bring everything in sverchok and blender to bear in python.


well..Houdini is scriptable in python too :)


Beautiful work! Do you have any demos of how more complex intersections are rendered? https://www.openstreetmap.org/#map=18/47.64626/-122.34944 is a decent stress test.

And I'm curious, how do you compute road width? Are you using the highway type, the number of lanes, something else?


Hi, thank you! I don't have more complex crossings like that yet, but I want to look into it. Fore complex road systems most companies are using HD maps, like the ones from HERE, they have more detailed lane information. I looked up the standard german lane width and then take that times the number of lanes. Then it's also possible to tweak the lane width in the tool. It's totally possible to use highway type for different widths, just haven't implemented that yet! Want to add bicycle lanes and parking lanes, bus lanes as well.


This is great! Slowly hacking away at some related topics on lane markings: https://github.com/kfarr/streetmix3d

The link didn't come through on your post (" like the ones from HERE") curious if you can try linking to the HD maps again?


This is beautiful!

How come computer games don't do this kind of thing? Imagine something like Grand Theft Auto set in any city or even small town of your choosing – automatically generated like this.


They've been doing this for a while in 'narrower' rather than open world applications.

Here's an example of a couple of different racing games set in Edinburgh one earlier, one later:

https://www.youtube.com/watch?v=UqYyvKWLn04&t=2m

It does get concerning. Is the matrix construction considered complete when we can't tell the map from the territory, even if we haven't checked its consistency for every vertice?


I wonder if you could do this with period buildings or houses/industrial complexes/stores. Maybe that's too complex to manage. But it's still amazing.


There is some information about what building type it is, residential, commercial, it's different how much is tagged in different parts of the world, this is Berlin so quite a lot is tagged, but not all.

I'm thinking that using the information where there is information and then doing the rest randomly with some rules is a good way forward. Of course the type of building doesn't say which style it is in but I've been thinking about using area size of OSM building shape for example, a very big area is probably a modern one, a very tall one as well if that information is there.

There seams to be some movement around mapping the building style and/or features in the ML space though, using crowd sourced images, point clouds. Would be amazing to be able to feed that into the system and get facade material, color, architectural style.

-stina flodström


Does anyone recognise any of the streets well enough to find the same scene on Google Street View? So we can make a comparison?


Hi, dev here, most of the video is from the area Bergmannkiez in Berlin, the one with a lot of trees is for example Friesenstraße. Looking at streetview there should definitely be more parked cars everywhere :) /stina


Very cool. I immediately recognized this procedural city as Berlin. Guess it's working pretty well.


Likewise. I wonder how much of that recognisability is the general shape and surfaces of the buildings, how much of the height of the buildings, and how much is the street furniture and the trees?


Glad to hear that :D /dev


The music is really stunning, could anyone tell me the background music of it?


Pink Flamenco - Doug Maxwell


Neat. Once you add zoning aka biomes, it seems like this could be really useful in generating realistic game maps.


I read, "Once you add zombies..." and had a great idea. :)


The upcoming Flight Simulator 2020 uses Bing Map in a similar way.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: