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
Error when compressing glTF model with DRACO compression #369
Comments
Thanks @FarhadG It seems like this is an error from within the draco library. @FrankGalligan would you be to take a look at this? I uploaded the gltf here: https://drive.google.com/open?id=1u8oSGfsDpPTxD41MuJusbPahI126t9qC. If it helps with debugging, primitive at index 3 is failing at This also reveals a secondary issue where mesh data is encoded multiple times when primitives share the same attributes but have different indices. I might have a chance later to look into that. For example the original glTF looks like:
Possibly relevant: KhronosGroup/glTF#1267 |
Fixed the secondary issue in 734f85d by adding a stage that splits primitives that share the same attributes but have different indices. This unintentionally fixed the draco crash too. The model now converts correctly. |
Thank you, @lilleyse! It works like a charm. Do we have an idea of when |
The last two things it needs are tests for There's been a lot of momentum lately so I'm hopeful it will be soon! |
That's awesome, @lilleyse. Another question: I understand that Draco offers other functionality in their compression than what I see outlined in the |
It's unclear to me how the metadata fits into the glTF extension, and how it should be accessed by engines. In glTF metadata usually goes in the To keep it simple I think the draco encoding should be all or nothing, since it might get complicated to describe which primitives/attributes should be omitted. Though if you want to avoid compressing a certain type of attribute you can set its quantization bits to 0 - for example |
@FarhadG You noted that you use "multi-texture OBJ". Does it mean that you use - multiple meshes with different materials/textures? Because that is what I am trying to achieve, without success so far, and in obj2gltf documentation is stated that multiple materials are not supported. |
I've been researching on how to compress a multi-texture OBJ with DRACO to be able to render in THREE.js. Anyways, after some discussions in this thread, I was advised to convert the OBJ to glTF and then leverage the V2 branch here to compress the glTF with DRACO compression.
Here are my steps:
Thank you for your help and assistance.
The text was updated successfully, but these errors were encountered: