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
SceneViewer fails to open a GLB file with multiple scenes and multiple animations #4185
Comments
Thanks, yeah it's the closest we have. @AdrianAtGoogle can you find the right place for this bug? Also @emackey, is this animations with multiple scenes thing something that needs to be clarified in the spec? |
This is a very interesting test case, thank you! It would seem reasonable that if an animation targets node(s) not in the current scene, those targets should be ignored during the animation. BabylonJS takes this one step further, and doesn't offer the animation that doesn't apply. For example in VSCode you can see it only offers the "move" animation for scene 0, and if you switch the default scene to 1, it only offers the "rotate" animation. Other rendering engines I've tried seem to get badly confused by this. I suspect the glTF spec doesn't much need an update, although it's unfortunate that engines have to work out for themselves which parts of which animations can apply to which scenes. Still, it's just a matter of checking whether a given animation target node exists in the scene, and being prepared to ignore references to nodes from other scenes in the animations list. Perhaps we need a new test model (without Draco and without the CC-BY-NC helmet) as part of the official sample models. |
Thank you very much for the quick responses!
Is this a feature that could also be useful for the model-viewer? Currently, the Altough it seems like a minor quirk since there is no way to select a scene in the first place and the playback of an incompatible animation has to be deliberate. It might be more beneficial to have an extension to the GLTFLoader of THREE that offers this functionality on the lowest level - then the implementation here would be trivial.
That sounds great. I have updated my demo by using a license-free cube mesh, and I am happy to submit a pull request to the gltf-Sample-Models repo to take it further. |
Description
This issue is related to the SceneViewer on Android and not the model-viewer.
The demo contains a GLB file with two scenes "first" and "second" and two animations "move" and "rotate".
Steps to reproduce
Expected behavior
Actual behavior
Additional information
The GLB file is valid through Khronos' glTF Validator tool.
Oddly the glTF spec doesn't have a way to assign an animation to a specific scene. My guess is that the SceneViewer stumbles when trying to load the "rotate" animation and can't find any fitting node in the "first" scene.
The demo contains a second model "Multi Scene and Single Animation" in which the second scene does not contain an animation. This one loads just fine.
Live Demo
https://jumbled-sepia-hedgehog.glitch.me/
Version
Browser Affected
OS
AR
If this is not the right place to report SceneViewer related issues I apologize. But it seemed through past issues in this repo that it is the most fitting.
The text was updated successfully, but these errors were encountered: