Couple added things / let’s call them new discoveries brought about from OP’s post and the erroneous assertion that “a plugin is all you need” which is definitely wrong.
When you save a layer in Qgis - Right click > Export > Save As, you have 2 options. Raw Data and Rendered Image.
Rendered Image always saves in 8bit (and I haven’t been able to force more).
Raw Data always saves in 32bit.
For processing your image into a PNG16 you need this workflow:
Get tiles, merge them into a single layer (Raster > Misc > Merge)
Run Gdal_translate. (Raster > Conversion > Translate in current version) add -ot UInt16 in the “Additional command-line parameters”.
Set the file to save to, avoid temp if you are dealing with 100km^2 plus.
](filedata/fetch?id=1861831&d=1613149978)
This saves out a 32bit tiff with the correct data.
Run the calculator with
(“layer” > 0) * “layer” + 32768
Save that to a file as it’s your final raster from Qgis with the proper data set.
You can now acces the raster properties and change the gray band in a 0 to 65535 range.
export and save as raw to finalize.
(Note: the Z value in unreal now needs to allow for a range of ± 65535 meters since the heightmap was setup to have 1m per bit. The Magic z number scale value for that is 12,799.8046875.
obviously you loose some resolution doing this, as the terrain will now lift up or dip down in 1 meter increments).
Now you can run Nip2
https://github.com/libvips/nip2
And convert from whatever geotiff was saved (in raw) to PNG16.
The resulting file may be impossible for most programs to handle. Qgis, Pyton, Img magic, and any other command line utility doesn’t care what the size is since it has not real need to render it (except if you make the mistake of activating it in Qgis or something).
You can use the script I already shared to obtain Unreal Ready tiles. (unfortunately Nip2 doesn’t name them right, so yes you can cut tiles, but then you have to rename them all…)