Texture Compression Explained
Textures in games
As most people are now aware of, texture maps are 2D pictures wrapped around 3D objects to provide increased detail and texture. In many cases, representing the same detail through the use of actual geometry would be prohibitively challenging, or even virtually impossible given today's level of detail.
Of course, to show higher levels of detail (such as when zooming in closer to an object), larger and more detailed textures are required, basically the same story as with a flat picture in Photoshop. The problem is that textures tend to take up a lot of space, and when we're talking about 3D acceleration, space is important, specifically if we're talking about memory and bandwidth. For example, a 16-bit texture of 512x512 size takes up 513K of raw space. This doesn't seem so bad, until you factor in that dozens of textures needed to paint a standard 3D scene at a given resolution. Increase your texture size to 1024x1024, and that space requirement jumps to over 2MB! Now consider a 32-bit 2048x2048 texture, which alone requires 16MB of space.
Is this starting to sound familiar?
Hopefully, it does. We've all looked at today's current generation of video cards and seen 8MB, 16MB, and 32MB versions gracing the shelves. Nowadays, with imminent next-generation cards about to be released, we'll be seeing 64MB and 128MB iterations as well. Why in the world do you need so much local memory on a video card? Primarily, it's for the texture storage we've talked about here. As games such as Quake 3 Arena and Unreal Tournament leading the pack of 3D games by supporting higher levels of detail and texture size, the amount of texture memory increases dramatically. In fact, Q3A is moving to a simple implementation of skeletal animation to free up memory for high-resolutions and color depths.
Enter texture compression
Now, by taking textures and performing lossy compression algorithms on them, such 2D images can be shrunk down to less than 1/100th the original size, depending on how much detail is preserved (the accuracy of the representation compared to the original image). Using texture compression has two major obvious benefits. The first is storage. If textures are compressed to ½ their normal size, twice as many textures can be used with the same amount of memory, or textures which are twice as big can be used without a performance hit. Secondly, the amount of bandwidth needed to transfer high resolution textures to the graphics engine is dramatically decreased - a 16MB texture compressed to 8MB would transfer in half the time.