-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
.blend files import with incorrect base poses #64598
Comments
As mentioned in the other thread try 120 fps. |
Confirmed. We need to devise a way to make the bone attachments more deterministic. I would trial renaming to be the bone name. Edited: Can you provide a test project? |
Related by #61641? |
Ah, sounds like it's related. So it's an exporter issue? What's strange is I tried importing the .gltf file it created, and it was OK in blender. Perhaps the issue is just that the bone order changes and some of the bones retain their poses from the previous ID somehow? Seems this could still be an issue if the skeleton is modified if that's the case (though it would be a lot less frequent). |
Ok, so I've confirmed this is NOT an exporter issue. I was able to import the exported .gltf file just fine. In fact, the .blend file in a fresh scene imports correctly. The problem is that Godot is saving bone positions in the scene file which are messing with the imported blender/gltf file.
I'll see if I can separate this cleanly into an example project. |
Here's the example project file. I think, fundamentally, what the problem is, is that the editor does not update the model when reimporting, leaving the old version of the model in memory, and when the file gets saved, the old bone transforms overwrite the newly imported data. This combined with the bone indexes shuffling around, means we get wacky, random poses. |
I assume the shuffling of the bone ID is an exporter issue, not an importer issue, and that it was resolved in #61641 (comment). |
I got the latest gltf exporter from github, but it did not fix this issue. The bone shuffling amplifies the bug, since it randomizes the bone indexes, but the problem is that bone poses are being stored in the scene, so those poses override what's in the .blend or gltf file. EDIT: Correction: I don't know if getting the latest gltf exporter would have had an impact. I just realized the editor settings were pointed to an older version of blender (3.1), which I did not update. This has actually always been a problem with Godot when you have editable children enabled on an imported object and re-import. The data in memory overwrites the new import data and messes things up. It's just more prevalent in Godot 4, since that seems to be the intended workflow, instead of creating an inherited scene like you had to do in Godot 3. It's usually not a problem if you don't have the scene open. But if you have the scene open and re-import, it can break things. Perhaps forcing the scene to update with the re-imported data would fix it? (That'd also be nice so we don't have to restart the editor after every import to see the changes - related: #55420). |
This comment was marked as off-topic.
This comment was marked as off-topic.
I'm going to tentatively close this issue pending feedback from the original reporter. We believe it is fixed in 4.0rc3 please comment or reopen if you can still reproduce it. |
Godot version
v4.0.alpha.custom_build [2475393]
System information
Windows 10, GLES3, NVidia RTX 3080
Issue description
When importing a .blend file, sometimes the base poses are completely (or just slightly) off. Seems to be completely random, as I haven't tracked down what causes it to happen. Sometimes a thumb will be messed up. Sometimes the arms will be in a crazy pose. Animations will all be offset by this broken initial pose.
Examples:
Right arm is in the wrong pose. After a reimport, while changing nothing with the .blend file, sometimes other bones will have incorrect poses.
Here we can see one of the left fingers is off, the right foot is twisted, and the right hand is twisted. Also, the index for the weapon attachment changed from the hand to the head (see #64512 -- not sure if that's related).
Another reimport resulted in this, with both arms posed incorrectly.
Steps to reproduce
Re-save an imported .blend file, or go to the blend file in godot and reimport it. Reload the editor to ensure things update, and note that some bones might randomly have different poses.
Minimal reproduction project
Here's the .blend file I'm using. I have it in a tree like this, though I don't think it matters:
Edit: Here's a project that reproduces the issue: https://github.com/godotengine/godot/files/9457268/test_broken_blend_import.zip
The text was updated successfully, but these errors were encountered: