-
-
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
Scale doesn't reset when undoing a rotation with non uniform scale bones in Skeleton3D #84249
Comments
Can you please try this with a supported version, like 4.1.2 (only the latest patch version is supported, and it might already be fixed) |
As shown in the video below, I think I found a solution to the "undo" issue, but there's something more serious going on here. (Note: I flattened the torso a lot to exaggerate the effect here. The more the scaling, the greater the effect of the propagated error.) 2023-11-10.20-38-04.mp4If the behavior we're trying to achieve is localizing the non-uniform scale to bones higher in the hierarchy without affecting children than I think there's a little extra work to do. I don't mind looking into this further. Edit: Is what we're trying to achieve something akin to "Flat Stanley"? Where we can scale a bone non-uniformly and have all of its children bones inherit this property, but then keep the bone lengths the same? For instance, a character flattened in one dimension could bend its flattened arms into other dimensions and maintain their flatness relative to their original flattening? (Sorry I'm having a hard time wording that better.) |
Related godotengine/godot-proposals#4190. I believe one of the solution to this is #83903 (comment). I will put it in a proposal later but I am currently working on another task so please wait a little while.
Probably there is a problem of normalization in bone, but I guess #83903 (comment) works as a workaround. |
@bbqbarbhg developed a way to emulate the two modes mentioned in ufbx for godot engine. Can you describe how they work? |
Not sure if it applies here, but the scale compensation by undoing parent scale as in #4190 will break for non-uniform scaling. What I did in ufbx is to add auxiliary in case animated or non-uniform scaling is used. The scale of the parent node is moved into a helper:
To make this work you still need to modify the translation of If a native non-scale-inheriting bone mode would be implemented it would benefit the ufbx importer as well, as the workaround has the above caveat and some others caused by using external animation library assets. FBX also contains a mode that propagates the scale without shearing, but it is so rarely used that it's not worth implementing into a generic skeleton in my opinion. |
The previous link was godotengine/godot-proposals#4190 |
This comment was marked as resolved.
This comment was marked as resolved.
#92012 was merged to fix this. Can you try? |
I tested a build with #92012 and further changes and it seems to be fixed. Did not narrow down the list of changes though. |
Thanks for your bug report, as far as I can tell it's fixed, but feel free to comment if it's still broken. |
Godot version
v4.1.1.stable.mono.official [bd6af8e]
System information
Godot v4.1.1.stable.mono - Windows 10.0.19044 - Vulkan (Forward+) - dedicated AMD Radeon RX 580 2048SP (Advanced Micro Devices, Inc.; 31.0.12027.9001) - Intel(R) Core(TM) i5-10400F CPU @ 2.90GHz (12 Threads)
Issue description
If the parent of a bone is of non uniform scale (anything other than 1), then the bone scale of the child will change when rotating it, this is actually normal behaviour to keep the proportions as far as I am aware, but the issue is when you undo the rotation (in case of a mistake), the editor will revert the rotation but will not revert the scale, which can lead to models eventually looking "distorted" if you don't notice it at first.
Example Screenshots:
Here is the skeleton with the torax bone having a non uniform scale, look at the scale of the arm and compare it in the following screenshots:
Now with rotation applied to the arm, the scale has changed. The scale does not change in uniform scale bones but as far as I am aware this is normal behaviour to keep proportions consistent.
Now here is the issue: if you undo, the rotation will revert back, but the scale will not. Eventually, it will add up and distort the model.
In the example project I included both an uniform and non uniform variant of the same skeleton so you can compare the results.
Steps to reproduce
Minimal reproduction project
Skeleton Scale Issue.zip
The text was updated successfully, but these errors were encountered: