Skip to content
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

Non uniform scale warning on generated PhysicalBone3D #77575

Closed
rcorre opened this issue May 28, 2023 · 11 comments · Fixed by #82933
Closed

Non uniform scale warning on generated PhysicalBone3D #77575

rcorre opened this issue May 28, 2023 · 11 comments · Fixed by #82933

Comments

@rcorre
Copy link
Contributor

rcorre commented May 28, 2023

Godot version

4.0.2

System information

Linux

Issue description

The "Create Physical Skeleton" option for Skeleton3D generates some PhysicalBone3D object with non-uniform scale. This shows a warning in the editor, and the scale cannot be manually adjusted (though the scale appears to be uniform in the editor).
1685280836

Steps to reproduce

  1. Open a .glb model with a Skeleton
  2. Select "Create Physical Skeleton" from the Skeleton menu
  3. Note there are no warnings on the generated bones
  4. Save and close the scene
  5. Reopen the scene
  6. Note that some PhysicalBone3D nodes have a "non-uniform scale" warning
  7. Check the scale on those nodes, note that it shows 1,1,1 in the editor (but with a reset icon)
  8. Click the reset icon, nothing happens
  9. Check the AnimationPlayer, confirm there are no tracks for scale

Minimal reproduction project

example.zip

@ThunderBear2006
Copy link

ThunderBear2006 commented Jun 25, 2023

I also have encountered this error, as a work around, if you press the unlink button (The chain symbol under the reset button) and reset the scale the reset icon disappears and it fixes the issue (or did for me) however the warning symbol still remains

Edit:
This seems to work for some bones but not all bones

@jbromberg
Copy link

I'm also encountering this issue with a scale of 1,1,1 on the physical bone nodes

@Calinou
Copy link
Member

Calinou commented Oct 6, 2023

cc @aaronfranke

@aaronfranke
Copy link
Member

Screenshot 2023-10-06 at 3 14 56 PM

The reset icon at the top-right of the scale field indicates that the scale is, in fact, not equal to 1. It's just close enough to 1 that the editor displays it as 1. For "Physical Bone UpperArmL", the difference is actually visible:

Screenshot 2023-10-06 at 3 18 18 PM

As for a fix to this issue, perhaps the code transferring the transforms from the bones to the PhysicalBone3D nodes should orthonormalize the transform.

@pgrenon1
Copy link

I'm also getting this issue in 4.1.1. The warning does not go away after resetting the scale of the transforms.

If I understand correctly, it looks like Godot shows the actual value as a tooltip when you hover over the field like so:

image

But for the scale of these bones, the transforms' scales seem to all be set to 1.

Godot_v4.1.1-stable_mono_win64_0Kv1KOUbyW.mp4

System Info: Godot v4.1.1.stable.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated Radeon (TM) RX 480 Graphics (Advanced Micro Devices, Inc.; 31.0.21018.6011) - AMD Ryzen 5 3600 6-Core Processor (12 Threads)

@aaronfranke
Copy link
Member

@pgrenon1 The warning may also appear when the transform is sheared, or when a parent's transform is scaled/sheared.

@pgrenon1
Copy link

@aaronfranke Thanks for the answer! I don't know what this means though :P How do I unshear it?

@aaronfranke
Copy link
Member

aaronfranke commented Oct 10, 2023

@pgrenon1 You should be able to get rid of any shearing by setting the rotation to any value (just force it to update). Godot doesn't have code to preserve shearing when rotating, so setting any rotation should discard the shearing (if any). But anyway, you have a reset button on the scale that isn't going away when clicking, so I think the scale is actually not 1, the inspector's number text is lying to us, and also it's not letting you change the transform (probably because it's still copying the data from the skeleton).

@mynameisgump
Copy link

Also having this problem when importing from blender and creating a physical skeleton:
Screen Shot 2023-10-24 at 9 10 59 PM
doesn't go away when hitting the reset button either

@aaronfranke
Copy link
Member

@mynameisgump Does #82933 fix the problem for you?

@mynameisgump
Copy link

@mynameisgump Does #82933 fix the problem for you?

Had just commented that it didn't work but realized I forgot to switch branches when testing 🙃

After compiling and running the warning doesn't seem to appear anymore, so I think it fixed the problem:

Screenshot 2023-10-25 at 12 20 58 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants