Basis/ktx cubemaps

Hi,

I’m trying to load cubemaps as efficiently as possible. Currently I’m loading 6 faces as jpegs. I’ve tried converting those faces to a single .basis file as cubemap and ktx2 but babylon doesn’t seem to want to load it. I’ve tried basisu and toktx.
Babylon gives and error with the ktx2 file that it has an incorrect header. With the basisu file, I just get a black texture without console errors. Plain 2d .basis textures do work.

Here on the forum I see some mixed messages as to if it should work or not.

This isn’t supported yet for ktx2. I’m not sure about BasisU. If you are trying to load an environment map, have you tried our custom .env format? Using An HDR Environment For PBR | Babylon.js Documentation

Our cubemaps are basic non-hdr cubemaps that we use for something other than reflections. Is the .env format still suitable for that?

@sebavan

It can work but in this case why not relying on jpg or png like here ? Skyboxes | Babylon.js Documentation

Well, we’re currently relying on jpegs and it works ok. But since I’m loading cubemaps pretty often on runtime, I was hoping I could optimize it a bit more. If I were to optimize the loading more, I could potentially use 4k cubemap faces instead of 2k. Loading the 4k jpeg cubemaps takes a bit too long for my liking.