-
-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
16-Bit raw greyscale map seems to be importing with reduced precision #161
Comments
My first guess is that Gimp exported the data in a different endianess than what the plugin reads... but I'll need to take a closer look |
I was able to obtain a non-flat terrain by swapping endianess. The fact Gimp does not indicate this doesn't help^^" When I import a 16-bit raw heightmap generated by the Scape terrain generator, I get smooth results. I changed tag to enhancement because the import dialog needs an option to choose endianess. |
I was about to report the same findings after swapping the endianess. I'll investigate the Gimp situation further, but I doubt that it'll be relevant here! Thank you for your time and hard work on this plugin! |
If you search for an immediat solution, I was able to export and import a perfect matching heightmap from blender by using EXR in float (32bits), then, convert it in Krita in the format "R32 Heightmap". Then I had to change the code of the plug a little bit to support the R32 format. If I remember well, I had to change the following points in the hterrain_data.gd script:
I was thinking to make a patch but I'm not skilled enough with Git and Github :) |
Added an endianess option in beb4502 |
I've confirmed that Gimp's raw export will output a 16 bit file, but the actual values are converted to 8 bit during the process, which is pretty silly. I hope you don't mind my leaving this comment here in case someone else stumbles across a similar issue! |
Describe the bug
A heightmap was cobbled together in GIMP, with bit depth set to 16 bit and color mode to greyscale. Exported as raw with default options. Built a simple test program in C++ to verify the export, everything appears normal. Upon importing the raw image as a heightmap for terrain, only a few (3-4?) different heights can be observed. When the png version of the same heightmap is imported (albeit at a lower bit depth), the terrain appears much smoother overall, (although still jagged due to the insufficient precision).
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The raw 16-bit heightmap should produce a significantly higher fidelity than the 8-bit png heightmap.
Screenshots
(png version):
(raw version)
Environment
Contents of attached heightmaps.zip:
world8bit.png - the png file mentioned above - directly converted from the raw file via custom program to make sure the GIMP output was correct.
world.raw - the 16-bit uncompressed raw heightmap exported from GIMP.
heightmaps.zip
The text was updated successfully, but these errors were encountered: