m
Move page script moved page BLP file to WoW:BLP file without leaving a redirect
m (Move page script moved page BLP file to WoW:BLP file without leaving a redirect) |
|||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{uiaddon}} | {{uiaddon|toc=0}} | ||
A [[BLP file]] is a texture file format known to be used for games, including many Blizzard games such as ''World of Warcraft''. | A [[BLP file]] is a texture file format known to be used for games, including many Blizzard games such as ''World of Warcraft''. | ||
| Line 21: | Line 20: | ||
uint32_t palette[265]; // A set of 256 ARGB values used as a color palette | uint32_t palette[265]; // A set of 256 ARGB values used as a color palette | ||
} blp2header; | } blp2header; | ||
==== Notes ==== | ==== Notes ==== | ||
* The actual number of 'mip' levels determined by image size | * The actual number of 'mip' levels determined by image size | ||
| Line 27: | Line 26: | ||
* '''WoW''' has shipped with a small number of BLPs with dimensions that are not powers of two; 768x128 is used for many cube map textures, for example. In this case, the final stored mipmap may not be 1x1. (this last part may not be accurate) | * '''WoW''' has shipped with a small number of BLPs with dimensions that are not powers of two; 768x128 is used for many cube map textures, for example. In this case, the final stored mipmap may not be 1x1. (this last part may not be accurate) | ||
* Compression type 3 'Uncompressed' appeared in Cataclysm, and data layout is canonical A8R8G8B8, which is essentially uncompressed 24-bit color with 8-bit alpha. | * Compression type 3 'Uncompressed' appeared in Cataclysm, and data layout is canonical A8R8G8B8, which is essentially uncompressed 24-bit color with 8-bit alpha. | ||
* The header always includes a 256-entry color table. | * The header always includes a 256-entry color table. Each entry a 32-bit BGRA 8888 value. This table is only used for BLP format image data, but is present in all BLPs regardless. | ||
== Compression == | == Compression == | ||
BLP, DXT1, DXT3, DXT5 or Uncompressed 8-bit per channel ARGB. | BLP, DXT1, DXT3, DXT5 or Uncompressed 8-bit per channel ARGB. | ||
=== BLP compression === | === BLP compression === | ||
This is the BLP specific image format, where the 'compression' is via the use of a palette, and the use of alpha flags where 'alpha' data is omitted if flags indicate that there is no alpha data at the end of the regular image data for a given 'mip' level. | |||
This is the BLP specific image format, where the 'compression' is via the use of a palette, and the use of alpha flags where 'alpha' data is omitted if flags indicate that there is no alpha data at the end of the regular image data for a given 'mip' level. | |||
If 'compression' is 1, each mipmap is stored as an array of 8-bit values, one per pixel, left to right, top to bottom. Each value is an index to the palette. | If 'compression' is 1, each mipmap is stored as an array of 8-bit values, one per pixel, left to right, top to bottom. Each value is an index to the palette. | ||
| Line 42: | Line 39: | ||
=== Uncompressed === | === Uncompressed === | ||
If 'compression' is 3, each mipmap contains plain 32-bit BGRA data. | If 'compression' is 3, each mipmap contains plain 32-bit BGRA data. | ||
| Line 48: | Line 44: | ||
=== DXTC compression === | === DXTC compression === | ||
DXT is an industry standard texture compression format, designed originally for efficiency in real time graphics rendering and decompression in hardware. Most current 3D hardware supports loading some form of DXTC data directly. See [[Wikipedia:S3TC|Wikipedia's entry on DXT compression]] for more detail. | DXT is an industry standard texture compression format, designed originally for efficiency in real time graphics rendering and decompression in hardware. Most current 3D hardware supports loading some form of DXTC data directly. See [[Wikipedia:S3TC|Wikipedia's entry on DXT compression]] for more detail. | ||
| Line 54: | Line 49: | ||
==== DXT1 ==== | ==== DXT1 ==== | ||
If 'alpha_type' is 0, then DXT1 compression is used. | If 'alpha_type' is 0, then DXT1 compression is used. | ||
| Line 62: | Line 56: | ||
==== DXT3 ==== | ==== DXT3 ==== | ||
If 'alpha_type' is 1, then DXT3 compression is used. | If 'alpha_type' is 1, then DXT3 compression is used. | ||
| Line 68: | Line 61: | ||
==== DXT5 ==== | ==== DXT5 ==== | ||
If 'alpha_type' is 8, then DXT5 compression is used. This format was first used for Burning Crusade images. | |||
If 'alpha_type' is | |||
Each block is 128 bits and begins with two 8-bit values to create an 8 element lookup table for alpha values. The first two elements in the lookup table are copies of those values. If the first value is less than or equal to the second, the final two entries of the lookup table are reserved for transparent and opaque. The remaining entries are created by interpolating between the first two entries in the lookup table. The next 48 bits make up 16 3-bit values acting as lookups specifying the alpha values for each of the pixels in the block. The remaining 64 bits are identical to DXT1, except that no special color is reserved in the palette. | Each block is 128 bits and begins with two 8-bit values to create an 8 element lookup table for alpha values. The first two elements in the lookup table are copies of those values. If the first value is less than or equal to the second, the final two entries of the lookup table are reserved for transparent and opaque. The remaining entries are created by interpolating between the first two entries in the lookup table. The next 48 bits make up 16 3-bit values acting as lookups specifying the alpha values for each of the pixels in the block. The remaining 64 bits are identical to DXT1, except that no special color is reserved in the palette. | ||
== Sample Files == | == Sample Files == | ||
Below is a list of BLP files, each with some unique characteristic. | Below is a list of BLP files, each with some unique characteristic. | ||