-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
GLTFLoader: Skinned meshes distorted #15319
Comments
PR #15314 removed the call to |
Um, I think I would add it back for now. We can still remove the call of this method at a later point. |
What's wrong with these models? They look correct to me 😜 Instead of adding the |
Sorry for the breakage but that part of the library sure needs some love 🙂 |
👍 |
GLTF spec says:
The side-effect of normalizeSkinWeights is that models with UNSIGNED_BYTE normalized=true weights are broken because the normalization divides all weights by ~255. I'd like to fix this but I'm not 100% sure how. As far as I'm concerned, the call to normalizeSkinWeights is a hack that should be removed, because the models that render incorrectly violate the GLTF spec. But obviously if I just submit a PR that removes this, the "bug" will re-appear. Re-normalizing 8-bit weights is a bit painful and (IMO) unnecessary, again, due to spec enforcing this. We could skip renormalizing unless the weights are floating-point? I'm happy to submit a PR that fixes the issue, but I'd like to understand what's the best solution first. |
Thank you @zeux! I'd be happy to see that It will help for glTF validator to begin warning about incorrect skin weights (KhronosGroup/glTF-Validator#58), both so that users can diagnose this and so existing exporters will fix bugs. Once that happens, I'm OK with removing this use of /cc @bghgary should glTF-Asset-Generator cover skin weights with different component types? /cc @lexaknyazev |
I have a patch that only normalizes floating-point weights, will submit a PR momentarily. Seems like a reasonable compromise. |
You mean like this? 🤔 |
Exactly like that, thanks! Guess I need to go through those tests more closely. 😅 |
Description of the problem
I've realized that certain glTF models like the small robot or the cesium man look distorted in
dev
. Could this be related to the latest changes toSkinnedMesh
?Check out the hands of the robot:
https://raw.githack.com/mrdoob/three.js/dev/examples/webgl_animation_skinning_morph.html
and the torso of the cesium man:
https://raw.githack.com/mrdoob/three.js/dev/examples/webgl_loader_gltf_extensions.html
The skinning example of
FBXLoader
andColladaLoader
looks fine. Same for the webgl_animation_skinning_blending which usesGLTFLoader
.Three.js version
Browser
OS
Hardware Requirements (graphics card, VR Device, ...)
The text was updated successfully, but these errors were encountered: