godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.57k stars 20.4k forks source link

Error while importing GLTF file due to problem with texture #72197

Closed winston-yallow closed 1 year ago

winston-yallow commented 1 year ago

Godot version

v4.0.beta16.official [518b9e580]

System information

Windows 10 (10.0.19045 Build 19045) | Forward+ | Vulkan API 1.3.206 | AMD Radeon RX 6800 XT

Issue description

When opening the attached GLTF file (with textures set to extract), it produces an error. Reimporting it with textures set to embedded does work, but the surfaces with that texture are invisible. In Beta 15 the GLTF worked fine.

The error with default import settings is:

  Task 'reimport' already exists.
  editor/import/resource_importer_texture.cpp:336 - Condition "f.is_null()" is true.
  Cannot open MD5 file 'res://.godot/imported/_Tree Fruits_Byv7pfwHRTnbXRYGkIeo5gBshRHIRnwOAMnvTtyJN5sy4iqIYLkBW95H9irFDgBlQ5gl2LIgsQ7AFV0EQ4BQqxif40CWPthzH2w3rtxAMA0QcgChcgDmAHRHwHIUIQcAAFC2yiHCIEipAAAAAElFTkSuQmCC.png-dfad032756448f4c0361cdaeb9bf7b9b.md5'.
  Unable to open file: res://.godot/imported/_Tree Fruits_Byv7pfwHRTnbXRYGkIeo5gBshRHIRnwOAMnvTtyJN5sy4iqIYLkBW95H9irFDgBlQ5gl2LIgsQ7AFV0EQ4BQqxif40CWPthzH2w3rtxAMA0QcgChcgDmAHRHwHIUIQcAAFC2yiHCIEipAAAAAElFTkSuQmCC.png-dfad032756448f4c0361cdaeb9bf7b9b.ctex.
  Failed loading resource: res://.godot/imported/_Tree Fruits_Byv7pfwHRTnbXRYGkIeo5gBshRHIRnwOAMnvTtyJN5sy4iqIYLkBW95H9irFDgBlQ5gl2LIgsQ7AFV0EQ4BQqxif40CWPthzH2w3rtxAMA0QcgChcgDmAHRHwHIUIQcAAFC2yiHCIEipAAAAAElFTkSuQmCC.png-dfad032756448f4c0361cdaeb9bf7b9b.ctex. Make sure resources have been imported by opening the project in the editor at least once.
  Failed loading resource: res://_Tree Fruits_Byv7pfwHRTnbXRYGkIeo5gBshRHIRnwOAMnvTtyJN5sy4iqIYLkBW95H9irFDgBlQ5gl2LIgsQ7AFV0EQ4BQqxif40CWPthzH2w3rtxAMA0QcgChcgDmAHRHwHIUIQcAAFC2yiHCIEipAAAAAElFTkSuQmCC.png. Make sure resources have been imported by opening the project in the editor at least once.
  modules/gltf/gltf_document.cpp:3249 - glTF: Image index '1' couldn't be loaded with the name: Byv7pfwHRTnbXRYGkIeo5gBshRHIRnwOAMnvTtyJN5sy4iqIYLkBW95H9irFDgBlQ5gl2LIgsQ7AFV0EQ4BQqxif40CWPthzH2w3rtxAMA0QcgChcgDmAHRHwHIUIQcAAFC2yiHCIEipAAAAAElFTkSuQmCC. Skipping it.
  modules/gltf/gltf_document.cpp:3240 - Condition "err != OK" is true. Returning: err
  modules/gltf/gltf_document.cpp:7123 - Condition "err != OK" is true. Returning: ERR_PARSE_ERROR
  modules/gltf/gltf_document.cpp:6775 - Condition "err != OK" is true. Returning: err
  modules/gltf/gltf_document.cpp:7203 - Condition "err != OK" is true. Returning: err
  editor/editor_file_system.cpp:2004 - Error importing 'res://_Tree Fruits.gltf'.
  editor/progress_dialog.cpp:235 - Condition "!tasks.has(p_task)" is true.
  Task 'reimport' already exists.
  editor/import/resource_importer_texture.cpp:336 - Condition "f.is_null()" is true.
  Cannot open MD5 file 'res://.godot/imported/_Tree Fruits_Byv7pfwHRTnbXRYGkIeo5gBshRHIRnwOAMnvTtyJN5sy4iqIYLkBW95H9irFDgBlQ5gl2LIgsQ7AFV0EQ4BQqxif40CWPthzH2w3rtxAMA0QcgChcgDmAHRHwHIUIQcAAFC2yiHCIEipAAAAAElFTkSuQmCC.png-dfad032756448f4c0361cdaeb9bf7b9b.md5'.
  Unable to open file: res://.godot/imported/_Tree Fruits_Byv7pfwHRTnbXRYGkIeo5gBshRHIRnwOAMnvTtyJN5sy4iqIYLkBW95H9irFDgBlQ5gl2LIgsQ7AFV0EQ4BQqxif40CWPthzH2w3rtxAMA0QcgChcgDmAHRHwHIUIQcAAFC2yiHCIEipAAAAAElFTkSuQmCC.png-dfad032756448f4c0361cdaeb9bf7b9b.ctex.
  Failed loading resource: res://.godot/imported/_Tree Fruits_Byv7pfwHRTnbXRYGkIeo5gBshRHIRnwOAMnvTtyJN5sy4iqIYLkBW95H9irFDgBlQ5gl2LIgsQ7AFV0EQ4BQqxif40CWPthzH2w3rtxAMA0QcgChcgDmAHRHwHIUIQcAAFC2yiHCIEipAAAAAElFTkSuQmCC.png-dfad032756448f4c0361cdaeb9bf7b9b.ctex. Make sure resources have been imported by opening the project in the editor at least once.
  Failed loading resource: res://_Tree Fruits_Byv7pfwHRTnbXRYGkIeo5gBshRHIRnwOAMnvTtyJN5sy4iqIYLkBW95H9irFDgBlQ5gl2LIgsQ7AFV0EQ4BQqxif40CWPthzH2w3rtxAMA0QcgChcgDmAHRHwHIUIQcAAFC2yiHCIEipAAAAAElFTkSuQmCC.png. Make sure resources have been imported by opening the project in the editor at least once.
  modules/gltf/gltf_document.cpp:3249 - glTF: Image index '1' couldn't be loaded with the name: Byv7pfwHRTnbXRYGkIeo5gBshRHIRnwOAMnvTtyJN5sy4iqIYLkBW95H9irFDgBlQ5gl2LIgsQ7AFV0EQ4BQqxif40CWPthzH2w3rtxAMA0QcgChcgDmAHRHwHIUIQcAAFC2yiHCIEipAAAAAElFTkSuQmCC. Skipping it.
  modules/gltf/gltf_document.cpp:3240 - Condition "err != OK" is true. Returning: err
  modules/gltf/gltf_document.cpp:7123 - Condition "err != OK" is true. Returning: ERR_PARSE_ERROR
  modules/gltf/gltf_document.cpp:6775 - Condition "err != OK" is true. Returning: err
  modules/gltf/gltf_document.cpp:7203 - Condition "err != OK" is true. Returning: err
  editor/editor_file_system.cpp:2004 - Error importing 'res://_Tree Fruits.gltf'.
  editor/editor_file_system.cpp:2228 - Condition "!importer.is_valid()" is true. Continuing.
  editor/editor_file_system.cpp:2228 - Condition "!importer.is_valid()" is true. Continuing.
  editor/editor_file_system.cpp:2228 - Condition "!importer.is_valid()" is true. Continuing.
  editor/editor_file_system.cpp:2228 - Condition "!importer.is_valid()" is true. Continuing.
  editor/progress_dialog.cpp:235 - Condition "!tasks.has(p_task)" is true.

It should be mentioned that this model was created with blockbench.

Steps to reproduce

Import the attached GLTF file with default settings.

Minimal reproduction project

_Tree Fruits.zip

clayjohn commented 1 year ago

CC @fire @lyuma

fire commented 1 year ago

Posted https://github.com/godotengine/godot/pull/72201.