-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
Suggestion: increase the skinning weight limit per vertex from 4 to 8 #12127
Comments
The vertices of every finger (phalange) are controlled by 3 bones at max. |
@RemusMar the model is from Mixamo, and as I mentioned it does play correctly when loaded in other systems that don't have the vertex limit (SketchFab, 3D Max). Improperly applied skin modifier is not the issue. And in case, that's not what I'm trying to discuss here - I'm just using this model as an example for why increasing the vertex limit might be worth considering. |
It is a big issue. |
For the sake of completeness: https://discourse.threejs.org/t/is-the-limit-of-4-skinning-weights-per-vertex-a-hard-limit-of-webgl/801 |
My 2[insert your currency].
I would suggest looking into re-weighing the skin instead of adding more influencing bones as a first solution. |
Thank you for the feedback. Unfortunately as I mentioned this isn't an option, even though it's the obvious solution. I haven't found any way of importing Mixamo models into Max or Blender and re-exporting them for use in three.js without causing massive corruption. They end up looking like they stepped out of Beetlejuice |
However, what you are saying about about 4 weights per phalange makes sense. So I'm coming round to the idea that this is either bad weighting from Mixamo (which I think is unlikely, since I have searched quite a bit on this topic and haven't found anyone else complaining), or an unrelated bug in the FBXLoader. Neither of which are related to the issue of raising the vertex weight limit so I'l do some more research and if I come up with anything I'll open a separate issue. But I'll leave this open since it doesn't look like this limit has been reconsidered since it was first introduced. I think it's valid to discuss it a little further. If other people think the limit should remain at 4 though I won't complain if this gets closed. |
I no longer think my issues are caused by the vertex weighting, it's more likely related to undefined pose node IDs as in #12398 |
I'm opening this as a point of discussion - I have not been able to find any technical reason for this limit aside from performance and the ease of using single Vec4s for weights and indices. Going through the code base here it seems like the limit was set many years ago when skinning was first introduced to three.js, so perhaps it's time to revisit it.
I've run into issues with several models that I am not able to edit which have more than 4 weights per vertex (specifically, all models downloaded from Mixamo). When loading them in three.js the extra weights are deleted, resulting in errors in the animation. Loading the same models in Sketchfab results in the animation playing correctly, so it must be possible to support more than 4 vertex weights in WebGL.
For reference here is the difference in the animation (note the position of the fingers). In Sketchfab (correct)
and the same model loaded in three.js (incorrect)
Here is the model. The error is especially obvious with this example, however most Mixamo models show similar minor errors (head wobbling, splayed fingers, minor jitter etc).
victory_2_30fps.zip
With regards to editing the model to remove the extra vertex weights manually - I'm not sure this would be possible without a lot of work on the animation, but even so I have tried loading the models into 3DS Max and Blender and re-exporting for use in three.js using a few different methods (FBX, Collada, JSON). In all cases the model gets completely corrupted and is unusable so that is not an option.
The text was updated successfully, but these errors were encountered: