I have the same initial problem as the links below, but I cannot change to using float32 as I am not using Blender.
Terracing / stepping artefacts after converting lidar DTM from float32 to uint16
Terracing and data format issues when converting DEM from float32 to UInt16
This command works, but is still in float32 so can't be used in Unity:
"gdal_translate.exe" –of ENVI –outsize 4096 4096 -r lanczos "DTM_SU9075_P_10735_20210218_20210418.tif" "For_UnityNo16conv.raw"
When I change to UInt16 the terracing occurs:
"gdal_translate.exe" –ot UInt16 –scale –of ENVI –outsize 4096 4096 -r lanczos "DTM_SU9075_P_10735_20210218_20210418.tif" "For_UnityScaleAttempt.raw"
So I tried adding values to the scale, but I think the input are whole numbers so whole meters without centimetres? The minimum and maximum elevations are: STATISTICS_MAXIMUM=90.249000549316 STATISTICS_MINIMUM=13.739999771118
So surely there are enough values in 65,536 to create a smooth height model. I just can't seem to scale it correctly.
This is clearly wrong [edit:actually what is clearly wrong is just providing scale without the units] and results in stepping artefact/terracing:
"gdal_translate.exe" –ot UInt16 –scale 13 97 0 65535 –of ENVI –outsize 4096 4096 -r lanczos "DTM_SU9075_P_10735_20210218_20210418.tif" "For_UnityScaleAttempt.raw"
Can anyone point me in the right direction please?
(As an aside I'm no longer resizing as I am cropping first)