Community

Importing multiple ...
 
Notifications
Clear all

[Solved] Importing multiple overlapping landscapes stacks them

2 Posts
3 Users
1 Likes
589 Views
0
Topic starter

Hi

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
1

Hi,

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!

Zachary Cole 05/04/2021 8:01 pm

I'm about to try this. is there a way to use python to do the DTM/spline imports? I currently have 36 individual 8k tiles i'm going to try. would be nice to automate a batch import. i'm using the gridsplitter plugin in qgis that has been updated for 3 from https://github.com/Sereza7/gridsplitter.

update: tried it and this works, although i'll probably switch to 4k or 2k tiles to see how if that works with world composition better in terms of the game i'm creating. might need to have a low resolution master landscape to be able to see distant land but still be optimized in memory. (landscape/level lod like google/bing maps etc?)

any ideas how to get the elevations (z-height) to line up at the corners? is there a way to prevent centering in z so that sea level of 0 elevation is retained across geotiffs? I have negative values for ocean depths.

Share: