Accelerated Texture Compression


Compressed

Uncompressed
The Bootcamp demo from Unity3D using uncompressed textures and using textures compressed with FasTC-64. The final rendering of the scene is slightly altered and no visible artifacts appear. The scene uses 156 textures which were compressed in a total of 8.75 minutes by FasTC into BPTC using a single core and general purpose hardware. The same textures are compressed by the NVIDIA Texture Tools in a total of 13.27 hours.


BPTC Compression

This compression format is also known as BC7 in DirectX. It is a format that compresses 4x4 pixel blocks of LDR images into 128 bits of compressed data. This is the first of the "more complex" formats introduced over the past few years that allow for very high quality texture compression. However, with such a high potential, the search space for compression parameters is difficult to search. Here we go over some of the methods used to compress textures to BPTC.

For BPTC compression, we present a few different codecs.

Compression Speed in Seconds
Image FasTC-0 SegTC DX CPU NVTT ISPC UF ISPC S
kodim13 5.2 0.897 264.4 783.0 ~0.015 ~2.7
atlas 2.7 0.592 118.5 381.7 ~0.01 ~1.78
small-char 3.2 0.567 145.6 376.5 ~0.01 ~1.78
big-char 13.4 2.27 544.1 1760.9 ~0.04 ~7.18
Compression Quality in PSNR
Images used: Note: PSNR calculation taken from the ISPC tool rather than using the same code as FasTC, so the numbers might not be exactly the same.
Close up views of a few of the kodak images with compression:

Context Original NVTT FasTC-50

PVRTC Compression

FasTC also implements a novel algorithm based on this paper. PVRTC is a compression format the focuses on the worst-case of texture mapping from compressed textures: the instance where you have to filter the texture across the corners of a block. To adjust for this worst-case scenario, PVRTC focuses on producing the very best filtered texture techniques. The result is that compressors have to employ a different set of criteria than other methods. More details can be found in the original paper. The premise of the compression scheme in FasTC is that due to the bilerp inherent in PVRTC, the compression parameters should come from the associated min/max intensities of nearby pixels. We choose intensity because it's the most influential aspect of an image w.r.t. the human visual system. Since we can only identify one other publicly available compression tool, the following metrics come from the PVRTC compressor bundled with PVRTexTool.

Image
256x256

256x256

256x256

256x256

256x256

512x512

512x512

Speed (ms)

PVRTexTool 63.74 65.11 64.92 66.63 65.45 264.68 263.14
FasTC 17.76 20.30 20.93 21.77 21.91 97.25 97.39

Quality (PSNR)

PVRTexTool 32.35 30.97 30.43 34.47 26.35 29.80 31.37
FasTC 33.63 30.17 32.09 30.01 27.44 30.20 30.75

Quality (SSIM)

PVRTexTool 0.9850 0.9673 0.9180 0.9620 0.9331 0.9225 0.9111
FasTC 0.9666 0.9797 0.9488 0.9138 0.9476 0.9531 0.9455

Source Code


FasTC is a tool for compressing images into various formats. It provides example code for different algorithms that focus primarily on speed and secondly on quality. Additional information is available via the publicly available repository on Github. It is based off of work done at Intel over the summer of 2012. Currently the tool works on Windows, Linux, and OS X via CMake, and supports compressing PNG, PVR, and TGA images. Threading is provided via pthreads and the native Win32 threading API where applicable.

The code is available via anonymous git access:

  git clone git@git.cs.unc.edu:pavel/FasTC.git

You may browse the repository online from the following location:

  https://git.cs.unc.edu/git/?p=pavel/FasTC.git

The master branch (which is hopefully always stable) is also mirrored on github:

   https://github.com/Mokosha/FasTC


Most of the research on this page is conducted by: