How to convert an image to Basis Universal format? (BASIS or KTX2 file)

Basis Universal is a GPU texture codec that creates highly portable compressed textures. Unlike format-specific compression (ASTC, ETC, DXT), Basis Universal files can be quickly transcoded to any GPU-native format at runtime. This makes it ideal for cross-platform applications where you need a single texture file that works on desktop, mobile, and web.

  • ETC1S offers the smallest file sizes, best for distribution over networks
  • UASTC provides higher quality, better suited for local storage

With TexturePacker's --convert-texture command line option you can easily convert a PNG image to Basis Universal format:

TexturePacker --convert-texture input.png --pixel-format BASISU_UASTC --texture-format BASIS

The pixel format specifies the compression algorithm to use, the texture format describes the file container. The following formats are supported for Basis Universal compression:

Pixel formatBits per pixelDescription
BASISU_ETC1S0.3 - 1.25Compressed with Basis Universal ETC1S
BASISU_UASTC4 - 8Compressed with Basis Universal UASTC
Texture FormatDescription
basisBasis Universal compressed file.
ktx2Khronos Texture (Version 2). Newer format with Basis Universal support.
pvr3PowerVR Texture Format. Native format for iOS and PowerVR GPUs.
pvr3gzPowerVR Texture Format, compressed with gzip. Smaller on disk, decompressed at load time.
pvr3cczPowerVR Texture Format, compressed with zlib, cocos2d header.

The Image quality can be configured with --basisu-quality <0-4>, default value is 2.
For other options (scaling, trimming transparency, ...) have a look at the Image conversion documentation.