-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Skinning influenced by more than 4 joints #1381
Conversation
A brief description of what happens in the event that skins are influenced by more than 4 joints
Cool, thanks @broughtong! @lexaknyazev or @bghgary? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somewhat related to #1352.
/cc @donmccurdy
Looks good! OK with me to merge this, #1352 does not conflict. |
Should we reiterate that only one set must be supported by implementations as stated in the mesh attributes section?
Other than that, looks good to me. |
Sure I could just append something to the end:
Do you think that this then in turn requires mentioning that doing so may have an affect on the final animation (as mentioned by McNopper in #1352)? Something like:
I guess this might be a mute point though as it's already self evident that if the client doesn't support the additional data sets present in a file then the animation necessarily wont be exactly the same, but it can be left to the client to handle this (ignore, warn etc). What's your opinion on this? |
The note above looks good to me. The spec cannot require any specific runtime behavior for unsupported features. |
Ok I've added the note and ready for another review. |
"may have an impact" is vague enough to be safe, I am OK with merging this. Whether we can require runtime behavior for unsupported features or not, would we have a preference? E.g. ignoring the skin with a warning seems preferable to a distorted animation, yes? It is at least easier to debug. Asking as an implementor. 😅 |
There's no way to quantify just how much impact it will have visually on the final animation, so I think what the implementations then do depends on what their use case is. Additional joint influences could have (close to) zero impact particularly for small translations, so it may not be worth ignoring the entire skinning information. On the other hand a rotation that's not quite right near the root could seriously throw off the entire animation sequence. I would say generally from what I've seen they tend to be the former, but certainly that may not be the case for everyone. |
We discussed this during the WG call today and agree to merge this. |
Is it a requirement for implementations that only support 4 joint weights to pick the 3 with largest weight, and re-normalize? Is this is already in the doc? |
There is no such requirement in the spec. We said during the call that there is no easy way to pick the largest 4 and still have a meaningful result. (Someone correct me if I misspoke) |
Yeah that might indeed be the case. One would have to find a new set of weights and indices that minimises the error across all animation clips I guess... I do think this error would be smaller when sorting by weight, but it might not be the best solution. Needs some math ;-) |
@ziriax We've discussed the idea of pre-sorting joints by weight (per-vertex) but even in that case visuals will likely be broken anyway. |
A brief description of what happens in the event that skins are influenced by more than 4 joints