Getting reality into VR space

In VR Dev – Getting Started I already talked about some key factors that distinguish VR experiences from other experiences. In addition to that, an interesting feature for journalism in VR would surely be to get the “real world” into a scene, edit additional or real-time content into it and publish that towards a wider audience. Wouldn’t it be cool to point your finger at a map, have that region build up around yourself (while being in VR) and then go around, create more and experience that? I stumbled upon a few approaches that I will present here.

Map, City and Terrain Data

We can derive our scenery from a variety of data sources. The first time I stumbled upon this was through Lorenz’ guide on getting OSM-data into a usable 3D model for Unity 3D – a nice approach for quick and ready-to-use city scenes that could provide an additional virtual illustration for news reporting. The demo protests around the ECB in Frankfurt inspired me to try it out for myself and you could have a decent result in a matter of minutes.

I also tried out a shot of the Colosseum in Rome, where we can see the map and buildings combined.

Imported 3D model of the Colosseum in Rome as seen in Unity 3D editor.

Imported 3D model of the Colosseum in Rome as seen in Unity 3D editor.

What’s missing through this approach are nicer textures and easier access to single objects, like individual houses. This could be remedied though, by importing the .obj-file into some other renderer that is more useful for asset production, like the FOSS Blender.

CityGML is an OGC Standard for 3D virtual city and landscape models. Datasets of cities have become available or are under development. You can download Berlin’s 3D CityGML data from their FTP-server here or pick it interactively here. I fetched the Berlin Mitte dataset and ran it through citygml-to-obj , a nifty JavaScript helper for data transformation. The dataset is pretty big, so expect it to run a while. Once done, import the .obj-file(s) into Unity.

Some random buildings from Berlin Mitte dropped onto the editing ground.

Some random buildings from Berlin Mitte dropped onto the editing ground.

So, we’ve got buildings and city infrastructure covered – on flat terrain. How about larger landscape and elevation models? Give me Iceland! Alright, go grab a dataset from either here or there and head over to GDAL to download their spatial software. In this tutorial you can follow along the conversion from elevation data to GeoTIFF that can then be imported into Blender to create a terrain model to be used in Unity 3D. It might help to create a little script to get the conversion done for all tiles in a batch.

Some tiles of Iceland in Blender

Some tiles of Iceland in Blender

A mixup that has been around was using terrain models and OSM data to create world surfaces with map features as shown in this YouTube video about OSM Terrain/ Unity package integration. It has been abandoned though, as MegaFiers came up with this streaming solution. So, we’re getting ready to streaming the real world directly into VR pretty soon.

More coming up, soon!

Leave a Reply

Your email address will not be published. Required fields are marked *