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

valid glTF fails to load in CesiumJS #11961

Closed
mramato opened this issue Apr 27, 2024 · 3 comments
Closed

valid glTF fails to load in CesiumJS #11961

mramato opened this issue Apr 27, 2024 · 3 comments

Comments

@mramato
Copy link
Contributor

mramato commented Apr 27, 2024

house.glb.txt is a draco encoded glTF model that loads fine in all viewers I tried except for CesiumJS. It validates cleanly with no errors.

When loaded into CesiumJS, it reports:

RuntimeError: Failed to load model: ../../SampleData/models/house.glb
Failed to load glTF
One of options.bufferViewId and options.draco must be defined.
@javagl
Copy link
Contributor

javagl commented Apr 27, 2024

Probably a duplicate of #10284 : Sparse accessors are simply not supported.

(This is also indicated by the ❌ in the "Cesium.js 116" column of the "Simple Sparse Accessor" row of the table in https://github.com/cx20/gltf-test : This is currently rendered without the sparse substitution...)

The example here adds Draco compression, and the crash is caused by the _BATCHID attribute, which is sparse and not covered by draco, because it only contains 0s anyhow. So there are a few things coming together that cause the lack of sparse accessor support to wreak havoc in this case. Maybe the crash could easily be avoided even without full sparse accessor support (and only cause a warning or so...)...

@mramato
Copy link
Contributor Author

mramato commented Apr 29, 2024

@javagl I agree that the way CesiumJS is failing here is not very useful and a clear error message or warning about lack of sparse accessors would be the least we could do. But it definitely bugs me that there is part of the glTF standard we seem to not support, especially since tools like gltf-transform's optimize function produces sparse accessors where applicable.

@ggetz @lilleyse What is the level of effort to support them?

@ggetz
Copy link
Contributor

ggetz commented Apr 29, 2024

Closing in favor of #10284 to keep discussion in one place...

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

3 participants