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

Improve retarget auto-mapping algorithm #81843

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

TokageItLab
Copy link
Member

@TokageItLab TokageItLab commented Sep 18, 2023

In some cases, the model does not have Hips and Neck, but only a spine, as in the case of bones created with Blender's rigify.

image

The current auto-mapping requires Hips as a prerequisite, and if Hips cannot be guessed, everything fails. So this fix make it search for Hips candidates with "Spine" as the word with the lowest priority.

Also, make the Neck mapping be done after the Shoulder mapping. This will make sure that the Neck is guessed child of bone which the parent of the shoulder (or hand) cross with having "spine" name.

@TokageItLab TokageItLab added this to the 4.2 milestone Sep 18, 2023
@TokageItLab TokageItLab requested review from fire, lyuma and a team September 18, 2023 03:51
@TokageItLab TokageItLab marked this pull request as ready for review September 18, 2023 03:51
@TokageItLab TokageItLab added cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release cherrypick:4.0 labels Sep 18, 2023
@fire
Copy link
Member

fire commented Sep 18, 2023

I'll try to take a look, was busy with the fbx importer.

Copy link
Member

@SaracenOne SaracenOne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good, and the changes do seem to make the algorthim notably more effective on some troublesome rig setups.

@akien-mga akien-mga merged commit 10cf3d0 into godotengine:master Sep 26, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Jan 23, 2024
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.1.4.

@TokageItLab TokageItLab deleted the improve-automapping branch February 14, 2024 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants