Can I use ktx2 texture in NodeMaterial?

Hello everyone!
I have a lot of custom NodeMaterial and every NodeMaterial contains several textures. Can I use ktx2 texture instead of png/jpg texture in the NodeMaterial?

Yes, you simply have to load your ktx2 texture by doing your_texture = new Texture(...) and assign it to the texture property of your node (nodeMat.getBlockByName("your_block").texture = your_texture).

So I cannot load ktx2 texture directly in the NodeMaterial Editor and export it as a json file? I have to use code to set the NodeMateial texture?

You can use a texture directly in the node material but not in the “embed static” mode. You must use the “url” mode:

1 Like

You are great! Thank you!