-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
I tried this model with gltf-test. |
It will be interesting to find out what the culprit is so that we can possibly add a test case to the skin models in asset generator. |
@cx20 Thanks for the tests! I only manually validated it in 3 viewers, and noticed that it worked in 2 of them, but didn't work properly in ClayGL. It's really interesting to see that the cases where it does not work all seem to be "wrong in the same way". This is a strong hint that there's some critical ambiguity in the spec. (Which still doesn't say anything about whether "the model itself" is correct - maybe Babylon and Three.js are wrong...?) I'll try to allocate some more time for that, maybe I can figure out the reason. (I think it should not be related to KhronosGroup/glTF#1504 (comment) , though - but I'll try to add some example, maybe a "SimpleSkinTest" or so, where the effect of using the skeleton root vs. the node transform becomes obvious. I basically thought about actually adding a screenshot/GIF showing the wrong result, and saying "If you can see this, you made this-and-that error, and you should fix it like this-and-that"...) |
@javagl I think it's good to illustrate common mistakes. The following list is a list of libraries that support skinning animation (For example, CesiumMan). It was unexpected that Cesium.js could not be processed correctly.
|
I think the Cesium issue is due to CesiumGS/cesium#8175. This doesn't need to be resolved before merging this. @javagl With the latest validator, I see two warning messages here. There aren't any errors, so this could be merged as-is. But I wanted to ask, do you expect these warnings from this example?
|
@emackey A few nits (just to improve readability, they do not affect the rendering issues in some engines).
|
FWIW, removing |
The validation warning seem to be new: IIRC, the online version did not show warnings - so I assume that the drag-and-drop validator is/was not up to date at the time I tested it. I'll have another look at the warnings and the data, and see how they can be fixed (also, the other minor fixes). If I understood it correctly, then removing the |
No, that distorts differently. |
@javagl There's a newer version of the validator ( |
Finally coming back around to this, as I'm working on my own implementation of skinning. I can see why the sample data is the way it is (for simplicity), and I can see why the validator thinks it's worth issuing a warning, but not an error. I think it's OK to let this one go for the sake of readability of the raw data. Any other concerns before this gets merged? |
@emackey Things like this tend to be buried under other (usually more pressing) tasks. But the improvements that lexaknyazev mentioned (and resolving the warnings) are things that I'd certainly tackle. I'll set myself a deadline: If it's not revised until Thursday, it can be merged (and the shame of having contributed a model with warnings will haunt me :-/ ) |
Made material double-sided Removed unneeded min/max properties Removed offsets where they are zero by default Fixed ACCESSOR_JOINTS_USED_ZERO_WEIGHT warnings
The model has been updated
There are no warnings with the current validator, and the resulting model (embedded and non-embedded) can be displayed in https://gltf-viewer.donmccurdy.com/ (An unrelated aside: Figuring out where exactly the
but this sounds a bit like "Your Princess is in Another Castle"...) |
I tested it again with gltf-test and found a library with an interesting bug. |
@cx20 That's interesting. In fact, I hesitated a bit to add the But loaders should be able to cope with that. From a quick glimpse at the console, it is not directly caused by the There once also was a |
@javagl Thank you for your reply.
Yes. Since this is a specific library issue, I have made a separate issue report.
I think it makes sense that the samples in glTF-Tutorial would be in glTF-Sample-Models as a basic use case. The case where only |
I'm fine with removing |
So I have removed the material (tests still passing). Although it may not look "nice" in some viewers (as Alexey said: They often have this auto-rotation enabled), it may be more suitable as a test that is supposed to be focused only on skinning. The topic of skinning is rather complex anyhow, and I still want to create an example that allows to test the proper handling of skeleton roots... |
You could also add more geometry instead of making it double-sided, but that may also make this example more complex than it needs to be. |
There seem to be no other issues with that, so I think it's OK to merge. |
Thanks @javagl! |
A simple example for vertex skinning.
This is essentially the model that is explained in full detail in the tutorial at https://github.com/javagl/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_019_SimpleSkin.md
It is rendered and animated properly in https://gltf-viewer.donmccurdy.com/ and https://sandbox.babylonjs.com/
It is not rendered properly in https://pissang.github.io/clay-viewer/editor/ , though...
The shortcut to the model in the branch in the fork is https://github.com/javagl/glTF-Sample-Models/tree/SimpleSkin/2.0/SimpleSkin
Further reviews or comments by skinning experts would be appreciated...