-
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 use cases and examples #1403
Comments
@bghgary would some of these be reasonably within scope for glTF-Asset-Generator to output? I can start making some one-off models in Blender if not. |
@donmccurdy Some of these are planned already. See https://github.com/bghgary/glTF-Asset-Generator/issues/437. I think the only ones that are not covered are the first one and last one. |
|
@donmccurdy This isn't allowed by schema: glTF/specification/2.0/schema/node.schema.json Lines 85 to 88 in 6612de2
|
Ah good to know. Removed the addition above. |
Added |
Thanks to @kcoley, @stevk, and @bghgary, for adding new test cases in glTF-Asset-Generator, with more on the way. 🎉 From those that are available now, I've filled in three of the "example" links above:
This works fine for all of the three implementations tested (BabylonJS, ThreeJS, PlayCanvas). We may want to test a native engine like Unreal or Unity as well, but it seems like this case can probably be allowed, and should possibly be mentioned as an implementation note. It is a known use case that engines may attach objects to bones after loading, and I see no reason to disallow it in the model itself.
Works in all three, and the spec is already clear on this case.
Works only in BabylonJS. I'm not sure whether this should be allowed. |
Pragmatic question -- for an exporter like FBX2glTF, do you think it's reasonable to cater to the loaders that have issues with your example #1 (joints form a strict subset of the relevant sub-scene-graph) by simply adding the inactive but tree-connecting nodes as joints in the skin? It definitely solves the issue I'm working on, but I'm not clever enough to figure out if it's likely to cause other issues on some esoteric models. |
I've update the first comment with the latest examples from asset generator v0.6. The only one that is missing is the >4 joints one because no engines support it right now. |
Would you also add weights and inverse bind matrices for them? I think the down side is that it costs more space? |
I would, and it does, which is irritating. Still, it's per-node waste rather than per-vertex waste, and on the models I just tested on, the size increase is a small fraction of a percent. I can live with that (and if others hate it it's easy to add command line flags). I'm more worried about unintended side effects I hadn't though of –– to say I'm weak on skinning is an understatement. |
I don't call myself an expert on skinning either, but I don't think there will be any side effects. BTW, which viewers don't work correctly without this? |
Yes, confirmed with 3D viewer. This will get fixed as we require that the app pass all asset generator tests. |
I also have the problem that constraints on a mesh to another mesh or parenting does not really work. i get it to the point where the mesh gets positioned correctly once in the beginning but does not move along when iE the hand of the model moves. i am relativly new to this: do i understand you correctly that this is a known issue of the exporter (in my case Blender) but you need testdata to solve that issue? because i would happily provide you with that if you tell me what you need and i can safe some of your precious time since it seems you are busy on so many forums answering our questions. can i contribute/support you at this somehow? i just want to attach supersimple eyebrows on my robotface with morph-targets to get some kind of expression in that face. or is there another route to get that working? i want to achive something similar to that: https://threejs.org/examples/?q=morph#webgl_animation_skinning_morph |
@zen85 it sounds like you're describing a bug in a Blender exporter? If you haven't already, could you file a bug on the exporter you're using? If it's the one that ships with Blender, glTF-Blender-IO, we're tracking a related issue here: KhronosGroup/glTF-Blender-IO#75. If you're able to share an example model and attach it to the issue above, that would be helpful. Thanks! |
We currently do not have example assets for many of the less-common situations involving skinning, which has prompted questions about whether they are valid and how to implement them.
Have examples:
skeleton
property should probably be removed, and can already be ignored by implementations. In addition to that, we should have an example asset for which no common root is possible (e.g. bones form two subtrees starting from the scene root).skeleton
property. If not, consider adding restriction that joint hierarchy should have a common root, whether or notskeleton
property is kept.skeleton
TBD.TBD:
In each case, if we find that an example cannot be consistently implemented we may tighten the spec accordingly.
The text was updated successfully, but these errors were encountered: