Zylann/godot_heightmap_plugin

Cannot load single-channel, 32-bit float EXR file

Closed this issue · 3 comments

Describe the bug
Cannot load single-channel, 32-bit float EXR file created in Blender (version 3.3). Godot seems to be the problem. Gimp can read it.
IIRC, I could load it last year in June, but I don't recall the combination of Godot version and addon version…

To Reproduce

Steps to reproduce the behavior:

  1. Created exr file using my blender-addon: https://github.com/cubiest/bmesh-map
  2. Import exr file in addon
  3. see error
New Scene Root
Create Node
Set data_directory
Import maps
  core/io/image_loader.cpp:101 - Error loading image: /home/user_name/Desktop/heightmap_32.exr
  core/variant/variant_utility.cpp:1091 - importer_dialog.gd: An error occurred loading image '/home/user_name/Desktop/heightmap_32.exr', code 16
  core/variant/variant_utility.cpp:1091 - importer_dialog.gd: Cannot open heightmap file: [16]: File Corrupt error

files: blend file + exr file + raw file
heightmap_and_blend-file.zip

I included the raw file for reference (which can be imported). And the blend file, if you want to try it yourself.
Gimp has no issues with reading the EXR file (even though it clamps floats beyond 1):
image

Godot itself seems to have an issue loading the exr file… I know that Godot has some issues with properly understanding an 32-bit exr file (godotengine/godot#67818), but it should at least be able to read it...
It fails here:

var err := im.load(ProjectSettings.globalize_path(path))

Expected behavior

  • Import EXR (32-bit float single channel (R)) map

Environment

  • Godot v4.2.2.stable - Ubuntu 20.04.6 LTS (Focal Fossa) - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 970 (nvidia; 535.183.01) - Intel(R) Core(TM) i7-10700KF CPU @ 3.80GHz (16 Threads)
  • Plugin version: latest master

Godot seems to be the problem

Then you should report this to Godot maybe? The plugin can't fix that.

Can do. Wanted to run it by you in case I missed sth. silly

OK, it seems like it was a Blender issue… It works with Blender 4.2