godotengine / godot

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

Error while importing blend file and texture #74570

Closed mediumgoose closed 1 year ago

mediumgoose commented 1 year ago

Godot version

4.0 Stable

System information

Windows 10, AMD Ryzen 5 3600 6-Core Processor, x64, NVIDIA GeForce RTX 2060 (I think Vulkan)

Issue description

EDIT: The blend file and texture file were in a folder inside of my blender directory. Having the files inside the Godot project file, and opening the files from there to work on them / save them, makes it work as expected. I'm sorry for not realizing this sooner. I'm not sure how to close this.

Importing a blend file with a texture shows this error:

--- Debugging process stopped --- No loader found for resource: res://textures/cube_texture.png. Can't find file 'res://.godot/imported/cube-872180318f08982aecd5834ac734b268_cube_texture.png'. No loader found for resource: res://.godot/imported/cube-872180318f08982aecd5834ac734b268_cube_texture.png. modules/gltf/gltf_document.cpp:3276 - glTF: Image index '0' couldn't be loaded with the name: cube_texture. Skipping it. res://textures/cube_texture.png: Texture detected as used in 3D. Enabling mipmap generation and setting the texture compression mode to VRAM Compressed (S3TC/ETC/BPTC).

Steps to reproduce

Create new Godot project. Confirm in editor>editor settings>filesystem>import that the blender 3 path is correct. Create 3dNode, rename to Main, Save main.tscn, set main.tscn as main. Go to Blender. Unwrap default cube. Create texture. In Material, set base color to image texture. Open texture you had created. Save image. Pack files. Save blend file. In Godot, drag and drop the .blend file to the resource folder.

It will import the blend file to res://. It will import the texture to res://textures/.

Importing will show this error:

--- Debugging process stopped --- No loader found for resource: res://textures/cube_texture.png. Can't find file 'res://.godot/imported/cube-872180318f08982aecd5834ac734b268_cube_texture.png'. No loader found for resource: res://.godot/imported/cube-872180318f08982aecd5834ac734b268_cube_texture.png. modules/gltf/gltf_document.cpp:3276 - glTF: Image index '0' couldn't be loaded with the name: cube_texture. Skipping it. res://textures/cube_texture.png: Texture detected as used in 3D. Enabling mipmap generation and setting the texture compression mode to VRAM Compressed (S3TC/ETC/BPTC).

Create new inherited scene from cube.blend. Paint on texture in blender; save image, pack file, save blend, and check back in Godot. Open and close scene, blend, and texture. Reimport. Nothing shows any update of the newly-painted texture. (I check in between everything; so, when I open and close I check; when I re-import I check.)

Minimal reproduction project

I have included a Godot project with the blend file imported, and the blend file. You can draw in the blend file and see if the Godot project updates. Also, you can completely delete the cube scene, blend file, and texture from Godot and re-import the blend file if you want to test the import.
Cube Godot and Blender Files.zip

Jummit commented 1 year ago

This is a duplicate of #74037

YuriSizov commented 1 year ago

Thanks, consolidating then!