-
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
Node and skinning matrices #1035
Comments
Node hierarchy is a strict tree (each node can have only one parent, nodes can't form cycles). Scenes can list only root nodes. |
Ok, that makes sense. What about skinning matrices? Is there documentation on exactly how to compute them. We cannot get the skinning examples to work so we wonder whether we have the right math for them. |
Surprisingly, the spec here refers to the glTF-Overview, where I tried to cover this in some detail, based on my implementation for glTF 1.0. The most relevant part should be this... Although it refers to glTF 1.0, there should not have changed much for glTF 2.0, except for the The update of the overview (and the implementation) are still in progress. It would be good to know if there are any other changes, because I'm afraid that I won't be able to finish the implementation before the overview is due, leaving this uncanny feeling of not being sure whether the statements and computation in the overview are really correct.... |
I have implemented following the overview image. For some examples in the glTF Sample models I do not get the same results. The problem appears to be that the skinning matrices are incorrect. And that could be a concern as to whether the skinning matrices are either model or world space. |
The computation of the joint matrices indeed did not change much between glTF 1.0 and 2.0, so the image linked above still reflects what is also shown in the latest release of the overview, except for the Beyond that, skinning is indeed a bit tricky, with some potential for misunderstandings and implementation bugs. A discussion about implementation alternatives was in #1397 - it is a bit extensive and math-heavy at some points, but might bring some insights. There is also an issue collecting Skinning use cases and examples which may be starting point, at least for testing own implementations. If there are more specific questions, feel free to either ask them here, or create a dedicated new issue for the question. Specifically, if you have an implementation that "does not work", then showing some code or screenshots of the result might help. To test the implementation, you could use one of the sample models (RiggedFigure or CesiumMan so that we know what the result should look like. (The task to update/create a really minimal "SimpleSkin" example as a follow-up to #1558 is still on my TODO list. Until then, the glTF that is posted there already is a complete (embedded) glTF, and supposed to work in common viewers with the fix that was proposed in the issue discussion) |
@xelatihy Any updates here? (Specifically: Can this issue be closed?) Strongly related: #1504 and #1630 . Maybe we can converge and figure out where the spec has to be updated or extended. (BTW: I have added a PR for the |
The spec still does not contain any formula for how skinning should work. |
The nodes and skinning sections were clarified in the AsciiDoc spec release to address the OP questions. |
The spec is not clear on two main items.
In particular,
a. Since nodes can refer to each other in any manner, are the final world transforms unique for each node? Or can a node have two different world transform as it is references by say two different scenes?
b. Is a node a root node always or it depends on the skin?
c. For skinning, how are the world transforms for each joint computed, given the corresponding nodes transforms? There should really be a formula for this in the spec.
Have been debug skinning for a long time now and can get the glTF 2.0 examples to work.
Are those supposed to be following the spec?
The text was updated successfully, but these errors were encountered: