Cannot display model with some of the primitives in the file are draco compressed

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

For references, I uploaded the gltf file.

在 2019年1月17日星期四 UTC+8下午5:34:49,Chris Wang写道:

2bb8a9b5-6346-419c-a47e-b18721123776_1.gltf (3.59 KB)

2bb8a9b5-6346-419c-a47e-b18721123776_1.lbbin (1004 Bytes)

Hey Chris. I can confirm I’m seeing an error with this model. Thanks for posting this issue and a sample model. I’ve opened up a bug report with this some more information:

https://github.com/AnalyticalGraphicsInc/cesium/issues/7495

Hopefully we’ll get an answer on that soon.