Normal graphic patches, wall textures and flats can be replaced with TGA (Truevision Targa), PNG (Portable Network Graphics) or PCX (Zsoft Paintbrush) images. The resolution of these external images can be higher than the resolution of the original graphics.
Supported image file formats
The engine currently supports these image formats:
|32-bit (alpha channel)||—||Yes||Yes(2)|
- The palette does not have to match the palette of the game.
- TGAs must be type 2 (uncompressed, unmapped RGB).
Note that 32-bit images are just 24-bit images with an additional 8 bits per pixel for the alpha channel.
The recommended format for high-resolution textures is paletted PNG. It is the easiest format in which to distribute the textures due to its small size. Since the palette doesn't have to be the same as the game's, it should be enough for many textures.
The high-resolution textures can be of any size. The engine will render them scaled so that they fit the size of the original texture. This means the aspect ratio of the new texture doesn't have to be the same as of the original texture. Note that the engine will have to resize all textures so that their dimensions are powers of two (e.g. 32, 64, 128, 256). This means TGA/PNG textures whose width and height are already powers of two can be loaded faster.
Color keying is done if the file name of the image ends in "-ck", for example brnbigc-ck.png. Both cyan (0,255,255) and purple (255,0,255) are used as key colors.
An alternative way to have transparency is to use an alpha channel. In it, white (255) means opaque and black (0) is fully transparent. All values in between can be used, too, for partly translucent pixels. When using an alpha channel, the "-ck" suffix is not needed.
Example: Replacing a wall texture
To create a high-resolution texture for the wall texture STARTAN3 you'd place a TGA file named STARTAN3.tga or a PNG file named STARTAN3.png into the Textures directory.
The file names of images that replace flats must begin with "Flat-", e.g. to replace the flat FLOOR7_2 you'd need to have a TGA file Flat-FLOOR7_2.tga in the Textures directory. If there are both PNG and TGA versions of the same texture, the engine will use the PNG version.
- Note: The file names of high-resolution textures must match the texture names, not the names of the patches that make up the textures. For example: DOOR2_5 is a patch name, DOOR3 is the texture that uses DOOR2_5.
Command line options
To disable high-resolution textures use the command line option -nohightex. The option -texdir can be used to change the directory from which the textures are searched.