Hi everyone,
1. A concise explanation of the problem you’re experiencing.
My gltf model has two primitives: one draco compressed and the other is not.
But Cesium throw an error when parsing the model.
I think Cesium parses the two primitives both in draco decoding process. So the uncompressed primitive went wrong when parsed.
The gltf specification allows each primitive has different extensions, so it’s reasonable to set draco compression extension for some of the primitives.
BTW, the same model can be displayed in Babylon.js.
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
Here is the primitives written in gltf file:
“primitives”: [
{
“attributes”: {
"POSITION": 0,
"_BATCHID": 1
},
“extensions”: {
"KHR_draco_mesh_compression": {
"attributes": {
"POSITION": 0,
"_BATCHID": 1
},
"bufferView": 0
}
},
“indices”: 2,
“material”: 0,
“mode”: 4
},
{
“attributes”: {
"POSITION": 3,
"_BATCHID": 4
},
“material”: 1,
“mode”: 1
}
]
``
And I also add the extension for the whole gltf file:
“extensionsRequired”: [
“KHR_draco_mesh_compression”
],
“extensionsUsed”: [
“KHR_draco_mesh_compression”
],
``
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I want to compress some of primitives in gltf, and remain others uncompressed.
4. The Cesium version you’re using, your operating system and browser.
Cesium 1.50
Win10
Chrome 71.0.3578.98 64bit
Any help is appreciated,
Thanks.
Chris