-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
gltf export: Fix export of skeletons and skins. #53114
Conversation
Some minor problems with variable shadowing and documentation has been modified causing CICD to break. |
Exporting blend shapes as not reset to default causes the face blendshapes to explode. |
09c403e
to
1f3fe06
Compare
I have made some additional fixes to blendshapes. They should no longer have such glitches, hopefully. This should now be in a mergable state. |
Create GLTFSkeleton at the same time we create GLTFNode objects. Create GLTFSkin at the same time we export MeshInstance3D Fixes export of blend shape arrays for meshes with multiple surfaces. Fixes array indexing issues in export of glTF morph target animations. Converts BoneAttachment3D nodes during normal node creation: this avoids special cases during mesh export, and especially exporting skeletons or meshes which are children of BoneAttachment3D. Co-authored-by: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
1f3fe06
to
5ffda27
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Passes all the CICD tests.
- Blend shapes export and https://github.com/lyuma/godot-tests/tree/add_glb worked.
- Passes my double fox test. Which is a scene with two fox.glbs instanced.
Thanks! |
cc @fire
Create GLTFSkeleton at the same time we create GLTFNode objects.
Create GLTFSkin at the same time we export MeshInstance3D
Also, convert BoneAttachment3D nodes during normal node creation.
This avoids needing special cases during mesh export, and especially exporting skeletons or meshes which are children of BoneAttachment3D.
Should address some of issue #50020. I have not verified the fix, but the old code which dealt with Skeleton or Skin export was very broken so this should be a starting point for future GLTF fixes related to animated or skinned meshes.
This is still in draft state because some of my meshes with blend shapes (but not all of them) fail to load in Blender
Blender error "index 990 is out of bounds for axis 0 with size 990"
Other test cases include the reproduction case I call "Party Hat" since it has a skinned "Party Hat" with springbones attached to a BoneAttachment3D onto the Head bone of a character's Skeleton3D. It seemed to previously reproduce interesting issues on export.
There are a few other glTF files in my collection of cursed glTF models which I still need to test re-exporting, containing duplicate skins, nested skeletons (including cases where a mesh is its own bone), and so on.