UDN
Search public documentation:
TextureComparison
日本語訳
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
DXTC: DXTC Examples and Technical Comparison
Document Summary: Comparison between DirectX Texture compression types with uncompressed and palettized. Excellent for all skill and experience levels. Document Changelog: Last updated by Tom Lin (DemiurgeStudios?), for document summary. Original author was Lucas Alonso.Introduction
Purpose
The purpose of this document is to enlighten you, the content creator, on when it is appropriate to use the DXTC format to compress your textures, and in which cases they're better left uncompressed, or palettized using Bright.DXTC Fundamentals
The portion of the DXTC algorithm that concerns us for this document is the part that compresses color information, because this is done the same way in ALL DXTC variants (DXT1-5). Color information is stored in a similar fashion as standard palettized bitmaps, but instead of storing a 256 color palette for the whole image, DXTC stores a small palette for every 4x4 block of pixels. Each of these mini-palettes can represent up to four colors, but two of the colors are interpolated from the other two and are not actually stored with the file. This allows you to compress a bitmap that would have normally been 65k into merely 32k, and therefore allows you to store twice the amount of textures in video memory, or store the same amount of textures but at double the resolution.NVIDIA DXT1 Issue
The hardware implementation of the DXT1 decompressor on NVidia hardware has some problems with quality. This is because the texture is processed internally in 16bit color instead of 32bit, and therefore quality, particularly that of darker shades, suffers considerably. All the other DXTC formats (DXT2-5) are not affected by this problem, but they store alpha information, which isn't so great if the texture you're trying to compress doesn't even utilize the alpha channel. But since the only format that doesn't store alpha information has quality issues, you're limited to using it in very specific cases.Examples
Texture 1
SOURCE | SOURCE DETAIL |
---|---|
BRIGHT | BRIGHT DETAIL |
DXTC | DXTC DETAIL |
NVIDIA DXT1 | NVIDIA DXT1 DETAIL |
Gradient
SOURCE | SOURCE DETAIL |
---|---|
BRIGHT | BRIGHT DETAIL |
DXTC | DXTC DETAIL |
NVIDIA DXT1 | NVIDIA DXT1 DETAIL |
Texture 2
SOURCE | SOURCE DETAIL |
---|---|
BRIGHT | BRIGHT DETAIL |
DXTC | DXTC DETAIL |
NVIDIA DXT1 | NVIDIA DXT1 DETAIL |
Texture 3
SOURCE | SOURCE DETAIL |
---|---|
BRIGHT | BRIGHT DETAIL |
DXTC | DXTC DETAIL |
NVIDIA DXT1 | NVIDIA DXT1 DETAIL |
Rainbow Gradient
SOURCE | SOURCE DETAIL |
---|---|
BRIGHT | BRIGHT DETAIL |
DXTC | DXTC DETAIL |
NVIDIA DXT1 | NVIDIA DXT1 DETAIL |
Text/HUD Art
SOURCE | SOURCE DETAIL |
---|---|
BRIGHT | BRIGHT DETAIL |
DXTC | DXTC DETAIL |
NVIDIA DXT1 | NVIDIA DXT1 DETAIL |
DXTC Nightmare
SOURCE | SOURCE DETAIL |
---|---|
BRIGHT | BRIGHT DETAIL |
DXTC | DXTC DETAIL |
NVIDIA DXT1 | NVIDIA DXT1 DETAIL |
Conclusions
- Avoid DXT1 when guaranteed quality is needed - choose another DXTC variant that doesn't have issues on NVidia hardware, and check your DXT1 textures on NVidia hardware before committing to them.
- Don't use DXTC for special purpose textures where quality is of utmost importance, like text and height maps.
- Do use DXTC when compressing normal textures, the quality degradation is barely noticeable (DXT3/5).
- Since 8bit palettized textures are converted to 32bit before uploading, there's no benefit to them except the smaller stored size on disk. Use only when they look the same as an uncompressed 32bit.