WoW:BLP file: Difference between revisions

No change in size ,  17 May 2020
m
no edit summary
(Correct alpha_type for DXT5)
mNo edit summary
Line 1: Line 1:
{{uiaddon}}A [[BLP file]] is a texture file format known to be used for games, including many Blizzard games such as ''World of Warcraft''.
{{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''.


The BLP file structure consists of a header including the palette, and up to 16 pre-rendered 'mipmaps'. Texture sizes must be powers of two, though the two dimensions do not have to be equal; 512x256 is valid, but 512x200 is not. The first mipmap ('mipmap' level 0) is the full size image; each subsequent mipmap halves both dimensions. The final 'mipmap' should normally be 1x1.
The BLP file structure consists of a header including the palette, and up to 16 pre-rendered 'mipmaps'. Texture sizes must be powers of two, though the two dimensions do not have to be equal; 512x256 is valid, but 512x200 is not. The first mipmap ('mipmap' level 0) is the full size image; each subsequent mipmap halves both dimensions. The final 'mipmap' should normally be 1x1.
Line 19: 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 29:


== 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.


Line 39: 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 45: 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 51: 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 59: 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 65: 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 8, then DXT5 compression is used. This format was first used for Burning Crusade images.


Line 71: Line 66:


== 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.