At Imagination, we’re always trying to help customers get the most out of their graphics pipelines, which is why we’re proud to announce that PVRTexTool now supports Basis Universal supercompressed textures as well as KTX™ 2.0 and .basis texture containers!
For those not familiar with the formats or why this is important, this article serves as a brief overview of common asset delivery problems, and how KTX and Basis Universal aims to solve them.
Texture distribution for a variety of target platforms can be challenging. File types such as PNGs, JPEGs, SVGs etc., are great for certain use cases, and are widely supported by a range of applications, but they aren’t optimised for direct use by GPUs. Therefore, when developers are packing texture data for use by their applications, it needs to be in compressed formats that are easily consumable by the GPU, such as Imagination’s own PVRTC format.
Other vendors support various different compressed GPU formats, introducing the issue of needing to pack a unique file per texture for each of your target platforms.
KTX was designed by the Khronos Group to store GPU textures such as PVRTC alongside parameters that makes loading them into APIs such as OpenGL and Vulkan easier. This enables developers to focus on packing data into a single distribution format that is widely supported out of the box.
The specification for KTX was designed with simplicity in mind, making it more readily implementable in a tool or pipeline. Many tools such as PVRTexTool exist for packing your source material into KTX files automatically, making the KTX format an invaluable asset for easy file distribution.
With ease of distribution solved by KTX, we still need to address another major concern: file size. With the need for a unique file per texture per platform, texture storage, distribution, and loading cost requirements can balloon. Whenever you’re sending textures (or any files) from A to B, you’re going to be filling some percentage of that devices bandwidth, whether it be a network device, a CPU/GPU bus, or when transferring between memory and storage devices. When this bandwidth is at capacity, it often becomes the bottleneck that will throttle software performance. This is why reducing file size is vital, as the smaller our data, the more we can push through our various hardware pipelines in a given timeframe.
This is of particular concern to networked applications and live services, such as online games or web-based 3D model renderers. Such applications typically employ data steaming for things such as custom user textures, or changes to textures in real-time. We’re also seeing an industry rise in collaborative features in digital content creation platforms that require tight synchronisation between clients, so this problem is more prevalent than ever.
To alleviate the problem somewhat, rather than managing and distributing textures for each target platform, we can encode our textures into a hardware-agnostic supercompressed format such as Basis Universal. This relatively new format was developed by Binomial (an image/texture compression company) such that it can be transcoded directly on the CPU into the appropriate format. This technology doesn’t require full decompression, making the transcoding process as efficient as possible and retaining the ability to use the format for real-time graphics operations. This simplifies our number of texture formats from the number of GPU targets down to one – a great improvement.
The question now becomes: “is there’s a way to benefit from both optimisations?” – and the answer is yes! The KTX™ 2.0 format (or Khronos Texture 2.0) is an evolution of the original KTX container, which now supports Basis Universal supercompression, combining the benefits of both standards. The end result is a widely distributable container that supports small file sizes and rapid decompression on (nearly) any device. This is a giant leap forward in terms of texture distribution, and is backed by the biggest open graphics standards consortium: the Khronos Group. This is why we’ve introduced support in PVRTexTool for Basis Universal supercompression, KTX™ 2.0, and basis containers! We know this will be important to some of you and would love to hear your feedback through our Twitter account (@IMG DevTech).
To learn more about these technologies, take a look at Binomial’s GitHub page for Basis Universal, and the Khronos KTX™ 2.0 page. You can learn about additional texture optimisations in our comprehensive guide.
To make use of PVRTexTool’s support for these technologies, please check out our latest 21.1 tools & SDK release and grab our new installers: