Open AndrewAnnex opened 4 years ago
hmm
does load as 16-bit, not 8-bit: https://github.com/fogleman/hmm/blob/master/src/heightmap.cpp#L19
To get 32-bits would require extra effort.
You might need to convert to a 16-bit PNG first, not sure.
https://github.com/fogleman/hmm/blob/master/src/stb_image.h#L7356
Yeah looks like the image loader I'm using supports 16-bit PNGs and PSDs:
https://github.com/fogleman/hmm/blob/master/src/stb_image.h#L7248-L7259
Could you point me towards a similar solution that supports 32-bit images? I've been looking for one, but I can't seem to find one that both supports high resolution heightmaps (8192x8192 is what I've been using) and 32 bit.
@tplc10 If you're ok with Python, I wrote Python bindings to hmm
, and it accepts Numpy arrays of type float32 as input.
would it be possible to support float32 input files, like geotiffs, without conversion into a 8bit image format first? Totally understandable if additional dependencies are not desired. I am sure a short python/bash script could automate the conversion and correct zscale...