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

gLTF to FBX Conversion: FBX not skinning correctly #5526

Open
myles-genies opened this issue Apr 3, 2024 · 1 comment
Open

gLTF to FBX Conversion: FBX not skinning correctly #5526

myles-genies opened this issue Apr 3, 2024 · 1 comment
Labels
Bug Global flag to mark a deviation from expected behaviour glTF2.0 Bugs related to the glTF2.0 format

Comments

@myles-genies
Copy link

I am using impasse/assimp to import a gLTF into Maya by converting the gLTF to an FBX and then importing the FBX into Maya.

However, it looks like the FBX conversion process does not take into account both the bindpose set by the .bin file associated with the gLTF before building the skeleton according to the joint transforms defined in the nodes hierarchy of the gLTF file. That is, to achieve correct skinning, the skeleton should first be built according to the bindpose matrices; the raw mesh data can then be skinned to this bindposed skeleton, and then the skeleton transforms would be adjusted to those set in the nodes hierarchy.

Instead, it seems that the FBX conversion is picking the raw mesh data, but using the nodes hierarchy as the bindpose matrices instead of the ones stored in the binary buffer. As you can see, the mesh is not correctly aligned with the skeleton, and appears deformed:
image

This is compared to when I import the original gLTF into Blender, where the correct skinning is achieved:
image

TLDR: The correct reference frame data should be found in the binary buffer - this is what should be used for the LBS deformation calculation, and not the 'live' data transforms in the scene graph nodes.

I've added the gLTF file I used in the conversion process below. Let me know if you need any more info!
Avatar.zip

@myles-genies myles-genies added the Bug Global flag to mark a deviation from expected behaviour label Apr 3, 2024
@kimkulling kimkulling added the glTF2.0 Bugs related to the glTF2.0 format label Apr 25, 2024
@kimkulling
Copy link
Member

Thanks for the detailed PR! One question from my side:

So the animated data will not exported correctly, because the assimp-esporter is using the wrong data base on the node hierarchy, did I get it right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Global flag to mark a deviation from expected behaviour glTF2.0 Bugs related to the glTF2.0 format
Projects
None yet
Development

No branches or pull requests

2 participants