-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
3D Armature with BoneAttachment Glitches on Reimport #82466
Comments
Also tested on current master (545d1c0), the result seems also broken but in a slightly different way. Changes might be influenced by #81695 or something else. Almost looks like many left side bones of the model are more messed up for some reason, right side seems to match the new pose a bit better, Also possibly related: #64512 |
Hmm, I'm guessing this is a consequence of the newer dynamic reimport system. When reloading, it copies all properties of all nodes from the previous scene to the new one. This should be fine for the bone names even if the structure of the skeleton changes, but since the idx is generated programmatically and is a still a front-facing property, if this is getting overwritten and not being properly refreshed, I could see how it might cause a bug like this. Will investigate. |
Okay, when I wrote the reimport system, I added special NOTIFICATION_NODE_RECACHE_REQUESTED for instances like this. If I make the BoneAttachments respond to this notification and rebind themselves, this should hopefully fix this bug. |
Nope, still investigating. |
Okay, forcing the bone poses to reset seems to fix it. |
Godot version
4.1.1
System information
Windows 10 - Godot v4.1.1 - Vulkan(Forward+) - dedicated
Issue description
If a model with an armature AND with direct object-to-bone parenting (imported as BoneAttachment3D in Godot) is changed in blender and reimported, it can break instances of the model's armature under specific circumstances.
Use Cases: A character is rigged with an armature using vertex weights, except for a weapon parented to the hand bone, or a hat parented to the head bone.
Of Note:
Before:
After another BoneAttachement3D is added over head:
Steps to reproduce
Step 1: Import model to Godot. The model is then dragged into a scene AND "Editable Children" is toggled. If a model is turned into a "new inherited scene", the bug will occur without needing to toggle "Editable Children".
Step 2: In Blender, add another object that is parented directly to a bone. Export to Godot, overwriting the previous version.
Step 3: Upon importing, instances of the armature within scenes will bug out. Some bones will now be oriented in erroneous directions, and some previously existing BoneAttachement3Ds may no longer have the correct "Bone Idx" (1 value off if the new object precedes it in the hierarchy).
For simple reproduction, a project zip has been included which contains a README with instructions and models already setup to reproduce the bug. You will need Blender 3.6 to reproduce the bug. This bug has been reproduced with the following file types: .fbx, .gltf, .blend. For the sake of unified export options, this reproduction uses .blend
Minimal reproduction project
Bug Report Bone Attachement 3d.zip
The text was updated successfully, but these errors were encountered: