For the past few years, a lot of exciting developments have been happening in the world of 3D technology. Companies churn out new products and enhancements on a regular basis that common users find it difficult to keep up and choose the best products for them. [no_toc]

In the domestic/gaming 3D graphics niche, texture compression is currently among the more interesting innovations. The technology is fast gaining in popularity due to the rising demand in texture size, specifically in detailing in games that now require 32-bit textures and texture memory extension. The problem that most manufacturers face is in extending the texture volume without resorting to increasing the video cards’ local memory.

256X256 without compression 512X512 with compression
256x256
512x512

The solution is simple: texture compression technology. S3 Inc. is the first company to offer such a solution which it named S3 Texture Compression or simply S3TC.

game textures

Game textures:

diag1
Test textures:

diag2
A number of popular games have adopted and started using S3TC including Quake 3 Arena and other games running on its engine), Soldier of Fortune, Start Trek: Elite Force, and Unreal Treatment, among others. A local memory of 16/32 MB is not always enough to run these games, what with textures and 32-bit mode running.

Compression quality: visual representation

Higher detailing is necessary in some games like Quake 3 and Unreal Treatment, and it can only be possible with compression support.

chapthroatooz.tga

32-bit 16-bit with floyd-steinberg dithering
chapthroatooz_sub
chapthroatooz_sub-1
S3TC FXT1
chapthroatooz_sub-2
chapthroatooz_sub-3

The compression speed relies on several factors, depending on the method used.

inteldimclouds.tga

32-bit 16-bit with floyd-steinberg dithering
32inteldimclouds_sub
16inteldimclouds_sub(1)
S3TC FXT1
32inteldimclouds_sub-1
16_inteldimclouds_sub(1)

If the game has been using compressed textures from the start, developers may not require frequent texture compression.

teleportEffect2.tga

32-bit 16-bit with floyd-steinberg dithering
32teleporteffect2_sub
16teleporteffect2_sub(1)
S3TC FXT1
32_teleporteffect2_sub
16_teleporteffect2_sub(1)

During testing, for example, S3TC succeeded in compressing 256X256X32 textures for a few seconds, while 3dfx baby achieved something similar for around 50 to 60 seconds.

abstrwav.tga

32-bit 16-bit with floyd-steinberg dithering
32abstrwav_sub
16abstrwav_sub(1)
S3TC FXT1
32_abstrwav_sub
16_abstrwav_sub(1)

While 3dfx may be advanced and complex, the poor speed performance indicates that a lot of work needs to be done to optimize speed.

reference.tga

32-bit 16-bit with floyd-steinberg dithering
32reference_sub
16reference_sub
S3TC FXT1
32_reference_sub
16_reference_sub(1)

Nothing much can be said for sure about decompression speed.

topsmap.tga

32-bit 16-bit with floyd-steinberg dithering
32topsmap_sub(1)
16topsmap_sub
S3TC FXT1
32_topsmap_sub(2)
16_topsmap_sub

During testing, the textures were quickly decompressed. What matters is that the process must be of a decent speed with specific drivers and hardware.

pixtest.tga

32-bit 16-bit with floyd-steinberg dithering
32pixtest_sub
16pixtest_sub
S3TC FXT1
32_pixtest_sub(1)
16_pixtest_sub(1)

Manufacturers who acknowledge the hardware aspect in texture decompression have come up with decently fast texture decompression tools.

chapthroatooz.tga

32-bit 16-bit with floyd-steinberg dithering
32none_diff
16chapthroatooz_diff
S3TC FXT1
32_chapthroatooz_diff
16_chapthroatooz_diff

Data loss may or may not happen in compression.

inteldimclouds.tga

32-bit 16-bit with floyd-steinberg dithering
32__none_diff
16__inteldimclouds_diff
S3TC FXT1
32___inteldimclouds_diff
16___inteldimclouds_diff(1)

There’s no data loss in methods that are intended for archiving like Huffman and LZW, as well as in PNG and GIF graphics formats.

