Consider option for splitting mesh into different buffersSee original GitHub issue
I recently wrote a quick, experimental script (https://github.com/donmccurdy/glTF-Split) for splitting an existing glTF asset such that different meshes’ accessors are stored in different buffers (and different
.bin files). This provides some options for loaders to request data incrementally, which we’re getting close to supporting in three.js. For example:
gltf-split original.gltf --output split/split.gltf --meshes MeshA,MeshB # Input: original.gltf # Output: split.gltf, MeshA.bin, MeshB.bin
Disclaimer: I don’t really know if splitting based on mesh name is really a practical workflow, see https://github.com/KhronosGroup/glTF-Blender-Exporter/issues/293. There are probably other/better ways it could be done, but this is simple and requires no changes or extensions to the glTF spec.
@FrankGalligan mentioned there was some similar code in gltf-pipeline already (https://github.com/AnalyticalGraphicsInc/gltf-pipeline/commit/65f9b3789bbf9cf1d95d44ca5dd703ccd6007f56#diff-df853e0500f56f09b6fecbdba9dcafdeR76). Do you think this makes sense as a feature in glTF-Pipeline, or is better left to other tools?
- Created 5 years ago
Top GitHub Comments
@Algorush This kind of question is better suited for the Khronos Forums or Stack Overflow, rather than at the bottom of an old closed issue on some project’s issue tracker.
That said, glTF comes in different forms. The GLB form is a binary bundle (
*.glb) that embeds a single buffer, with all needed binary data rolled into it. But the other form of glTF (
*.gltf) allows references to external resources such as
.bin files, and in that case yes, you can have references to multiple bin files from the
buffers array in the JSON.
Hello! Can anyone please tell me, does the GLTF 2 standard provide for multiple bin files for one GLTF?