Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

index order not preserved #579

Open
ua4192 opened this issue Apr 13, 2021 · 4 comments
Open

index order not preserved #579

ua4192 opened this issue Apr 13, 2021 · 4 comments

Comments

@ua4192
Copy link

ua4192 commented Apr 13, 2021

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

@ua4192
Copy link
Author

ua4192 commented Apr 19, 2021

May be I am only person with this problem?

@donmccurdy
Copy link

@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.

@ua4192
Copy link
Author

ua4192 commented Apr 21, 2021

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.

@donmccurdy
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants