Gltf object with compressed textures

Hi guys,

I’m trying to replace the jpg textures with compressed textures for GPU ( .ktx ).

When I add
let available = [’-astc.ktx’, ‘-dxt.ktx’, ‘-pvrtc.ktx’, ‘-etc2.ktx’, ‘-etc1.ktx’];
let formatUsed = this.engine.setTextureFormatToUse(available);
the gltf is not displayed in the scene.

I tried to add extra .ktx files, renaming them, but to no avail. It is stuck loading the same original .jpg files. How should it be done? Loading the original gltf with the original textures and then loading each .ktx file manual or it is something that i’m missing?

A full example would be wonderful :slight_smile:

Also what to use to convert the jpg to ktx files.

Thanks

pinging @bghgary

glTF doesn’t support KTX (v1) files as input.

The Khronos 3d formats working group is working hard to get KTX2+BasisU spec completed so that people can start using them. Babylon has experimental support for this. You are free to try this out but the documentation is sparse right now. You can follow the spec here: KHR_texture_basisu: Basis Universal for material textures by lexaknyazev · Pull Request #1751 · KhronosGroup/glTF · GitHub.

Also, @Evgeni_Popov is currently working on KTX2 support to catch up with the working group changes.