Textures not loading properly with glTF draco compression

Hello, I am encountering an issue with draco compressed glTF assets and babylonjs. It appears that some of the textures do not load correctly.

With draco compression enabled the front of the shirt is white:

Without draco compression the shirt appears correctly:

Both screenshots are taken from the babylonjs sandbox.

It appears I cannot attach the asset in question because I am a new user. However I’d be happy to share it some other way.

Is this known behavior and does it have some target release to be fixed?

Welcome aboard!

Have you tried the asset in another glTF viewer, like https://gltf-viewer.donmccurdy.com/? Does it work there?

I think you can paste a link to the asset in a post?

Yes the asset appears correctly in that viewer:

Ok here’s a download link to the asset with/without draco compression: Download Link

@bghgary anything that could come to your mind ?

I will investigate.

1 Like

Sorry for the delay, but this was a bit more difficult to fix as there were many different issues. The PR is here: Improve Draco decoder processing code by bghgary · Pull Request #14311 · BabylonJS/Babylon.js (github.com). This change should make it work as long as the Draco data is encoded properly (which apparently is not true in a lot of files I’ve looked at, especially the normalized flag).


FYI, I also just added this PR: Add an ugly flag to glTF draco loader extension by bghgary · Pull Request #14325 · BabylonJS/Babylon.js (github.com)

Good job to whoever created the asset from earlier in this thread. This is the only asset I’ve seen so far that has the correct Draco data compared to what’s in the glTF accessor.

1 Like