godotengine / godot

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

Using "Files" storage for meshes when importing gltf files causes only the first instance of a mesh to reference the mesh file (fixed in `master`) #49990

Open Arnklit opened 3 years ago

Arnklit commented 3 years ago

Godot version

3.3.2.Stable

System information

Windows 10. OpenGL ES 3.0 Renderer: Intel(R) UHD Graphics 620

Issue description

Using "Files" storage for meshes when importing gltf files causes only the first instance of a mesh to reference the mesh file. The remaining mesh instances will still have resources pointed at the gltf file.

image image image

Steps to reproduce

  1. Set up a file with multiple objects referencing the same mesh in Blender.
  2. Export to GLTF.
  3. Import and set mesh storage to be files.
  4. Open new inherited version of gltf and select the different meshes to see what resource they are pointing to.

Minimal reproduction project

separate_mesh_import_bug.zip

fire commented 3 years ago

Does this happen for collada or obj (when loaded a scene instead of mesh mode)

Arnklit commented 3 years ago

The issue appears to be the same on Collada. I don't think you can compare obj as that seems to just output everything as a single simple mesh

Arnklit commented 2 years ago

Tested this in Godot 4 and it's fixed there. I guess the importer is completely different there.