-
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
No documentation on calculating global joint transformations #1630
Comments
Calculating the global transform is a standard procedure. Every node in the scene has a transform calculated using the rotation, translation and scaling of the node. This transform is sometimes called "the local transform" The global transform of a node, also called "the world transform", is just the local transform of the node, multiplied by the world transform of its parent. So essentially, a node has both a local and a world transform. The skinning system just states that you should use the world (global) transform of the node, not the local transform. |
Cf #1035. |
As vpenades mentioned above: The phrase "global transform of a node" basically means: "The product of all local transforms on the path between the root and the respective node" - that's also how it is explained in https://github.com/javagl/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_004_ScenesNodes.md#global-transforms-of-nodes (and in the quick reference sheet / overview). Could a minor rewording solve the issue? :
(In the nodes section, making it bold to make clear that this is a coined term) ...
(In the skinning section, saying "the" instead of "a", and also making it bold) Otherwise, it could be rephrased (in the overview and tutorial) to something like
|
@scgehin The overview contains the statements
and
Do you think that making the words "global transform" bold (and thus, making them a "coined term") could resolve the issue? Otherwise, any hints about how to resolve this issue would be appreciated. |
A global transform AKA world transform, is the matrix that transforms a mesh to world space. A local, or relative, transform is the transform of a node relative to its parent node (if any). Typically a scene graph node stores its local transform, and you calculate its world/global transform by concatenating the local transforms of every node down to the root node/scene. @javagl these are very basic operations when dealing with scene graphs in 3D space, that is, converting from local to world and from world to local, and they're not specific of glTF, but a standard in the 3D industry, and available in pretty much every 3D format that has a scene graph. That's why I guess nobody considered adding documentation for it. |
@vpenades That was roughly what I thought, but I'd hesitate to close this issue iff there is something in the spec that should be clarified, or something in the overview that should be improved. But unless there is further activity, recommendations or comments, I'd close this issue soon. |
Both global and joint-specific node transforms have been clarified in the AsciiDoc spec release. |
The quick reference sheet, specification readme, and tutorial all fail to mention how to calculate the global joint transformations. This has caused me a lot of trouble that could have been easily avoided.
The quick reference sheet only states "For each node whose index appears in the joints of the skin, a global transform matrix can be computed." This is extremely unhelpful. The other two resources I mentioned fail to mention the global joint transforms at all.
I'd greatly appreciate it if the quick reference sheet at the very least could explain how to calculate it properly.
The text was updated successfully, but these errors were encountered: