Best Way to proceed OSM -> CityEngine -> Unity

01-28-2014 11:52 PM
Occasional Contributor
We use a Globe with relief generated by SRTM and visualized with Unity3D (as Google Earth ...).
We are now looking to add 3D buildings.
I have seen many examples on the web using CityEngine and OpenStreetMap datas.

I wonder what is the best way to proceed :
    Importing OSM and SRTM into Unity3D
Or Importing OSM ans SRTM into a FileGeoDatabse via  ArcGIS Desktop then Importing the FileGeodatabse ino cityEngine.

I saw that there is some trouble using WGS84 (no projection) into city Engine 2013 from a GeoDatabase.
Then I need to use an UTM projection.

I wonder if I could reproject the 3d Building in WGS84 once generated. (via ArcGIS desktop I suppose)

I wonder also if there could be some issue importing the building on a globe. Because all sample I saw from cityEngine was on a local coordinate system.

Best regards.
Xavier Lhomme
GIS Architect / ESIRI Expert
0 Kudos
3 Replies
Frequent Contributor

the main thing to know is that Unity does not really work with georeferenced datasets. For this, CityEngine has an export feature which you can use to move ( on export ) the georeferenced datasets to the cartesian origin.

I'm not sure how important it is to have proper elevation in your projects, but I'd do the following :

1] in CE, create a terrain ( note the limitations there concerning raster sizes in CE )
2] import the OSM data into CE ( should not be an issue about projection at all )
3] project the OSM data onto the terrain
4] create rules for your buildings ( main task of course )
5] export to FBX and load into Unity

If you need the buildings also in ArcGIS otherwise, export to MultiPatch (GDB) or kml.

OK ?

0 Kudos
Occasional Contributor
Hi and thanks for your response.

I finally succeed to import OSM file, a terrain  and generate textured buildings. But I had some troubles and I needed to restart the process several times... sometime the terrain didnot appears  sometime it was due to the OSM fields I've selected....

I succeed to display the buildings on google earth.
Now I want to export the buidings to unity : my scene uses an UTM projection but my unity scene uses its own.
Best way is to export like a KML but unity do not import officialy KML. Then I just want to write a file during the export containing the name of the objet and the offset parameter.

Is there some examples of export script doing such thing ?
Best regards
Xavier Lhomme
GIS Architect / ESIRI Expert
0 Kudos
Frequent Contributor
Hi !

When going from a georeferenced CityEngine scene into Unity, I'd drop the georeferencing info completely.

This can be done easily with the exporter's offset that moves the data near the cartesian origin. This works with fbx, dae, obj. This is a much easier workflow.

Check the docs on exporting georeferenced data.


For script based exports, check tutorial 12 here ( plus 10 for the python basics ) :

ok ?

0 Kudos