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

More control over how glTF files with multiple scenes are loaded #820

Open
jespertheend opened this issue Nov 22, 2023 · 0 comments
Open
Labels
effort: Moderate Will take a good amount of time and experience with the codebase, but feasible.
Milestone

Comments

@jespertheend
Copy link
Collaborator

The gltf spec has some things to say about how scenes work:
https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#scenes

Right now the gltf loader just throws all scenes into a single entity, which isn't great, because most of the time you only need a single scene.
In fact, often gltf only has a single scene, ideally it wouldn't create any extra 'root' entities in that case.
I think parseGltf should probably contain an option that allows you to pick a specific scene, but it should also still be possible to load all scenes, otherwise you lose the benefit of sharing materials etc. between scenes.

The spec also says

A glTF asset that does not contain any scenes SHOULD be treated as a library of individual entities such as materials or meshes.

Not sure how to deal with that though...

@jespertheend jespertheend added the effort: Moderate Will take a good amount of time and experience with the codebase, but feasible. label Nov 22, 2023
@jespertheend jespertheend added this to the V1.0 milestone Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: Moderate Will take a good amount of time and experience with the codebase, but feasible.
Projects
None yet
Development

No branches or pull requests

1 participant