meshoptimizer
meshoptimizer copied to clipboard
Keep existing extensions with -noq
Hi,
I am trying to utilize GLTFPACK on my files which already have a bunch of custom extensions and in an engine that does not support quantization extension.
I, therefore, used the -noq option, but this removes my existing extensions also. Is there a method to run the gtlfpack, with no quantization and keep my own custom extensions?
gltfpack relies on being able to reprocess / reorganize the scene through the variety of options, and that changes indexing of various elements - currently nodes, meshes, materials, some parts of animation data, and probably more in the future. Because extensions can contain arbitrary ids that point to any of these elements, gltfpack must know about the specific extensions to be able to retain them.
Are you able to use "extras" instead? These can be retained when -ke is used.
Thankyou for the quick response,
I understand - sadly the engine has these extensions forced on that end so I am unable to change anything on my side to alleviate the issue,
Is it possible to tell GLTFPACK about these additional extensions to retain them?
It depends on where they are attached and what content they contain. I can’t really say definitively without knowing details.
I have the schema for these extensions - can I pm them to you?
Feel free to use the email address associated with the account.
After more consideration I'm going to close this as "not planned".
Support for extensions really requires them to be integrated into the overall processing. Material extensions without textures can be handled somewhat generically, although even there some materials have constant that are scale-dependent (eg volume thickness). However, when textures are present, they require specialized processing and that's just not very achievable without knowing the semantics. My overall feeling is that files with custom extensions should probably be processed by glTF-Transform which has an extension API, and gltfpack should remain a simpler but opinionated tool that needs to understand the entire scene to process it well.