KTX2 embedded textures do not work on three.js but works on babylon.js

Greetings,

I have exported a glb file from blender with embeded png textures. When loaded with gLTF Tools extention on VS code it’s rendered correclty both in babylon and three.js.

My goal is to replace the png textures with KTX2 ones, created with Khronos’ ToKTX tool.

Though, when I am adding the “KHR_texture_basisu” extention (image 1) and replace png textures with KTX2 ones (image 2), only Babylon renders the model properly (image3), while three.js doesn’t (image 4).

Does anyone knows what’s the problem?

P.S. I tried many different gLTF viewers

Thanks in advance
George

image 1
Screenshot_1

image 2
image

image3

image 4

Instead of optimizing the glTF asset manually, do you mind trying it with gltfpack? There is a tc option that converts all textures to KTX2.

If the outputted glTF asset still can’t be loaded, would you mind sharing it in this topic?

I managed to convert textures to KTX2 with gltfpack and the model is rendering correctly.

Though, compression options with gltfpack are limited in comparison to those of TOKTX tool.

For example I want to add some variants, and some color textures require lower compression than others to display properly. Is there a way to compress textures from the same channel (I have two color maps) individually with gltfpack?

Thanks for your help!

I don’t know that, sorry. You maybe want to ask this question at the gltfpack repo.

1 Like