Immersive Studio
Interested in working together?
[email protected]
Recreating a Real World Landscape in VR
Apr 22, 2020 • 4 minute read

Recreating a Real World Landscape in VR

Get started with a real life existing landscape in Unreal.

Sculpting your own landscape in Unreal can be hard. You might lose your inspiration while trying to make it look natural. Why don’t you use a real life existing landscape to get you started? To do this, we’ll need a height map: a grayscale map with the hues of gray representing the altitude (black being the lowest altitude and white being the highest).

Research

We set off to see what sources were available to get height data from. For example, NASA data is available in both DTM30 and DTM90 format which means that any pixel in the heightmap will represent the height per 30 or 90 meters of terrain.

Other resources we looked at include terrain.party, opendem.info and opentopography.org

What we realized is that most of the available data did not give us the detail we were hoping to get: we needed higher resolution DTM data. We found DTM1 to DTM5 to be the most immediately acceptable.

Thankfully many governments actually provide heightmaps as open data to use. The interfaces, quality and formats are different for every country but it’s the only way to obtain this data.

The data

We looked for an iconic location that would be instantly recognizable when compared to real pictures: Reine Fjord in Lofoten. The dataset is derived from data available at hoydedata.no, who provide a way to view, and download elevation data in various formats covering Norway. Requesting a digital terrain model from Høydedata might take from 10 minutes up to 24 hours, depending on the size. You’ll receive multiple files in either the GeoTIFF or USGS DEM format; both can be used.

GDAL tools (which are wrapped in a nice QGIS GUI) is able to merge the received files. After adding some hillshade, we get the following image of the Reine Fjord (left). For comparison we added the Google Maps (right).

The landscape technical guide of Unreal suggests a number of sizes that maximize the area while minimizing the number of landscape components. We chose to crop the resulting image to an 8129x8129 image, which represents about 8 square kilometers in real life.

World Machine

The Norwegian data was in GeoTIFF format which made it easy to work with; you can even open them in Photoshop although you’ll have to change the image type from 32 bit to 16 bit to get a better idea of the heightmap. You could simply port this heightmap to Unreal and call it a day but we wanted to have more control over the end result.

This is where the node based terrain generator World Machine comes in. First we input our GeoTIFF into World Machine to get our first 3D view of the terrain. Make sure you conform the extents to be identical to the 8129x8129 format we’re working with. World Machine conveniently provides an example of using real world data and making changes to it to improve the result. This gave us a good idea of how to make changes to the original data.

Our main problem was the lack of underwater height data, which renders the entire surface of the water flat. So we need a way to lower the surface of the water and create some coastlines that fade into the water. To do this we first raised the entire height map and selected only the lowest point of the height map (the surface of the water) to lower that. We then used the thermal erosion, erosion and coastal erosion nodes to create a smooth drop-off into the water.

Finally, we can export it as a RAW16, which Unreal will accept.

Unreal

First we take our exported heightmap and import it as a landscape in Unreal. We like using Brushify for our landscape material as it handles some of the time consuming aspects of creating a proper material automatically. What you see above is just a simple two layer material setup, using Quixel materials, to start with. Finally, we add 8 square kilometers of water and we get our final result (left). And again, Google maps for comparison (right).

Unfortunately, some lakes don’t have any water due to the fact that they aren’t equal to the lowest point of the height map, which we lowered. Nevertheless, this is a good starting point for your unreal landscape.