Field Notes: Real Unreal Landscapes

Field Notes: Real Unreal Landscapes
Yes I got it working.

Prologue

One constant challenge of tinkering with a bunch of different topics is remembering what I read, where I found it, where I was in the process, and all the blind alleys that wasted an evening. A lot of tasks only need to be done once or twice for a project and it’s easy to forget what wound up working. These Field Notes are an attempt to document the process I used.

I’m not saying these approaches are the right way to tackle a problem, but they’re a way that worked for me.

One side project I’ve wanted to tackle for a while is simulating a piece of the Pacific Northwest. There are a lot of magical places in the PNW and I’ve spent a lot of time over the years hiking, backpacking, and fishing all over. There’s a particular feel to these places, especially in the fog and rain, that I think would be cool to try and replicate.

So, after getting my development environment set up I moved on to figuring out out to get Geospatial data for an area and import it as a landscape in Unreal.

Field Notes

There are a variety of GIS file formats and I found a handy github repository that has conversion scripts and information on how to go about converting between said formats. It’s pretty old but the scripts worked for me without any issues.

There are some errors in the documentation due to link rot though and finding the files I was after took some sleuthing. The USGS and other government agencies publish a ton of information for public use. The sites can be a little arcane to navigate and they’re jargon heavy, but the information is there if you can find it.

For this project I wanted to go after the highest resolution Digital Elevation Models (DEM) that I could find. The best available is at a 1 meter resolution and isn’t available for all parts of the US but some of the areas I was interested in were covered.

The National Map viewer is the best starting point I found. There are lots of other sources for non-Yanks. You’ll want to access the Data Downloader to see what assets are available for the areas you’re interested in.

Here are a few images showing the process to get the GeoTIFF to feed in to the python conversion script from earlier:

The Data Downloader landing page.
We’re after Elevation Products, and specifically the 1 meter DEM files. Others resolutions will work but will have less detail.
Zoom the map to the area you’re interested in. Please don’t go here, I’m sure you’ll hate it.
Use “Extent” to draw a bounding box for your search.
With the box drawn, you hit “Search Products” and you have your list of assets to chose from.

For this project I used x46y502_OR_UmatillaUnionMorrow_2021_D21, there are some great fly fishing streams radioactive spiders there. Once you have the file(s) you’re interested in, follow the instructions on the Github page and you’ll have a PNG ready to import.

For the actual import I followed a pretty good tutorial on Epic’s site that outlines process.

One tidbit in the tutorial I didn’t know and would be helpful to have understood when I started was that Unreal will map the PNGs 16 bit space (~65k values) to a resolution of ~512 values (I'm sure its documented elsewhere but the tutorial -256 start with decimals allowed). To get things to look right the tutorial has some math you can use based on the elevation values in your DEM file which I didn't know to look for. Although the PNGs have a 16 bit space it’s unlikely your chosen section of the earth will use that full range. I’ve been to this place before and wanted it to “feel” right and was told there would be no math, so I just winged it at a zScale of 380.

Also note that you can adjust this once the landscape is imported so you don’t have to keep deleting and re-importing the landscape... because who would do that? So the end result came out thusly:

Looks about right to me.

Next up - figuring out how to blend a convincing base material for the landscape.