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

Allow (partial) load of meshes with unsupported required extensions #431

Open
Wumpf opened this issue Aug 23, 2024 · 1 comment
Open

Allow (partial) load of meshes with unsupported required extensions #431

Wumpf opened this issue Aug 23, 2024 · 1 comment

Comments

@Wumpf
Copy link

Wumpf commented Aug 23, 2024

Currently, if there's any extension listed in extensionsRequired that is not supported by this library, the loader immediately returns with an error. This makes sense given how this is speced:

An extension is considered required if a typical glTF loader would fail to load the asset in the absence of support for that extension.

That said, there's many situation where one would like to make a best effort and rather load the mesh with errors instead of failing to load anything at all.

We hit this in the Rerun viewer where after an update of gltf (didn't check for exact version yet), users no longer can load certain files: rerun-io/rerun#7253
In this case KHR_texture_transform was put under required. Naturally, Rerun doesn't support texture transform either (can't load it through gltf after all) but it would still be desirable to load everything else that is unaffected by the extension.

After all, editing the mesh to put the extension out of required allows it to load perfectly fine, meaning that if want to make this work today we'd have to manually purge all required extensions from the list before passing it to gltf and then check what the library was able to load and what not in order to issue warnings accordingly.

@emilk
Copy link
Contributor

emilk commented Aug 27, 2024

From the changelog it looks like we just need to set the allow_empty_texture flag: https://github.com/gltf-rs/gltf/blob/main/CHANGELOG.md

EDIT: nope, the validation still runs and fail the load.

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

No branches or pull requests

2 participants