-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Importing a Radiance HDR image for use in a PanoramaSkyMaterial freezes the editor #61948
Comments
Is this using the bptc code path or something else? |
It's using S3TC HDR texture compression if I'm not mistaken. BPTC is not used unless explicitly opted in, as it's not supported on macOS. (Even if you're on Windows or Linux, this is problematic when exporting a project to macOS.) |
That doesn’t exist. It’s either rgbe or bc6. Hmm
On Jun 12, 2022, at 9:12 AM, Hugo Locurcio ***@***.***> wrote:
Is this using the bptc code path or something else?
It's using S3TC HDR texture compression if I'm not mistaken.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.
|
Even a simple 1k texture will freeze my desktop for several minutes with 100% CPU on a single core, but it does eventually finish.
I have no idea what any of those things are, but whenever I interrupt the process, it's in * thread #1, name = 'godot', stop reason = signal SIGSTOP
* frame #0: 0x0000560f5347ae85 godot.linuxbsd.tools.64`cvtt::ParallelMath::ToUInt16(v=0x00007ffc90f29390) at ConvectionKernels_ParallelMath.h:1138:69
frame #1: 0x0000560f53483d0e godot.linuxbsd.tools.64`cvtt::Internal::IndexSelectorHDR<3>::ReconstructHDRUnsignedUninverted(this=0x00007ffc90f29e70, index=0x00007ffc90f29580, pixel=0x00007ffc90f29540) const at ConvectionKernels_IndexSelectorHDR.h:64:121
frame #2: 0x0000560f5347f1a2 godot.linuxbsd.tools.64`cvtt::Internal::IndexSelectorHDR<3>::InitHDR(this=0x00007ffc90f29e70, range=8, isSigned=false, fastIndexing=false, channelWeights=0x00007ffc90f307c0) at ConvectionKernels_IndexSelectorHDR.h:102:61
frame #3: 0x0000560f53475aba godot.linuxbsd.tools.64`cvtt::Internal::BC6HComputer::QuantizeEndpointsUnsigned(endPoints=0x00007ffc90f29890, floatPixelsColorSpace=0x00007ffc90f2fa80, floatPixelsLinearWeighted=0x00007ffc90f2f480, quantizedEndPoints=0x00007ffc90f2ab70, indexes=0x00007ffc90f2b5d0, indexSelector=0x00007ffc90f29e70, fixupIndex=15, precision=7, indexRange=8, channelWeights=0x00007ffc90f307c0, fastIndexing=false, rtn=0x00007ffc90f30380) [3], cvtt::ParallelMath::Float const (*) [3], cvtt::ParallelMath::Float const (*) [3], cvtt::ParallelMath::VInt16<3> (*) [3], cvtt::ParallelMath::VInt16<2>*, cvtt::Internal::IndexSelectorHDR<3>&, int, int, int, float const*, bool, cvtt::ParallelMath::RoundTowardNearestForScope const*) at ConvectionKernels_BC67.cpp:2570:26
frame #4: 0x0000560f53477252 godot.linuxbsd.tools.64`cvtt::Internal::BC6HComputer::Pack(flags=296, inputs=0x00007ffc90f30880, packedBlocks="\"\U0000000eJ\x88!\n", channelWeights=0x00007ffc90f307c0, isSigned=false, numTweakRounds=4, numRefineRounds=3) at ConvectionKernels_BC67.cpp:2851:58
frame #5: 0x0000560f53456cd0 godot.linuxbsd.tools.64`cvtt::Kernels::EncodeBC6HU(pBC="\"\U0000000eJ\x88!\n", pBlocks=0x00007ffc90f30880, options=0x00007ffc90f31260) at ConvectionKernels_API.cpp:66:45
frame #6: 0x0000560f53455a93 godot.linuxbsd.tools.64`::_digest_row_task(p_job_params=0x00007ffc90f30f30, p_row_task=0x00007ffc90f30f00) at image_compress_cvtt.cpp:116:31
frame #7: 0x0000560f5345601b godot.linuxbsd.tools.64`image_compress_cvtt(p_image=0x0000560f7a628ce0, p_lossy_quality=0.699999988, p_channels=USED_CHANNELS_RGB) at image_compress_cvtt.cpp:223:20
frame #8: 0x0000560f571a5019 godot.linuxbsd.tools.64`Image::compress_from_channels(this=0x0000560f7a628ce0, p_mode=COMPRESS_BPTC, p_channels=USED_CHANNELS_RGB, p_lossy_quality=0.699999988) at image.cpp:2546:29
frame #9: 0x0000560f54ba6b44 godot.linuxbsd.tools.64`ResourceImporterTexture::save_to_ctex_format(f=Ref<FileAccess> @ 0x00007ffc90f315c8, p_image=0x00007ffc90f315b0, p_compress_mode=COMPRESS_VRAM_COMPRESSED, p_channels=USED_CHANNELS_RGB, p_compress_format=COMPRESS_BPTC, p_lossy_quality=0.699999988) at resource_importer_texture.cpp:285:33
frame #10: 0x0000560f54ba7752 godot.linuxbsd.tools.64`ResourceImporterTexture::_save_ctex(this=0x0000560f61c95410, p_image=0x00007ffc90f316d8, p_to_path=0x00007ffc90f31838, p_compress_mode=COMPRESS_VRAM_COMPRESSED, p_lossy_quality=0.699999988, p_vram_compression=COMPRESS_BPTC, p_mipmaps=true, p_streamable=false, p_detect_3d=false, p_detect_roughness=true, p_detect_normal=true, p_force_normal=false, p_srgb_friendly=true, p_force_po2_for_compressed=false, p_limit_mipmap=4294967295, p_normal=0x00007ffc90f316e0, p_roughness_channel=ROUGHNESS_CHANNEL_R) at resource_importer_texture.cpp:408:21
frame #11: 0x0000560f54ba8986 godot.linuxbsd.tools.64`ResourceImporterTexture::import(this=0x0000560f61c95410, p_source_file=0x0000560f777d3ea0, p_save_path=0x00007ffc90f31cb0, p_options=0x00007ffc90f31cd0, r_platform_variants=0x00007ffc90f31ca8, r_gen_files=0x00007ffc90f31ca0, r_metadata=0x00007ffc90f31c80) at resource_importer_texture.cpp:582:14
frame #12: 0x0000560f54608b49 godot.linuxbsd.tools.64`EditorFileSystem::_reimport_file(this=0x0000560f61cb75c0, p_file=0x0000560f777d3ea0, p_custom_options=0x0000000000000000, p_custom_importer=0x00007ffc90f324e0) at editor_file_system.cpp:1916:30
frame #13: 0x0000560f5460c0e5 godot.linuxbsd.tools.64`EditorFileSystem::reimport_files(this=0x0000560f61cb75c0, p_files=0x00007ffc90f326a0) at editor_file_system.cpp:2130:20
frame #14: 0x0000560f545fd6e8 godot.linuxbsd.tools.64`EditorFileSystem::_update_scan_actions(this=0x0000560f61cb75c0) at editor_file_system.cpp:661:17
frame #15: 0x0000560f54601c28 godot.linuxbsd.tools.64`EditorFileSystem::_notification(this=0x0000560f61cb75c0, p_what=17) at editor_file_system.cpp:1248:26
frame #16: 0x0000560f54610a84 godot.linuxbsd.tools.64`EditorFileSystem::_notificationv(this=0x0000560f61cb75c0, p_notification=17, p_reversed=false) at editor_file_system.h:143:2
frame #17: 0x0000560f575f70ff godot.linuxbsd.tools.64`Object::notification(this=0x0000560f61cb75c0, p_notification=17, p_reversed=false) at object.cpp:735:16
frame #18: 0x0000560f55757c9f godot.linuxbsd.tools.64`SceneTree::_notify_group_pause(this=0x0000560f60d1b750, p_group=0x0000560f5b34fe18, p_notification=17) at scene_tree.cpp:904:18
frame #19: 0x0000560f55755e8e godot.linuxbsd.tools.64`SceneTree::process(this=0x0000560f60d1b750, p_time=0.017084000000000002) at scene_tree.cpp:454:21
frame #20: 0x0000560f532b7701 godot.linuxbsd.tools.64`Main::iteration() at main.cpp:2885:51
frame #21: 0x0000560f532681f3 godot.linuxbsd.tools.64`OS_LinuxBSD::run(this=0x00007ffc90f32d20) at os_linuxbsd.cpp:540:22
frame #22: 0x0000560f53262c43 godot.linuxbsd.tools.64`main(argc=4, argv=0x00007ffc90f33268) at godot_linuxbsd.cpp:72:9
frame #23: 0x00007f469b82920a libc.so.6`___lldb_unnamed_symbol3133 + 122
frame #24: 0x00007f469b8292bc libc.so.6`__libc_start_main + 124
frame #25: 0x0000560f53262a21 godot.linuxbsd.tools.64`_start + 33 The HDR files I'm testing with have this header:
The console shows these warnings:
|
These warnings are expected, but I wonder if they should be moved to |
This is still an issue on the beta (v4.0.beta1.official [20d6672]). It appears to happen with every HDR and EXR image I have tried. Here is an example if you want to test or debug. |
I've also encounter this but it only happens when trying to use newly added hdr. if I close godot and start again I can use the hdr in the panorama ok. Since it gets stuck on reimporting asset for the first use before restart I wonder what changes when starting godot anew? |
Same issue is seen when trying to open https://github.com/Calinou/godot-rendering-tests.git project. OS: Windows 10 Pro 22H2 |
Lines of testing:
|
It sounds like this issue is a result of using the BPTC format for HDR textures. So the editor isn't really freezing, it just takes a long time to load because the BPTC compression is so slow. We have two broad options here:
|
In my case, AFAIR a lightmap generated by LightmapGI, takes long time to import. It uses only 1 core of my cpu at 100% (4.0 rc1):
|
This is a separate issue which is a more recent regression: #46442 |
Well, its related, .exr import was slow, now it is exceedingly slow |
This issue is for Radiance HDR import, not OpenEXR import. Also, last time I checked in earlier betas, the import never finished even after waiting for 10+ minutes with a 2048×1024 texture. |
I've copied the mentioned exr file to a new project (without
I downloaded two random exr panoramas from Poly Haven, they were imported quickly, and I was able to assign them to PanoramaSky texture. So I'm a bit confused. Sorry for making a buzz. |
Godot version
4.0.alpha (1847094)
System information
Fedora 36, GeForce GTX 1080 (NVIDIA 510.68.02)
Issue description
Importing a Radiance HDR image for use in a PanoramaSkyMaterial freezes the editor. Note that the initial texture import doesn't freeze the editor. It only freezes when you load the texture in the PanoramaSkyMaterial's Panorama property, which detects the texture as being used in 3D and causes a reimport with different options.
This doesn't occur in 3.4.4.
As a workaround, disable automatic VRAM texture compression when 3D use is detected by setting the Detect 3D > Compress To option to Disabled:
Steps to reproduce
.hdr
image within the PanoramaSkyMaterial's Panorama property.Minimal reproduction project
test_hdri_use_in_3d_freeze.zip
The text was updated successfully, but these errors were encountered: