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

FBXLoader: Fix incorrect joint orientation for animated FBX models exported from Maya #29307

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

mwhirls
Copy link
Contributor

@mwhirls mwhirls commented Sep 3, 2024

Description

This PR fixes a bug where the rotation for joints on some FBX models from Maya were not being read correctly by FBXLoader. These models have both a non-default Euler order and have the "Joint Orient" option set on their joints. The rotation matrix for "Joint Orient" is stored in "PreRotation" in the FBX file and FBXLoader was erroneously using the Euler order for the regular joint rotation to read it.

Example model: WonkyWalk.fbx.zip

Before the fix:

Screen.Recording.2024-09-03.at.10.16.23.AM.mov

After the fix:

Screen.Recording.2024-09-03.at.10.15.38.AM.mov

@mwhirls mwhirls reopened this Sep 3, 2024
@mrdoob mrdoob added this to the r169 milestone Sep 5, 2024
@mrdoob mrdoob merged commit e20e8ae into mrdoob:dev Sep 5, 2024
20 checks passed
@Mugen87
Copy link
Collaborator

Mugen87 commented Sep 5, 2024

@mwhirls Since you linked #14903 I have tested the PR with the related Zombie asset ( WhiteClownSambaDancing.fbx). Unfortunately, it is still broken. So is #14903 a different issue or do I miss something?

@mwhirls
Copy link
Contributor Author

mwhirls commented Sep 5, 2024

@mwhirls Since you linked #14903 I have tested the PR with the related Zombie asset ( WhiteClownSambaDancing.fbx). Unfortunately, it is still broken. So is #14903 a different issue or do I miss something?

Ah, that must be a different issue then. I linked it because I thought it could possibly be related, but my team was testing with different models. I will remove the link here to avoid confusion.

@mwhirls mwhirls deleted the fix-fbx-joint-orient branch September 5, 2024 16:43
@pikilipita
Copy link

Does this also fix the blender exports issue?
#27907

@Mugen87
Copy link
Collaborator

Mugen87 commented Oct 1, 2024

The specific runtime error of #27907 does not appear anymore since r163 thanks to #27956. However, the animation is still incorrect. When you start it in the editor the cube simply disappears.

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

Successfully merging this pull request may close these issues.

4 participants