Closed CHENJIAMIAN closed 2 months ago
I saw the Divide glTF Document, but I want it wrapped into a command line.
Hi @CHENJIAMIAN!
Splitting a GLB into multiple GLBs is certainly something that I'd like for users to be able to achieve with glTF Transform. The “specified size limit or user-defined criteria” is (I think) the difficulty here: there are many different ways to subdivide a scene, none obviously better than the rest.
The library does include functions intended to help — see copyToDocument and moveToDocument. Given a list of nodes, for example, these can transfer all dependencies of those nodes to a new glTF document, making it easier to create a valid output. But I haven't provided a complete function specifically for splitting a GLB; I think more specific requirements would be necessary to make that useful, and to avoid its becoming very complex.
If someone would like to propose a particular method (for example, divide 1 GLB into W x H x D
GLBs according to a spatial grid) with a clear use case, I would be happy to review a PR or to advise on the implementation. In the meantime it is "self service", and would need to be implemented with the scripting API.
Currently, there is no straightforward way to split a large GLB file into multiple smaller GLB files.
But there is, it even uses gltf-transform under the hood: https://github.com/playkostudios/model-splitter
Is your feature request related to a problem? Please describe. Currently, there is no straightforward way to split a large GLB file into multiple smaller GLB files. This can be problematic when dealing with large models that exceed the size limitations of certain platforms or when you need to manage complex scenes more efficiently.
Describe the solution you'd like I would like to see a feature implemented in the glTF-Transform tool that allows users to split a single GLB file into multiple smaller GLB files. This feature should:
Describe alternatives you've considered I have considered manually breaking down the model using 3D modeling software, but this is time-consuming and prone to errors. Additionally, I've looked into other glTF processing tools, but none seem to offer this specific functionality.
Additional context This feature would be particularly useful for developers working with large-scale virtual environments or game developers who need to optimize asset loading times. By splitting a large GLB file into smaller, more manageable pieces, developers can improve performance and reduce the load on client devices.
Moreover, this feature could potentially be integrated with existing optimization tools within the glTF-Transform suite, providing a comprehensive solution for managing and optimizing glTF assets.
I believe that this feature would greatly enhance the usability and flexibility of the glTF-Transform tool, making it an even more valuable resource for the glTF community.