teleportEffect2.tga

32-bit 16-bit with floyd-steinberg dithering
32_4none_diff
16_4teleporteffect2_diff
S3TC FXT1
16_5teleporteffect2_diff
32_5teleporteffect2_diff(1)

However, data loss is a fact of life in methods like MPEG, JPEG, and modern audio codecs.

abstrwav.tga

32-bit 16-bit with floyd-steinberg dithering
32_6none_diff
16_6abstrwav_diff
S3TC FXT1
32_7abstrwav_diff
16_7abstrwav_diff(1)

reference.tga

32-bit 16-bit with floyd-steinberg dithering
32_8none_diff
16_8reference_diff(1)
S3TC FXT1
32_9reference_diff
16_9reference_diff

topsmap.tga

32-bit 16-bit with floyd-steinberg dithering
32_10none_diff
16_10topsmap_diff
S3TC FXT1
16_11topsmap_diff(1)
16_11topsmap_diff

The two technologies considered both offer compression with data loss. However, the losses are only slight and not easily noticeable. A JPEG photo, for example, that has a quality of 85 at 800×600 or better, would seem identical to the original when viewed on a 15” monitor.

topsmap.tga

32-bit 16-bit with floyd-steinberg dithering
32_12none_diff
16_12pixtest_diff
S3TC FXT1
32_13pixtest_diff(1)
16_13pixtest_diff

You don’t have to worry about artifacts when closely examining a compressed texture. With decent compression and decompression on large textures, each texel of uncompressed texture is replaced by around 4 to 8 compressed texels.

S3TC and FXT1 use the same general principles. The degree of texture compression remains constant – 8x compression rate (w/ alpha channel) for FXT1, and 4x (w/ alpha), and 6x (w/o alpha) for S3TC. To illustrate, 256x256x32 w/ alpha is compressed by FXT1 to 32 Kbytes from 256, while S3TC does it from 256 Kbytes to 64.

While the winner here is obvious, it does not say anything about quality.

Compression Quality

To determine image artifact sensitivity, you need to check out the figures for the same compressed textures. You can use a JPEG image with an 85 quality rating, and convert it back to the original. In our test, the results showed 42 Kbytes for S3TC and 32 Kbytes for FXT1.

Compression Technology in General

It has been proven beyond doubt that more detailed textures can be achieved with a reduced memory sized. All that developers have to do now is to take full advantage of S3TC/DXTC’s current texture compression technology. This will help uncover areas for improvement that will trigger further development in the 3D technology industry.

There are a few things in our wish list, and these include: more compression coefficients resulting to different quality, option for users to select the compression method to use for each type of texture, and the option for compression separation at various textures.

Conclusion

Newer texture compression methods typically offer better (or at least similar) results, compared to 16-bit textures, while taking up a lot less in terms of video memory. With S3TC, compressed texture quality is the same as a 32-bit uncompressed texture, except for a few cases such as light maps and sky textures.

For such cases, you can restrain compression or select the appropriate texture format. You may also need to compromise either speed or quality in favor of the other. The Serious Sam Test game used this approach, and allowed the user pick the texture format individually for floors/ceilings/walls, light maps, monster/gamer models, and others. There is a wide array of choices.

Since S3TC appeared on the market way ahead of its competitors, a lot of graphic card manufacturers have been using it before solutions from other companies came out. The S3TC technology offers good compressed image quality, but at the expense of having a larger size than FXT1. Its big advantage is that it has DirectX support.

On the other hand, FXT1 brings to the table a compression method with comparatively higher losses in quality compared to S3TC. This allows for a smaller texture size, although quality and speed are compromised in some instances. As far as compression degree is concerned, however, FXT1 offers the best option – at least until the perfect technology comes along. Another good thing about the method is that it is open, although it hasn’t been taken advantage of much.

The real test for this tool is when it is used in real games. Sadly, it may not happen in the near future as S3TC is already firmly entrenched in the niche. It is doing quite well so developers don’t see an immediate need to find an alternative.