The Landscape - Part 1

Description

I decided to work with a 3 × 3 km map of the town center.
The town itself is quite small, but I wanted to include some surrounding areas so there would also be a bit of nature to explore outside the built-up parts.

The landscape here is very flat marshland, located close to the Wadden Sea.
Historically, the town developed where water from the sea branched out around a slightly elevated sandbank.
This means most of the surrounding area is extremely low-lying.

Even though the terrain is very flat, and the waterways have changed course over time.
I decided to use existing geographic data as a starting point. This helps get the scale and placement roughly correct while also providing a realistic base elevation for the area.

Source: Middelalderbyen Ribe by Ingrid Nielsen, 1985.


The Data

The Danish Data supply, Dataforsyningen.dk provides a wide range of maps, including elevation data that can be exported and used in various types of software.
After experimenting with a few different tools, I ended up using QGIS. With the help of some tutorials, I managed to export a 32-bit GeoTIFF covering the exact area I wanted.

The Import

Getting that data into Unreal Engine turned out to be a bit more complicated than expected. After some trial and error, I learned that Unreal prefers 16-bit PNG heightmaps with a maximum resolution of 8126 px. After downscaling the image, I tried importing it again.

This worked, but the map ended up much larger than intended. Several guides mention that the X and Y scale should remain at 100%, with only the elevation scale being adjusted. I then found out that each pixel in the heightmap corresponds to one meter in Unreal. Since my heightmap was roughly 8126 pixels, the map was imported as 8.1 km instead of the intended 3 km.

At the moment I’m still unsure how to handle this. One option is to simply scale the landscape down inside Unreal while keeping the higher resolution. A 3000 × 3000 pixel heightmap for a 9 km² area doesn’t feel like much resolution, and I do like the extra detail that comes from the larger heightmap. Still, I’m not entirely sure if keeping the higher resolution will cause problems later in development.

Optimizing the Heightmap

Elevation is a bit tricky to get right. I’ve have trouble finding the exact elevation range from QGIS that Unreal needs when calculating landscape height using the formula:

(Max height of your heightmap in meters) × (100 to convert to centimeters) × 0.001953125

On top of that, when converting the 32-bit image to 16-bit in Photoshop. The conversion tends to flatten the data, which means I have to manually adjust the contrast and exposure to restore the height variation.

I also removed roads and other man made structures, painted the waterways darker, since the elevation data represents the water surface level, not the actual seabed or riverbed.
I will probably have spent more time on these parts to get it right, but it will do for now.

I also experimented with importing the GeoTIFF into Gaea, the world creation software from QuadSpinner.
While it didn’t solve the elevation issue, it did allow me to apply some interesting modifications such as weathering and smoothing, which might become useful later in the process.

For now, I’ll probably have to eyeball the elevation values until I’ve done a bit more research and have a better understanding of how to translate the GIS data correctly into Unreal.


Before After

Heightmap created with QGIS and edited in Photoshop

Næste
Næste

The idea: Ribe, Denmark in the 1650's