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 BASISThe 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 format | Bits per pixel | Description |
|---|---|---|
BASISU_ETC1S | 0.3 - 1.25 | Compressed with Basis Universal ETC1S |
BASISU_UASTC | 4 - 8 | Compressed with Basis Universal UASTC |
| Texture Format | Description |
|---|---|
basis | Basis Universal compressed file. |
ktx2 | Khronos Texture (Version 2). Newer format with Basis Universal support. |
pvr3 | PowerVR Texture Format. Native format for iOS and PowerVR GPUs. |
pvr3gz | PowerVR Texture Format, compressed with gzip. Smaller on disk, decompressed at load time. |
pvr3ccz | PowerVR 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.