TGA
Truevision Graphics Adapter (TGA), commonly referred to as "targa" (Truevision Advanced Raster Graphics Adapter), is a non-proprietary image format from Truevision that is favoured by Valve. .tga is also the file extension of that format. It is the base format for Valve Texture Files (.vtf), and used to store images used by the Steam client.
TGA files can be saved with a fourth channel, called the Alpha channel, which usually defines the transparency. (The three basic channels define red, blue, and green content of the image.) However, VMF shaders can use the alpha channel for other information.
Valid targa format for Vtex
For a targa image to be recognized as valid by Vtex, it must meet the following criteria:
- It must be 24 or 32 bits/pixel in depth. (16 bits/pixel is not recognized.)
- Its sides (height and width) must have a pixel size equal to a power of 2. (i.e. 16, 32, 64, 128, 256, 512, etc.)
- Its sides can not be bigger than 2048 pixels.
- The height and width doesn't need to be the same - 64x128, 256x512 works fine - but square images are preferred by the Source engine, so use them whenever possible, even when it doesn't seem like the best way to go.
- RLE compression is optional, but should be avoided due to occational convertion troubles.
For textures that appear on large surfaces a good scale is 512 pixels for 128 Hammer-units. This is the default scale at which Hammer will apply textures and equals about 10 feet or about 3 meters in the game.
The image can also contain an alpha channel to be used with effects such as transparency or specularity.