Heightmap problem

So i create landscape in 3ds max and wanted to use it in unreal but that is not possible because i cant use on imported mesh landscape paint. So i created render height map in 3ds max 1500x1500 and imported in UE everything is fine exept one thing. When I now import mesh over UE landscape it is difference in height about 40 meters? -27050, 23640. You can see on pictures that mesh imported in from max is smaller on z axis by 40 meters than height map? What to do. I can use tools in UE and fix landscape but that is time consuming, I could do that at begining… How to fix this problem for the future?

Make sure to read:


being the last one containing the best resolutions for you heightmap to match Unreal’s.

Red that al least 10 times with no help. But this one got me thinking https://wiki.unrealengine.com/World_…In_Depth_Guide So if white represent top and black bottom on scale has 255 and in unreal that represent 512 meters full scale that is where i lost 30-40 meters because my landscape was from bottom to top 469 meters, that said i had to change black and white slider in max for top and bottom they aint gonna be 0 and 255 because i get full height 512 meters then. From 0 to bottom it is 212,21199 meters that is 212 meters and from 0 to top is 256,90725 meters, that is 257 meters. So how to solve this? I will try now 512-469=43 meters divede by 2 it is 21,5 so 22. I will put black from 0 to 22 lets see what happen.

EDIT: So i tested this and it works, it has some misses but for first try it looks good and height looks ok, gotta test it more. this 512 meters got me thinking 255x2 is 510 I guess these 2 are edges ???