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

FBX: Fix handling missing skins using ufbx importer #91526

Merged
merged 1 commit into from
May 4, 2024

Conversation

bqqbarbhg
Copy link
Contributor

Previously, _asset_parse_skins() would mess with the order of skin indices. However, the rest of the code expected these to match to ufbx skin indices. To fix this, retain the original skin indices in FBXState::original_skin_indices.

This issue was visible in for example in the file https://ufbx-dataset.b-cdn.net/local/hana/hana.fbx,
where using the ufbx importer the hair and shoes were missing:

FBX2glTF
FBX2glTF

ufbx
ufbx

This PR also tightens the valid skin condition to include fbx_skin->weights.count > 0, meaning the skin must have at least a single weight. This seems to be consistent with what FBX2glTF is doing.

Previously, _asset_parse_skins() would mess with the order of skin indices.
However, the rest of the code expected these to match to ufbx skin indices.
To fix this, retain the original skin indices in FBXState::original_skin_indices.
@bqqbarbhg bqqbarbhg requested a review from a team as a code owner May 3, 2024 17:50
@AThousandShips AThousandShips added this to the 4.3 milestone May 3, 2024
@AThousandShips AThousandShips requested a review from lyuma May 3, 2024 17:58
Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

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

@lyuma looks good to me.

@fire fire mentioned this pull request May 3, 2024
13 tasks
@akien-mga akien-mga merged commit 4313524 into godotengine:master May 4, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

4 participants