Open prominentdetail opened 11 months ago
https://github.khronos.org/glTF-Validator/ suggests this is an invalid file
Doing a roundtrip by opening in blender and then saving a game creates a valid file.
The errors seem to be incorrectly defining mesh animations.
I imported and exported from the three.js editor https://threejs.org/editor/ and it still gives me the same errors in the gltf-validator. So I'm not sure how to change the exported data to be any different. Other programs load the animations just fine, so maybe Godot should improve their importer. I'll try to keep looking into it though.
Here is a gltf file that is valid but still exhibits the same problem: animationtestgodot2.zip
how it should look:
how it looks in godot:
I'll continue investigating..
Ok, I think I managed to fix it. When I place the skinned meshes into another object and animate those objects instead of the skinned mesh, then it imports fine. I'm going to still try and learn more about it, but I think that was the issue (animating skinned meshes).
I'm not sure if I've sorted it out yet. I can't tell if it is a godot issue or my exporter issue yet. Godot seems to be adding extra nodes for the skinnedmesh. Or maybe its my exporter- I'm not sure.
Edit: Seems like I sorted out that. I had to make the root bone in the skeleton a child of the parent object (not the skinnedmesh). Now godot doesn't create extra nodes when I import it.
Tested versions
v4.2.2.rc.custom_build [f54e666c2] and v4.3dev1
System information
windows 10
Issue description
The imported gltf doesn't import animation/skeleton correctly. If you play the animations(there is idle and walk) in windows 3d viewer it loads and plays fine, but in godot it doesn't
windows 3d viewer:
godot:
It appears like the objects that the bones are attached to aren't being animated, but the bones are.
Steps to reproduce
import this gltf: characterVid.zip
Minimal reproduction project (MRP)
characterVid.zip