Clear all

Importing multiple overlapping landscapes stacks them


Topic starter


Have been playing around a bit trying to import multiple landscapes. 

Testing with 3 landscapes. All centered around same area. 

Landscape image resolution is around 3k for small, 6k for medium and 6k for large.

Small and medium should both be at 1m/px resolution, while large should be 2m/px.

Goal is to have a "main" area with as high resolution as possible. And a large area with low resolution covering a large area capturing surrounding mountains and hills as a "background" asset.

But having problems with each successive import just getting stacked on top of each other. Unable to figure out if it's a constant distance, or if it's stacked on top of the bounding box of the previous one.

It is of course somewhat simple to manually align them afterwards, but would like to know if there is some other fix for this. 

Images of landscapes stacking. Smal and large landscapes are grey, medium one is green. Cube should be 30m


1 Answer


When you import a DTM, TerraForm will centre the landscape to 0,0,0 for the level (the origin). UE4 Landscape actors use the top left corner as their origin, so to centre them correctly, TerraForm offsets the landscape by of 50% the x and y dimensions of the DTM data. (If your landscape if 2km by 2km, TerraForm will offset it by 1km x and 1km y.)

We do this because UE4 uses single floating point precision, limiting the accuracy of positions x, y, and z to 32 bits, so re-centring the landscape retains the maximum accuracy available for your level.

What this means is that if you're importing multiple landscapes to the same level, each will be stacked on top of the other. As you say, it's easy enough to change location to offset them, but be careful to move them by moving the respective TerraForm Landscape Anchor, otherwise you will change the geographic position of the landscape and you won't be able to import more data with TerraForm.

Ideally you should use world composition for this particular use case and create a set of tiles of GIS data that you can import to each level. You can then offset the location of each level to give you a grid. You don't actually need multiple resolutions of DTM, TerraForm can reduce the resolution to the landscape size you set when you import the data.

If you import landscapes on top of each other in the same level, you would need to create different resolutions of DTM and you will also need to cut holes in the lower resolutions (i.e., you would need to cut a hole in the low-resolution DTM (using a mask) for the mid-resolution, and then cut a hole of the high resolution data in the mid-resolution layer.)

I've not tried this in practice, so I'd be interested to hear how you get on!