KhronosGroup / KhronosGroup/glTF
Stricter Skinning Requirements
- Dominant language
- HTML
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 17h 26m
- Merged PRs (30d)
- 5
Description
After messing around with the gltf spec and various engines, I feel there are quite a few cases with the current specification that make it extremely difficult for most importers to handle with their own internal rendering engines. Either this leads to a bunch of extraneous work and guessing on the importer side, or leads to duplication of data by the exporters.
Here are some ideas that I believe could tighten up the specification:
1) The skeleton root should be defined, otherwise the direct parent of the highest joint in the skin hierarchy must be used. The direct parent does *not* have to be a joint, to allow for multi rooted skeletons. Note that the direct parent may be the root, but it should *not* be the root as it was before when the skeleton property was undefined.
2) All joints in a skin *must* form a connected subtree with the skeleton root/direct parent (1)
This means there lie *no* non joints (or other skins joints) as connecting joints between skin joints. This however still allows you to have other nodes attached to joints, as long as no subsequent joints of the skin follow.
A lot of engines treat the skeleton/skin as a single entity, and allowing for non joints embedded in the tree of joints makes the engine have to create a bunch of shadow bones to get things to work properly.
3) A mesh can only bind to a single skin
I know this is pretty implicit, but I believe it should be defined.
4) As a per previous discussion here: https://github.com/KhronosGroup/glTF-Blender-IO/issues/566#issuecomment-523584953
All meshes skinned must be normalized to the local space of the skeleton.
Now I have another requirement that I am torn between two options: (5) and (6)
5) Each joint shall belong to only one skin
This is the ideal choice as it makes things extremely simple for importers as they do not need to resolve/union skinning trees to find the master skeleton/skin (see below)
6) Each skin shall either define a new tree of unused joints, or, explicitly be a subtree of a previously defined skin.
This allows for multiple skins per skeleton, but the subtree definition implies that all skins for a single skeleton must have a "master" skin that holds *all* of the joints for a skeleton. This makes it easy for an importer to map smaller skin definitions to a master skeleton containing all the joints.
Contributor guide
Research direction
Start by reviewing the glTF specification and the linked glTF-Blender-IO discussion. Resolve whether requirements 1–4 and either 5 or 6 should be adopted, then update the specification with testable skinning rules and a clear completion decision.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100