Sorry again for the inconvenience
@regna @SondreElgBB and @AdmiralPotato it would be amazing if you could share one of the broken file even in PM so that I can do the best fix ?
Sure, @sebavan! The only broken file I’ve seen is from @AdmiralPotato at the link:
Strangely, when I use gltfpackto do the KTX compression, there seems to be no issues. I’ve attached the files at the Github link:
-
football_field_raw.glb(from AdmiralPotato - no KTX compression - works fine) -
football_field_ktx2.glb(from AdmiralPotato - with KTX compression - has issues) -
football_field_raw2.glb(gltfpackused on 1st file - with KTX compression - works fine)
Thanks a ton I have all I need to work on a fix. I ll do it ASAP.
Something that seems like it will continue being a problem here, is that the Babylon CDN version of the KTX2 decoder and other tools seems to be a uniform version that’s used across all versions of Babylon and the Sandbox.
In order to prevent issues like this in the future, perhaps the version of the KTX2 decoder and all other CDN based dependencies that are used for a specific release of Babylon can be pinned to the Babylon version? Then if a future version of the decoder breaks, older versions of Babylon projects stay working exactly the same, especially since particular projects may either depend on, or have code that’s specifically countering bugs in that version of the decoder?
https://cdn.babylonjs.com/8.34.0/babylon.ktx2Decoder.js
https://cdn.babylonjs.com/1.2.3.whatever-is-availabe-when-babylon-8.34.0-was-released/havoc.js
https://cdn.babylonjs.com/1.2.3.whatever-is-availabe-when-babylon-8.34.0-was-released/havoc.wasm
So Babylon 8.34.0 would only request that version of the decoder, and then projects depending on that version will remain stable as new versions are released.
What do you guys think of this idea?
I have more info and a more precise reproduction. It seems to be the KTX2 UASTC compression option that’s breaking specifically.
I used this tool to create the results: glTF Compressor
Working, no compression:
https://aroundar.sfo3.cdn.digitaloceanspaces.com/public/suzanne_with_grid_uv.glb
Working, ETC1S:
https://aroundar.sfo3.cdn.digitaloceanspaces.com/public/suzanne_with_grid_uv-ktx2-etc1s.glb
Broken, UASTC:
https://aroundar.sfo3.cdn.digitaloceanspaces.com/public/suzanne_with_grid_uv-ktx2-uastc.glb
Edit: Also, weirdly, when I drag in the broken one to the sandbox, the Inspector pops up, but not for the others?
Fix is in and will be deployed in a couple hours. I ll ping you all back here to test ![]()
Thanks again and sorry to have broken it in the first place ![]()
Fix should be there
@sebavan I just tried the sandbox with with my latest Suzanne files and the football field, in an incognito window to make sure nothing was cached. Still no luck with the UASTC compression approach, which seems to be where the problem is.
The broken Suzanne is the most obvious tell in the examples I posted most recently: How to inject `@babylonjs/ktx2decoder` into Babylon? - #27 by AdmiralPotato
Is there anything more I can do to help?
Can you check that the sandbox is well on 8.49.4 ?
Well, this is wild. I have a co-worker who’s on the east coast, and it’s working for him. Perhaps this is a CDN caching issue? I’m in SLC, and getting different results that he is.
…and now 5 minutes later it’s working for me now. It looks like it was a CDN caching delay.
I suppose this makes me want to bring up the idea of version pinned CDN links again. Might that be something that can be investigated in the near future?
You can already with Babylon.js Sandbox - View glTF, glb, obj and babylon files for instance
About suzanne head it did not work before so it is not a regression let me add @Evgeni_Popov to see if something is doable.
yeah that ArrayBufferLike TS change was an annoyance for us, too.
If anyone has questions about self-hosting the babylon CDN - ask away! We’ve got a nice process baked into our deploy pipelines that fetches the version-matched CDN build and deploys it to a cloudfront distribution.
@Will_FrameVR Honestly? That would be awesome. It makes me think that this process should be its own forum post, or even better… added the the Babylon Documentation? I wish I’d had a documented process for this last year when I had to figure out hosting the decoder WASMs myself because we had a vendor that needed SharedArrayBuffers and all WASMs needed to be hosted on our domain before any of them would start working again.
Sorry to hijack your whole thread @regna. I guess that when your change was deployed, it just also happened to deploy some unrelated regression issues at the same time, if I’m understanding all of this correctly?
No worries, @AdmiralPotato , I’m glad all is good now thanks to @sebavan!
It must be a problem with the file, because it doesn’t work in 3js viewer either:
I unpacked the glb file and tried to display the .ktx2 file. It was blank in the sandbox. I also tried with two online .ktx2 viewers, but both generated an error.



