-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Add tips detection to auto mapping in bone mapper #90050
Conversation
a179e46
to
2483ebb
Compare
Added some more test files which do not contain any mesh. I am skeptical of using mesh vertex-based approaches, since files such as these do not contain any mesh at all: I'll test the PR and see if I can offer any changes. |
Indeed it is little skeptical, but since BoneMap is reusable, so I think this implementation would be a not big problem. So it would work as a workaround to use a BoneMap generated for a model with a mesh in an animation file without a mesh, as long as they have the same bone name. |
From discussed with @lyuma, we think we can add a couple of decision points, so I will add them. So the steps with the following priority order should be used for estimation:
|
2483ebb
to
e297f79
Compare
Detection by the number of thumb children conflicts with detection from weights. Probably, given the existence of skeletons without skins, detection by the number of thumb children should be preferred. Therefore, I will adopt @lyuma's method overall, thanks. |
e297f79
to
119f2b5
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.
Reviewed on a call with fire. I think this is good. It can use more testing, but that's what beta is for.
What's important is this improves Mixamo and ReadyPlayerMe compatibility by adding a few heuristics, so I think it's fairly safe.
119f2b5
to
357741a
Compare
Co-authored-by: Lyuma <[email protected]>
b349fe6
to
9c3a1c0
Compare
Thanks! |
Fixes #89725.
GodotHumanoid does not have a metacarpal for fingers other than the thumb. To avoid assigning them incorrectly, it is necessary to assign from the ends. However, some models might have "Tips" or "Leaf" bones to provide length information, so assigning from the ends is problematic.
This PR, make auto mapping can detected Tips and the mapping will be offset when candidate bones for the fingers has the name Tip or Leaf, or if none of the meshes have weights bound to them.
If the joint count of fingers excluding the thumb is the same, if even one Tip is detected, it will be apply by all bones. This is because the ReadyPlayerMe model is weird since only the index finger tips has weight.This becomes a problem in cases where you intentionally have tips on only one finger, so if the number of bones is different, determine the tips individually. Still it may be a problem if the number of fingers is the same and you forget to bind only a specific finger, but I consider it is a rare case.Make the detection based on the name match and the number of children in the thumb method by @lyuma.