-
Notifications
You must be signed in to change notification settings - Fork 319
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
Importer does not ignore transform of skinned mesh #368
Comments
Hello, Can you please provide a complete glTF or glb file that have this issue? Thanks |
This sounds like a possible mistake on the part of the exporter... from the glTF spec:
In the example above, I don't think either of the rotations should be applied. See KhronosGroup/glTF#1285 and KhronosGroup/glTF#1403. |
I can provide a sample where this is a problem, but I think with the note above by @donmccurdy , the problem may instead be with applying any transform and with the exporter (not Blender, in this case.) I will verify this is an issue tomorrow and post an example. Also, with this limitation in mind, it seems that the exporter may need to ensure that all transforms are applied to skinned meshes before export, or there will be unexpected results. Thanks for the replies. |
OK, now that I have learned that the transform SHOULD be ignored on skinned meshes, I am revising the issue. The problem is that the importer does NOT ignore the transform on the first skinned mesh attached to a skin (strangely, it does ignore it on all subsequent skinned meshes attached to the same skin.) When viewing with Microsoft 3D viewer, this is how it looks (correct) with the transform ignored on the skinned mesh: When importing it into Blender, this is how it looks (incorrect) as the transform is not ignored: Here is the offending bit of JSON: {
"mesh" : 0,
"name" : "Cube",
"rotation" : [
0.5,
0.5,
0.5,
0.5
],
"skin" : 0,
"translation" : [
0,
1,
0
]
}, And here is the test file: |
On import, if multiple nodes / meshes share a skin, the transform matrix and TRS are ignored on all except the first. For example, if the GLTF json code is like this:
Then the first node (in this case, node_0) will have the rotation added on import, but the second will not. This causes incorrect skinning.
The text was updated successfully, but these errors were encountered: