User Tools

Site Tools


modding:detail_texture

Detail textures are grayscale images that are rendered on top of normal textures when walls and planes are viewed from close by. A signed-add blending is used, which lets the detail texture either darken or brighten the underlying texture: black → dark, gray → no change, white → bright.

Detail textures can be loaded from external image resources (from the Textures directory), or pcx images or raw_image data stored inside a wad lump. The best method for loading detail textures is from an external resource using the file parameter within the detail definition. Or you can include your detail textures in a WAD file or load them manually using -file option from the command. When using the -file option to load detail textures, the file names of the images become lump names (see file_option_).

If an external resource is used as the detail texture, its dimensions must be powers of two (for example 128×64 or 256×256). The image file must be in one of the supported_image_file_formats.

PCX images used as detail textures must have a color depth of 8 bits and their width and height must be powers of two. The palette should be a grayscale one. It's possible to use other colors but the result can be weird due to the way the blending of detail textures is done.

If the source data is a raw image, it must be either 64×64, 128×128 or 256×256 pixels in size. Raw images contain only the pixel values, (one byte per pixel) and have only one color component per pixel (they're black and white images), which means the lump or file that contains the detail texture can either be 4096, 16384 or 65536 bytes long.

Using the default scaling, the pixels of detail textures are four times smaller than the pixels of regular textures.

Variables

See also

modding/detail_texture.txt · Last modified: 2009-08-13 15:04 by dewbot