Basic tips about creating landscape from heightmap.
https://dev.epicgames.com/community/learning/tutorials/KJ7l/landscape-import-basics
2 Likes
Why this value (-256, 255,992)? It should probably be (-256, 256). Does Unreal Engine save heightmap as float signed.
That’s how it’s done in engine as explained in the documentation :
I can’t be sure but it’s certainly because an integer on 16bits is in [-32768, 32767]. So using a 1/128 scale on the range give a float in [-256.0, 255.9921875].
Using 256 as max won’t get a large error. On the 10/100 m example it would get an error less that 0.1 cm.
To continue on the precision side, one thing I missed in my documentation is than after the scale (because the range is not symmetrical), there is a delta of
(-45 - (-256 * (90/511.992)) )*100 = 0.07031359864
that should be added to the z location (so 5500.070… instead of 5500).
1 Like