-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Is loading a ktx2 file from a .glb supported? #29
Comments
Hi @DerrickBarra , Transcoding likely failed. Last time I checked RapidCompact (4.0.x), they seem to still use an outdated KTX 2.0 draft specification. Not sure, but could be the reason. I successfully tested with gltfpack 0.15 and suggest you try it as well to compare. If this works, it's likely RapidCompact's fault. Let me know how it goes. |
@atteneder I just reached out with Rapid Compact to double-check that the CLI we are using has the latest KTX specification. I'm pretty sure they updated to the latest a few months ago but maybe our CLI is out of date. I'll investigate that tool you linked me to which will help us diagnose the problem. Thanks!
|
@atteneder So I pinpointed the bug in KtxUnity that is causing the issue. If I use TextureBase.LoadBytesRoutine(), that causes the texture to be returned null. This is a nice convenience function to have around since we're not always working within a monobehaviour, hopefully, the bug in it can get squashed. Instead, if I use LoadFromBytes() and pass in a Singleton monobehaviour I created as a dummy, then that works just fine. In talking to another developer (@daverin over at the GLTFUtility plugin git repo). He mentions that he actually squashed this bug with two different solutions. Check out his reply. |
Fyi: Once I was mentioned in the other PR I got notifications, so no need to double-notify in here. No bug, but rather wrong use of co-routines. |
@atteneder Hey bud, our team just added KtxUnity plugin integration to the GLTFUtility plugin (we would use GLTFast, but we need animation support).
However in my testing this morning, KtxUnity has been returning a null reference to the texture on the success delegate. If I load a .ktx2 or .basis texture outside of a .glb there aren't any issues.
The weird thing is that the mimeType is confirmed to be image/ktx2 beforehand.
Now the issue could also be with the optimizer we're passing our models through (Rapid Compact from DGG) and the creation of the ktx2. But can you confirm you've seen this test work? And if so, can you share the test model you used so I can try it out here?
Here's the file I'm testing if you're curious.
Horse
GLB
GLB - KTX2
GLB - Draco
GLB - Draco & KTX2
The text was updated successfully, but these errors were encountered: