This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
high-resolution_texture [2006-07-23 12:13] – skyjake | high-resolution_texture [2009-08-13 15:07] (current) – Robot: Changing Category:Map Author's Guide dewbot | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | Normal [[graphic_patch]]es, | ||
+ | [[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: | ||
+ | |||
+ | |||
+ | |||
+ | ^ Pixel depth^ PCX^ PNG^ TGA | | ||
+ | | 8-bit (paletted)< | ||
+ | | 16-bit| —| —| — | | ||
+ | | 24-bit| —| Yes| Yes< | ||
+ | | 32-bit ([[alpha_channel]])| —| Yes| Yes< | ||
+ | |||
+ | |||
+ | |||
+ | Notes: | ||
+ | - The palette does not have to match the palette of the game. | ||
+ | - TGAs must be type 2 (uncompressed, | ||
+ | |||
+ | 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' | ||
+ | the game' | ||
+ | |||
+ | |||
+ | ====== Visible size ====== | ||
+ | |||
+ | |||
+ | 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' | ||
+ | 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. | ||
+ | |||
+ | |||
+ | ====== Transparency ====== | ||
+ | |||
+ | |||
+ | Color keying is done if the file name of the image ends in " | ||
+ | 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 " | ||
+ | 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. | ||
+ | |||
+ | |||
+ | ====== Flats ====== | ||
+ | |||
+ | |||
+ | The file names of images that replace [[flat]]s must begin with " | ||
+ | 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. | ||
+ | |||
+ | [[version_1_8.6]] added the **Flats** external [[resource_category]]. | ||
+ | order to replace FLOOR7_2, it is enough to put **FLOOR7_2.png** | ||
+ | into the **Flats** directory; no prefix is necessary. | ||
+ | |||
+ | | ||
+ | |||
+ | |||
+ | ====== Command line options ====== | ||
+ | |||
+ | |||
+ | To disable high-resolution textures use the command line option | ||
+ | // | ||
+ | directory from which the textures are searched. | ||
+ | |||
+ | |||
+ | ====== See also ====== | ||
+ | |||
+ | * [[addons]] | ||
+ | |||
+ | |||
+ | |||
+ | |||