
Procedural cityscapes creation: Openstreetmap import in Unity and Houdini Engine - liotier
http://stinaflodstrom.com/projects/osm/osm.html
======
andybak
Related: I bought this on a whim and I'm yet to try it:
[https://www.citygen3d.com/](https://www.citygen3d.com/)

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

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

~~~
jmkb
See also:
[https://demo.f4map.com/#lat=40.7113593&lon=-74.0034646&zoom=...](https://demo.f4map.com/#lat=40.7113593&lon=-74.0034646&zoom=16)

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

------
tarr11
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.

~~~
andybak
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/](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/](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)
[https://github.com/IxxyXR/polyhydra-upm](https://github.com/IxxyXR/polyhydra-
upm)

------
dabreegster
Beautiful work! Do you have any demos of how more complex intersections are
rendered?
[https://www.openstreetmap.org/#map=18/47.64626/-122.34944](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?

~~~
stinzen
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.

~~~
kfarr
This is great! Slowly hacking away at some related topics on lane markings:
[https://github.com/kfarr/streetmix3d](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?

------
gspr
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.

~~~
partomniscient
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](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?

------
coldcode
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.

~~~
stinzen
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

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

~~~
stinzen
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

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

~~~
ben_w
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?

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

~~~
stinzen
Pink Flamenco - Doug Maxwell

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

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

