Skip to content
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 image as Texture2DArray does not work and produces errors. #72573

Open
pbaja opened this issue Feb 2, 2023 · 4 comments
Open

Importing image as Texture2DArray does not work and produces errors. #72573

pbaja opened this issue Feb 2, 2023 · 4 comments

Comments

@pbaja
Copy link

pbaja commented Feb 2, 2023

Godot version

v4.0.beta17.mono.official [c400205]

System information

Windows 11, Vulkan, Forward+, RTX 3060 Laptop

Issue description

After trying to import the texture as an array, I get the following errors in the console:

  • servers/rendering/renderer_rd/storage_rd/texture_storage.cpp:808 - Condition "p_layers[i]->get_format() != valid_format" is true.
  • Attempting to use an uninitialized RID
  • servers/rendering/renderer_rd/storage_rd/texture_storage.cpp:1306 - Condition "!tex" is true.
  • Attempting to use an uninitialized RID

Trying to preview textures in the inspector repeats the error:

  • Attempting to use an uninitialized RID

What I have tried

  • Restarting the editor
  • Reimporting the image again
  • Switching to another format and going back
  • Creating a new fresh project

Steps to reproduce

  1. Drag and drop an image (png) to the FileSystem
  2. Select the image and in the Import tab change "Import As:" to Texture2DArray
  3. Click on "Reimport"
  4. Confirm to Save, Re-Import, and Restart
  5. After restarting the editor, select the image by double-clicking it

Update

After changing Compress:Mode to VRAM Compressed (It was set to Lossless), checking High quality, and restarting the editor (only reimport did not fix it) it imported the textures correctly!

@clayjohn clayjohn added this to the 4.x milestone Feb 2, 2023
@acegiak
Copy link

acegiak commented Feb 19, 2023

Using the workaround listed under Update here causes an issue where exported projects crash on load with an error saying that the resource hasn't been imported. This can be fixed by setting Compress:Mode to VRAM Uncompressed.
Texture2DArray Test Project.zip

@ventaur
Copy link

ventaur commented Apr 8, 2023

As of v4.0.2.stable.official [7a0977ce2], I am not experiencing crashes or errors regardless of compression settings. However, the moment I change a resource's import settings to Texture2DArray and reimport (as well as confirm the need to save and reload the editor), the file is no longer visible in its folder and the folder itself now shows the import settings. Oddly, the folder's import settings also show the resource's file name.

image

@Calinou
Copy link
Member

Calinou commented Apr 8, 2023

@ventaur
Copy link

ventaur commented Apr 15, 2023

I wanted to come back and mention that I do not see the behavior I posted about above when I run v4.1.dev.custom_build [c8a13c2c8] from source. The file is again visible in its folder as expected. So this appears to be fixed in the latest code on master.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants