CesiumGS / gltf-pipeline

Content pipeline tools for optimizing glTF assets. :globe_with_meridians:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

index order not preserved

ua4192 opened this issue · comments

commented

Hi.

I have a big problem with gltf-pipeline.

I use this convertor to convert my models to GLB with Draco compression.
Everything works fine but the index order I have set on my models is not preserved after conversion.

I need to preserve index order because my models are composed by many individual other models (merge).
The point is that before exporting the scene I sort the models to be merged order by box size (bounding box) in ascendant mode.
In this way, depending on the distance to the merged model I can use the setDrawRange method in order to hide the small models inside the merged model.

The problem is under gltf-pipeline because if I export to GLTF without Draco compression it preserves the index order and setDrawrange works as expected.

Is there any possibility to keep the index order untouched?

Many thanks in advanced.

Best regards

commented

May be I am only person with this problem?

@ua4192 I believe this is an effect of the (higher compression) edgebreaker compression method. You can disable that and use sequential compression with the --draco.compressionLevel=0 option, which should preserve index order.

commented

Hi.

Many thanks for the information.

Do you know what more or less will be the increment of the size of glbs comparing wusing --draco.compressionLevel=10?

Many thanks in advanced.

The file size will be higher (less compression) with level 0 than with level 10, but it's hard to say how much higher. Reordering vertices allows Draco compression to be more effective.