.BLP
Encyclopedia
.BLP files are texture files used in video games made by Blizzard Entertainment
Blizzard Entertainment
Blizzard Entertainment, Inc. is an American video game developer and publisher founded on February 8, 1991 under the name Silicon & Synapse by three graduates of UCLA, Michael Morhaime, Allen Adham and Frank Pearce and currently owned by French company Activision Blizzard...

, also used in other games like Neverwinter Nights
Neverwinter Nights
Neverwinter Nights , produced by BioWare and published by Infogrames , is a third-person perspective computer role-playing game that is based on third edition Dungeons & Dragons and Forgotten Realms rules. It was originally to be published by Interplay Entertainment, but the publisher's financial...

. While Blizzard provides an Interface AddOn Kit
Software development kit
A software development kit is typically a set of software development tools that allows for the creation of applications for a certain software package, software framework, hardware platform, computer system, video game console, operating system, or similar platform.It may be something as simple...

 for extracting the user interface
User interface
The user interface, in the industrial design field of human–machine interaction, is the space where interaction between humans and machines occurs. The goal of interaction between a human and a machine at the user interface is effective operation and control of the machine, and feedback from the...

 files from the World of Warcraft
World of Warcraft
World of Warcraft is a massively multiplayer online role-playing game by Blizzard Entertainment. It is the fourth released game set in the fantasy Warcraft universe, which was first introduced by Warcraft: Orcs & Humans in 1994...

.MPQ archive files, they do not provide a utility to view the .BLP files contained within. Also, .BLP graphics were used for Warcraft III
Warcraft III: Reign of Chaos
Warcraft III: Reign of Chaos is a real time strategy computer game released by Blizzard Entertainment on July 3, 2002 . It is the second sequel to Warcraft: Orcs & Humans, and it is the third game set in the Warcraft Universe...

, and are also stored within .MPQs.

Format

The file starts with a proprietary header, followed by the texture data. The texture data are typically stored in DXT1, DXT3, uncompressed or possibly DXT5. It is important to note that the size of the image is a power of 2.

Converters

Several third party applications exist that can convert .BLP files to .tga
Truevision TGA
Truevision TGA, often referred to as TARGA, is a raster graphics file format created by Truevision Inc. . It was the native format of TARGA and VISTA boards, which were the first graphic cards for IBM-compatible PCs to support Highcolor/truecolor display...

 files and vice versa. Some of the programs were made for Warcraft III textures, however, and don't work for all Blizzard game textures. These converters have become very important to the Warcraft III modding community, and have been the doorway to the vast amount of customised skins available for download.

Specification

Note that all types are little-endian.

Only the BLP2 format is shown here; for the BLP1 format, refer to BLP version 1 format specifications.

BLP2 Format

struct BLP2Header
{
FourCC ID; // Always 'BLP2'
UInt32 Type;
UInt8 Encoding;
UInt8 AlphaDepth;
UInt8 AlphaEncoding;
UInt8 HasMips;
UInt32 Width;
UInt32 Height;+7
UInt32 Offsets[16];
UInt32 Lengths[16];
ARGBColor8 Palette[256];
};

Type
0: JPEG compression
1: Uncompressed or DirectX compression

Encoding
1: Uncompressed
2: DirectX compression

AlphaDepth
0: No alpha channel
1: 1 bit alpha
4: 4 bit alpha (DXT3 only)
8: 8 bit alpha

AlphaEncoding
0: DXT1 alpha (0 or 1 bit alpha)
1: DXT2/3 alpha (4 bit alpha)
7: DXT4/5 alpha (interpolated alpha)

HasMips
0: No mip levels
1: Mip levels present (the number of levels is determined by the image size)

Width, Height: Dimensions of the image in pixels (always a power of two)

Offsets[0]: Offset from the start of the file to the image data
Lengths[0]: Length in bytes of the image data
Palette: 4-byte BGRA color values for paletted textures (this field is present regardless of whether the texture actually uses palettes)

Type 1 Encoding Schemes

Type 1 Encoding 1 AlphaDepth 0 (uncompressed paletted image with no alpha) : Each byte of the image data is an index into Palette which contains the actual RGB value for the pixel. Although the palette entries are 32-bits, the alpha value of each Palette entry may contain garbage and should be discarded.
Type 1 Encoding 1 AlphaDepth 1 (uncompressed paletted image with 1-bit alpha) : This is the same as Type 1 Encoding 1 AlphaDepth 0 except that immediately following the index array is a second image array containing 1-bit alpha values for each pixel. The first byte of the array is for pixels 0 through 7, the second byte for pixels 8 through 15 and so on. Bit 0 of each byte corresponds to the first pixel (leftmost) in the group, bit 7 to the rightmost. A set bit indicates the pixel is opaque while a zero bit indicates a transparent pixel.
Type 1 Encoding 1 AlphaDepth 8 (uncompressed paletted image with 8-bit alpha) : This is the same as Type 1 Encoding 1 AlphaDepth 0 except that immediately following the index array is a second image array containing the actual 8-bit alpha values for each pixel. This second array starts at BLP2Header.Offset[0] + BLP2Header.Width * BLP2Header.Height.
Type 1 Encoding 2 AlphaDepth 0 (DXT1 no alpha) : The image data are formatted using DXT1 compression with no alpha channel.
Type 1 Encoding 2 AlphaDepth 1 (DXT1 one bit alpha) : The image data are formatted using DXT1 compression with a one-bit alpha channel.
Type 1 Encoding 2 AlphaDepth 4 AlphaEncoding 1 (DXT3 four bits alpha) : The image data are formatted using DXT3 compression.
Type 1 Encoding 2 AlphaDepth 8 AlphaEncoding 1 (DXT3 eight bits alpha) : The image data are formatted using DXT3 compression.
Type 1 Encoding 2 AlphaDepth 8 AlphaEncoding 7 (DXT5) : The image data are formatted using DXT5 compression.

External links

  • .blp viewer (for World of Warcraft
    World of Warcraft
    World of Warcraft is a massively multiplayer online role-playing game by Blizzard Entertainment. It is the fourth released game set in the fantasy Warcraft universe, which was first introduced by Warcraft: Orcs & Humans in 1994...

     BLPs) for Mac OS X
    Mac OS X
    Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

  • The Hive Workshop's skin database, currently at over 2300 Warcraft III skins.
  • Warcraft 3 Unlimited's Skin Database, over 100 unique Warcraft III skins.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK