|
|
|
|
|
Please take note! For mod developers working with Unreal Tournament 2003, this documentation is meant to be a starting point for your own explorations into UT2003, not a definitive guide. There will be differences between the documentation here and the product in your hands, and you may have to figure out quite a bit for yourself. Check out the Unreal Tournament 2003 page in the Unreal Powered area for links to community sites if you're having problems. UDN is a licensee support site, and cannot provide technical support or game-specific assistance to end users.
|
|
|
|
TextureComparison |
|
|
|
|
|
Licensees can log in.
Interested in the Unreal engine? Check out the licensing page.
Questions about UDN itself? Contact the UDN Staff.
|
|
|
|
|
|
|
|
|
DXTC: DXTC eXamples and Technical Comparison
Last updated by Vito Miliano (UdnStaff), for conversion and some content edits. Original author was Lucas Alonso (DemiurgeStudios).
- DXTC: DXTC eXamples and Technical Comparison
- Introduction
- Purpose
- DXTC Fundamentals
- NVIDIA DXT1 Issue
- Examples
- Texture 1
- Gradient
- Texture 2
- Texture 3
- Rainbow Gradient
- Text/HUD Art
- DXTC Nightmare
- Conclusions
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.
SOURCE | SOURCE DETAIL |
| |
BRIGHT | BRIGHT DETAIL |
| |
DXTC | DXTC DETAIL |
| |
NVIDIA DXT1 | NVIDIA DXT1 DETAIL |
| |
While you can't really tell the difference between the 3 textures with this example at normal scale, by zooming in we can begin to see the artifacts caused by DXTC compression (small blocks of uniform colors). In this case, the artifacting is barely appreciable even when magnified, so this type of texture would be ideal to use with DXTC. The in-game NVidia DXT1 looks quite blurry, so unless you don't mind the lost clarity, you might consider using DXT3.
SOURCE | SOURCE DETAIL |
| |
BRIGHT | BRIGHT DETAIL |
| |
DXTC | DXTC DETAIL |
| |
NVIDIA DXT1 | NVIDIA DXT1 DETAIL |
| |
However, in this case you can plainly see the banding in the DXTC texture, while the Bright example retains full quality. Again, this is because the DXTC algorithm can only use 4 colors per 4x4 block of pixels, which means if there's enough color variation within the blocks, you get output like this. Definitely don't use DXT1 for this type of thing.
SOURCE | SOURCE DETAIL |
| |
BRIGHT | BRIGHT DETAIL |
| |
DXTC | DXTC DETAIL |
| |
NVIDIA DXT1 | NVIDIA DXT1 DETAIL |
| |
Like Example 1, this is the type of texture you would normally use DXTC on. It's very difficult to appreciate the lost quality of the DXTC compressed texture.
SOURCE | SOURCE DETAIL |
| |
BRIGHT | BRIGHT DETAIL |
| |
DXTC | DXTC DETAIL |
| |
NVIDIA DXT1 | NVIDIA DXT1 DETAIL |
| |
Again, a standard texture. While the DXTC artifacting is easily visible in the magnified texture, you would be hard pressed to tell the difference between the SOURCE texture and the DXTC compressed one. Bright does a great job as well.
SOURCE | SOURCE DETAIL |
| |
BRIGHT | BRIGHT DETAIL |
| |
DXTC | DXTC DETAIL |
| |
NVIDIA DXT1 | NVIDIA DXT1 DETAIL |
| |
In this example, you can plainly see that Bright is having a hard time turning the 42,000 colors used in this texture into just 256. While Bright's attempt is impressive, the DXTC compressed or the uncompressed 32bit texture are better choices in this type of situation. You should avoid DXT1.
SOURCE | SOURCE DETAIL |
| |
BRIGHT | BRIGHT DETAIL |
| |
DXTC | DXTC DETAIL |
| |
NVIDIA DXT1 | NVIDIA DXT1 DETAIL |
| |
For composite text/hud images and related textures, you probably don't want to use DXTC, as this example shows. The block artifacting around the text makes it quite ugly. Bright or the uncompressed texture are better options.
DXTC Nightmare
SOURCE | SOURCE DETAIL |
| |
BRIGHT | BRIGHT DETAIL |
| |
DXTC | DXTC DETAIL |
| |
NVIDIA DXT1 | NVIDIA DXT1 DETAIL |
| |
This is truly unfair :-). With 16 unique colors in each 4x4 block, there's no way DXTC can even come close to compressing this in an acceptable manner. Bright has no problem, since there are only 16 unique colors in the whole texture.
- 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.
|
|