I am trying to create a gltf with buffers compressed using mesh optimizer compression extension, however I am unable to understand how to compress the actual buffers. Does cesium native provide functionality to compress the buffer or only to add a compressed buffer? In the case of reading gltf, it appears to have the ability to decompress a buffer, however in the case of writing a gltf I cannot find a way to compress the raw buffer into meshoptimized form.
At the moment I am able to add the extension into the buffer as below:
but these end up with the extensions written into gltf without any actual buffer written. Any minimal example of compressing a buffer and writing it would be great.
cesium-native doesn't currently have any support for compressing with meshopt. You would need to use the meshopt library directly to create the correct glTF buffers.
I am trying to create a gltf with buffers compressed using mesh optimizer compression extension, however I am unable to understand how to compress the actual buffers. Does cesium native provide functionality to compress the buffer or only to add a compressed buffer? In the case of reading gltf, it appears to have the ability to decompress a buffer, however in the case of writing a gltf I cannot find a way to compress the raw buffer into meshoptimized form. At the moment I am able to add the extension into the buffer as below:
And add the extension into the model itself:
but these end up with the extensions written into gltf without any actual buffer written. Any minimal example of compressing a buffer and writing it would be great.