Skip to content
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

glTF 2.0: Change JOINT and WEIGHT to form [semantic]_[set_index] #878

Closed
McNopper opened this issue Mar 18, 2017 · 8 comments
Closed

glTF 2.0: Change JOINT and WEIGHT to form [semantic]_[set_index] #878

McNopper opened this issue Mar 18, 2017 · 8 comments

Comments

@McNopper
Copy link
Contributor

Sooner or later, having maximum 4 values of joints and weights will be not enough.

I am fine, that at this point of time, maximum of 4 values are only valid.

To be future safe, I suggest the form like for COLOR or TEXCOORD e.g. JOINT_0 and WEIGHT_0.

@McNopper McNopper changed the title Change JOINT and WEIGHT to form [semantic]_[set_index] glTF 2.0: Change JOINT and WEIGHT to form [semantic]_[set_index] Mar 18, 2017
@peteroupc
Copy link

peteroupc commented Mar 18, 2017

Note that this used to be the case in glTF 1.0, which provided (with emphasis added):

Attribute semantic property names can be of the form [semantic]_[set_index], e.g., TEXCOORD_0, TEXCOORD_1, etc.

In other words, the form [semantic]_[set_index] was available not just for TEXCOORD, but for every other attribute semantic, including JOINT and WEIGHT. I don't see exactly why this restriction of this syntax to TEXCOORD and COLOR was imposed in glTF 2.0.

@McNopper
Copy link
Contributor Author

Thanks for the info. So, actually, I want to have the restriction for JOINT and WEIGHT as well.

@lexaknyazev
Copy link
Member

@McNopper
Do you think that each 4 additional joints should use two more vertex attributes? There could be other ways to supply more joints (e.g., via packing).

Just for reference: three.js supports only 4 influences, BabylonJS can handle up to 8 (with two extra attributes).

CC @pjcozzi

@McNopper
Copy link
Contributor Author

I want to increase the number of influences per vertex, just to be clear.

I understand, that currently some engines can only handle up to 4 inflcuences and that is the reason why I want this encoding:
For glTF 2.0, only JOINT_0 and WEIGHT_0 is allowed. But using an extension, it is possible to have more weigths and joints already e.g. JOINT_1 and WEIGHT_1 for having 8 influences and so on.

@pjcozzi
Copy link
Member

pjcozzi commented Mar 19, 2017

Whatever everything thinks here will be fine with me. I think we limited it because we didn't see more than 4 being used in practice.

@McNopper
Copy link
Contributor Author

I am fine, if we just define, that JOINT_0 and WEIGHT_0 have to look like this plus for glTF 2.0 default is 4 influences. Whoever wants more at this point of time, needs to use an extension (to be defined).

Anyway, modern 3D engines, maybe not for the web, already support 8 influences e.g. Unreal Engine 4 supports 8 influences:
https://answers.unrealengine.com/questions/8117/bone-limitations.html

Having the the same rule as for TEXCOORD_X and COLOR_X, we are save for the future.

bghgary referenced this issue Apr 11, 2017
* Add support for tangents and specify mesh attribute limits.

* Some corrections and more descriptions for attributes

* Updates based on feedback

* More updates based on feedback
@meshula
Copy link

meshula commented Nov 30, 2017

Hi all, I'm picking through the various commits and current state of the spec. My use case requires up to 8 influences per vertex. Is it still the case that skinning is restricted to 4 influences per vertex? My interest in gltf is to use standardized tools and formats. The spec explicitly calls out VEC4, and I see some discussion above about implementing a custom extension if 4 isn't enough, or packing the rest of the weights in JOINTS_1, but that's not really what I'm after as the interpretation of the resulting file wouldn't be standard across applications. Or have I misread this conversation?

@lexaknyazev
Copy link
Member

The "standard" way is to use JOINTS_n / WEIGHTS_n for each additional 4 influences (preferably sorted by weights in descending order). Unfortunately, we cannot require all implementations to support 8 influences right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants