DO NOT USE DXT5 ON MODELS! (and other texture compression tips)

dabmasterars

Banned
Mar 20, 2023
293
50
When you're making a texture for TF2, it has to be a .vtf file. The format has a bunch of different options for compression and other data flags. I'm going to quickly explain these settings and when to use them.

DXT1
One of two formats that you're gonna be using the most often. Uses the DXT texture compression algorithm, where 4x4 pixel blocks have limited number of colors.

When to use: Textures with no transparency, textures for models, war paints, normal maps with no alpha/selfillum mask*
When not to use: Textures with transparency*, textures/normal maps with alpha/selfillum mask, UI elements, fine gradients

DXT5
The second most commonly used format. Uses the DXT texture compression algorithm, where 4x4 pixel blocks have limited number of colors and 8 bit transparency value.

When to use: Textures with transparency, textures/normal maps with an alpha/selfillum mask*
When not to use: Textures with no transparency, fine gradients, normal maps with no alpha/selfillum mask*

Misconception: Using DXT5 on textures with no transparency does not increase the quality whatsoever and only wastes file size.

*DXT5's alpha channel can be used as an alpha mask (to tell which pixels are more reflective) or selfillum mask (to tell which pixels glow more).
**DXT1 does support 1-bit (binary) alpha, but VTFEdit most plugins do not support this feature. The VTF spray converter does support it, though. Keep in mind that 1-bit alpha can look rough on some textures. There is also a format called "DXT1 1-bit alpha", but it's broken and doesn't work correctly in TF2.


BGR888/RGB888
Uncompressed texture without transparency.

When to use: Textures with fine detail, textures with fine gradients (skyboxes, for example)

ABGR8888/ARGB8888
Uncompressed texture with transparency.

When to use: Transparent textures with fine detail, gradients with transparency (light beams, for instance)

BGR565
Uncompressed texture with no transparency and limited colors.

When to use: textures that look blocky with DXT compression but don't have fine enough details to warrant using BGR888/RGB888 instead (low resolution textures, for example)

BGRA4444
Uncompressed texture with transparency and half the color depth. The file size is also reduced in half.

When to use: Transparent textures with fine detail and less color variation

BGRX5551
Uncompressed texture with one-bit transparency and limited color depth.

When to use: Transparent textures with hard edges, fine detail and less color variation

I8
Uncompressed grayscale (black and white) texture with no transparency.

When to use: Grayscale textures with fine details

IA88
Uncompressed grayscale (black and white) texture with transparency.

When to use: Grayscale textures with transparency and fine details (transparent-to-black gradient, for instance)

RGBA16161616
Uncompressed high dynamic range (HDR) texture with transparency.

When to use: HDR textures

COMPRESSED HDR
HDR textures can be stored in compressed form using any format with a non-binary alpha channel (BGRA8888 is used by Vtex by default, but DXT5 or BGRA4444 also work).

When to use: HDR textures that don't have smooth gradients

Other formats exist, but I didn't include them, because they're either obsolete or have problems displaying in game.

File size comparison: 1024x1024 texture with mipmaps:
DXT1: 0.68 MB
DXT5: 1.3 MB
BGR888/RGB888: 4 MB
ABGR8888/ARGB8888: 5.3 MB
BGR565: 2.7 MB
BGRA4444: 2.7 MB
BGRX5551: 2.7 MB

I8: 1.3 MB
IA88: 2.7 MB
RGBA16161616: 10.7 MB

If you want to ask a question or point out inconsistencies with the guide, feel free to reply to the thread.

More info
 
Last edited: