#KTX - Basis Texture Caveats?

5 messages · Page 1 of 1 (latest)

languid solar
#

I'm thinking about switching over to using KTX/basis textures because some scenes in this project I'm working on are using quite a bit of VRAM, and it's only going to get worse when I move on to the next phase of the project and start merging some of these scenes together.

Are there any caveats I should know about when using KTX/Basis textures other than the more complex implementation? Is there the potential for visual artifacts due to losses in the compression process? Might there be a problem with performance or my app breaking with some GPU architectures or drivers or if someone is trying to view the scene on a machine with CPU-integrated graphics?

If there are any such concerns or something that I have not considered, an explanation of those caveats or hurdles would be much appreciated.

inner cliff
#

THREE.KTX2Loader can gracefully support older GPUs and browsers, just needs WASM support. Worst case it just fully decompresses the texture like PNG orJPEG would do, but that’s very rare.

#

The main disadvantages for KTX2 are:

  • download size may not be as compact as WebP or AVIF, even though memory size is much better
  • block compression is less forgiving than image formats like PNG, JPEG, WebP, AVIF. It’s harder to tune the compression settings for ideal visual results, and you may have to increase texture resolution a bit for a good tradeoff.
#

^UV layout also makes a difference here, padding between UV islands is more important.

#

tl;dr it’s a great format because you can fit more texture pixels into your app before hitting your memory limits, but it is more work to get the compression settings looking their best. Could make sense to mix and match.