Why is my imported terrain under the grid?

Hi there,

anytime I import a hightmap (raw) into Unreal Engine 4/5 it gets placed under the grid. I don’t touch the setting at import time. Can anyone tell me why this happens?

Cheers Sebastian

Hey there @Sebkenter! Welcome to the community! I’d honestly never even thought about the answer to this one, as it never occurred to me to think about it. It could be that the center where the landscape grid actually spawns in a height map is 50% gray, so if you are any darker than that it goes lower, any lighter and it’s higher. I’ll have to fact check that however, as I’ve noticed it the maps apply lower usually but I don’t think I’ve ever thought about why.

Edit: So it’s not 50% gray, most of the maps are always below the 0 grid.

The mapping I used to test it.

1 Like

there is some reason and some math involved. I don’t know what it is, but World Creator does the math for you on export and tells you what z value to put the imported terrain at in unreal.
Like mentioned above, I’d guess it has something to do with the ranges of values in the heightmap, and the desired range of the actual landscape.

It’s not covered in the landscape technical guide as far as i know - if you wanted to know the real math I’d seek out the World Creator discord and ask those guys.

I can’t get a handle on it. I’m using Gaea at the moment and no matter which of the export options

  • raw
  • proportional
  • remapped
  • normalized

I use, the terrain is always under the grid. I have once again attached my heightmap and a screenshot. My expectation is that the terrain starts at Z=0 with the lowest point, so that e.g. the HeightFog works.




Canyon.tor (3.1 KB)

If someone want’s to test - the gaea source is attached.

… look into what 16 bit is and what it means.

0, or the grid position, is always going to be near 65535/2

And usually on import you need to change the Z height of the terrain - the preset value is 100.

The z scale should obviously also match based on the ratio you have to calculate. Follow the docs. Hopefully they kept the ratio math correct.

You’ll almost never get a perfect value for sea level. The engine doesn’t work in 16bit. The files do.
Right from the start you get floating point precision issues anytime your z scale exceeds 100, which is literally always.

Don’t use unreal landscapes. Use houdini or similar. Hell, even working in grassgis by hand is better than anything the engine does.

Gis to blender, blender mesh to ue4. The only thing you have to work around is the fact you have to use other methods (procedural foliage for instance) to distribute grass.

Also your expectation is silly:
0 is sea level. Not the lowest point of a map.

If you want the map to all be above sea level, then all the values have to be greater than 65535/2