Building a 3d world with Openstreetmap, CityEngine & Unity 3D

Just before my CityEngine month trial ends, I spent a couple of days of exploring CityEngine, I was able to create a set of simple models and export them through into Unity 3D.

Initially I took a export of xml data from OpenStreetMap of an area around the UCL campus. This was then fed into CityEngine using the import tool available specifically for OSM data.

OSM Export
OSM XML CityEngine

Then manipulating the various tools in CityEngine you can create models by defining rules for the blocks of building outlines. I used some simple presets and the result was this:

OSM Models

By selecting the various building models, they were exported out into FBX format which can be read into Unity 3D, the textures however had to be reconfigured and set in Unity. Then importing the Constructor asset we get an avatar to explore the simple 3D space created.

It is a good fast result to creating a simple 3D set of buildings, however it is no Google Earth, I can imagine however it would be quite an interesting task in replicating an urban space using OSM data.

9 thoughts on “Building a 3d world with Openstreetmap, CityEngine & Unity 3D

  1. Yeah, I was looking at that today but the main purpose of what I’m hoping to achieve is to re-create urban scenes for a project to visualise a ‘living city’. It’s more closer to making a 3d game world then 3D OSM or Google Earth which are in essence mapping tools. I’ll looking at adding moving agents into the scene and somehow put in live data feeds to make the scene dynamic.

    The method shown is based on one I learnt from my course which goes through CityEngine which is quite user-friendly and doesn’t require as much tech-savvy. I’m hoping to find methods which could directly extract the buildings sizes from OSM3D or Google Earths. Hopefully I’ll find some good open tools which can do so.

  2. Intersting topic. With http://eworld.sourceforge.net you have a agent simulation, but currently there is no link for 3D scenery. But I think it’s at least possible to tie it to Blender3D or OSM2World.
    Of course OpenSource (at least in this prototyping state) doesn’t focus on Usability to much. But on the other side, everybody is free to use or modify it for his own needs 🙂

    1. Someone from OSM tweeted me a link to how to get OSM2 into Blender of Südstadt campus:

      Also saw in the video list a racing game version using blender, so I’m going to explore that:

      I’m not sure the pro and cons of using blender over unity or going opensource vs CityEngine, but I’m definitely going to use OSM2 for the building heights though. I’ll like to use as few software as possible but I think to get a really photorealistic scenery, there’s ging to be a few inbetween sections. At some point I’ll have to look into Google warehouse for specific building colladas to add in some more detailed models.

    1. I actually read your blog a while back when we were first being taught visualisation by @digitalurban and he first introduced us UCL Masters course students to Unity.

      We have been set group projects where we will be using all sorts of software like Unity to create a living city. SketchUp, CityEngine and Unity were all covered as well as Lumion and Autodesk 3DMax. So the next couple of months I think we will produce a number of interesting blogs among us which will take what you have done forward.

      1. That’s nice to read, at least someone looks at my blog! I don’t have access to all the software you guys can get so I’m excited to see where it will go. I’m hoping CityEngine will get more capable and add features that enable you to model cities through time automatically without having to manually do it or delve too much into Jython…

        Keep up the good work!

Leave a comment