-
Notifications
You must be signed in to change notification settings - Fork 502
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
Process multiple scenes without merging them #184
Comments
I could add support for multiple scenes; my understanding previously has been that this is poorly supported, some discussion in KhronosGroup/glTF#1542 and other issues on glTF repository. Having said that, I don't think it's going to be too difficult to support, although I don't know if I will be able to find good examples to test against. Merging multiple input files is challenging though due to how some parts of gltfpack are implemented - parts of the pipeline today use the raw data from the source glTF file (via cgltf library) so the ability to process that is limited... |
If you have an example of a model with multiple scenes that'd be great, since glTF-Sample-Models which I usually use for testing doesn't have one. |
Basically, blender exports multiple scenes in a very meaningful way. It's like separate "root" nodes. When there're multiple scenes, one of them is "main" (accessible as like |
Let me make you one |
|
Here's glb, gltf and blender files. Yes, that's right. Scene is just numeric index. Just checked it myself. |
With multi-scene setup there could be some really interesting things done. E.g. prefabs, merged files, different animation scenes, etc. Blender has very interesting (yet a bit buggy) support for creating different scenes from the same source files, that's what I use. |
Before this change gltfack wasn't scene aware, and would process all nodes regardless of which scene they come from. With this change, we now output the same number of scenes that the input file contained. When merging meshes and converting nodes to mesh instances, the process is limited to cases where the mesh is not used in multiple scenes. Fixes #184
Wonderful work! Works well! |
Just wanted to note again, that you are very prolific and your utility is top-class. Does what's advertised on the tin, and is extremely fast at that. On behalf of myself and others, thank you! |
I really love gltfpack. The speed and quality of code is superb. But I wish there was a bit more control over certain aspects of it. One of them is ability to process multiple scenes. Right now gltfpack outputs a single scene. So i have to use
gltf-transform
to preprocess file to turn scenes into root nodes.Another semi-related thing would be super lovely to support multiple input files and glue them together as different scenes. Right now i also do that with
gltf-transform
, but it all takes a lot of plumbing and hacksThe text was updated successfully, but these errors were encountered: