arma:file_formats:paa
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| arma:file_formats:paa [2007/07/10 09:52] – external edit 127.0.0.1 | arma:file_formats:paa [2024/08/01 08:04] (current) – links added. snakeman | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== ArmA 1 PAA / PAC File Format ====== | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | **ArmA 1** aka Armed Assault (ArmA) | ||
| + | |||
| + | |||
| ====== Introduction ====== | ====== Introduction ====== | ||
| - | Of the many image file formats 'out there', | + | Of the many image file formats 'out there', |
| ====== Main Format ====== | ====== Main Format ====== | ||
| Line 7: | Line 15: | ||
| Overall structure of a Paa file is | Overall structure of a Paa file is | ||
| - | < | + | < |
| struct overall | struct overall | ||
| { | { | ||
| Line 19: | Line 27: | ||
| Every PAA file starts with a **TypeOfPaa** | Every PAA file starts with a **TypeOfPaa** | ||
| - | < | + | < |
| - | ushort TypeOfPaa; | + | ushort TypeOfPaa; |
| // 0xFF01 DXT1 compressed texture (may have 1 bit alpha map, check MSDN documentation for details) | // 0xFF01 DXT1 compressed texture (may have 1 bit alpha map, check MSDN documentation for details) | ||
| // 0x1555 Uncompressed RGBA 5:5:5:1 texture | // 0x1555 Uncompressed RGBA 5:5:5:1 texture | ||
| Line 36: | Line 44: | ||
| followed by **optional** header tags | followed by **optional** header tags | ||
| - | < | + | < |
| struct PAA_Tag { | struct PAA_Tag { | ||
| - | byte name[8]; // name of tag is actually reversed when written in file, | + | byte name[8]; // name of tag is actually reversed when written in file, |
| // so OFFSTAGG would be written as GGATSFFO. See below for known tags. | // so OFFSTAGG would be written as GGATSFFO. See below for known tags. | ||
| ULONG tag_size; | ULONG tag_size; | ||
| Line 49: | Line 57: | ||
| **Special Case** | **Special Case** | ||
| - | TypeOfPaa 0x4747 Uncompressed Index Palette texture | + | TypeOfPaa 0x4747 Uncompressed Index Palette texture |
| - | This is a corrupt entry in the sense that it does not have a TypeOfPaa! It is the lead in bytes to a standard AVCGTAGG. The next block of data is, the palette. Followed by ' | + | This is a corrupt entry in the sense that it does not have a TypeOfPaa! It is the lead in bytes to a standard AVCGTAGG. The next block of data is, the palette. Followed by ' |
| Indecipherable commentary from Feersum:\\ | Indecipherable commentary from Feersum:\\ | ||
| If format not 0x4747 then end of header tag data is marked by UWORD 0x0000, else this is a `size of palette` and next block it`s a palette(sizeof = `size of palette` * 2) | If format not 0x4747 then end of header tag data is marked by UWORD 0x0000, else this is a `size of palette` and next block it`s a palette(sizeof = `size of palette` * 2) | ||
| + | |||
| ====== HexDump ====== | ====== HexDump ====== | ||
| - | {{http://tactical.nekromantix.com/images/wiki/ | + | {{https://pmc.editing.wiki/ |
| ====== Known Header Tags ====== | ====== Known Header Tags ====== | ||
| Line 66: | Line 76: | ||
| **OFFSTAGG** | **OFFSTAGG** | ||
| - | < | + | < |
| Sizeof Data (16 x ULONGS) | Sizeof Data (16 x ULONGS) | ||
| Example: | Example: | ||
| Line 78: | Line 88: | ||
| </ | </ | ||
| - | MipMap data is presented in ' | + | MipMap data is presented in ' |
| **AVGCTAGG** | **AVGCTAGG** | ||
| Average Colour | Average Colour | ||
| - | < | + | < |
| Sizeof Data (1 x ULONG) | Sizeof Data (1 x ULONG) | ||
| example: GGATCGVA = FF443D39 | example: GGATCGVA = FF443D39 | ||
| Line 119: | Line 129: | ||
| </ | </ | ||
| - | Swizzle is apparently used to modify texture components processing like swizzle modifiers in pixel shaders. For example ArmA sky texture has green channel stored in alpha channel and inversed | + | Swizzle is apparently used to modify texture components processing like swizzle modifiers in pixel shaders. For example ArmA sky texture has green channel stored in alpha channel and inverted |
| ====== Mipmap Data ====== | ====== Mipmap Data ====== | ||
| Line 125: | Line 136: | ||
| After end-of-header marker, actual mipmap data follows. Tag OFFSTAGG (if supplied) contains (up to) 16 offsets. Each offset points to the following struct type (relative to start of the file). | After end-of-header marker, actual mipmap data follows. Tag OFFSTAGG (if supplied) contains (up to) 16 offsets. Each offset points to the following struct type (relative to start of the file). | ||
| - | < | + | < |
| struct Mipmap_Data { | struct Mipmap_Data { | ||
| UWORD width; | UWORD width; | ||
| UWORD height; | UWORD height; | ||
| - | UCHAR size[3]; | + | UCHAR size[3]; |
| - | UCHAR data[size]; | + | UCHAR data[size]; |
| }; | }; | ||
| </ | </ | ||
| Line 138: | Line 149: | ||
| **Decompression Code** | **Decompression Code** | ||
| - | < | + | < |
| /* | /* | ||
| by Flea | by Flea | ||
| Line 189: | Line 200: | ||
| After last mipmap, there are six (6) bytes set to 0x00 to mark end of texture data. And, | After last mipmap, there are six (6) bytes set to 0x00 to mark end of texture data. And, | ||
| + | |||
| ====== Alpha Channel Interpolation ====== | ====== Alpha Channel Interpolation ====== | ||
| Line 196: | Line 208: | ||
| **FLAGTAGG = 1, interpolated alpha channel (default behaviour)** | **FLAGTAGG = 1, interpolated alpha channel (default behaviour)** | ||
| - | {{http://tactical.nekromantix.com/images/wiki/ | + | {{https://pmc.editing.wiki/ |
| **FLAGTAGG = 2, alpha channel interpolation disabled** | **FLAGTAGG = 2, alpha channel interpolation disabled** | ||
| - | {{http://tactical.nekromantix.com/images/wiki/ | + | {{https://pmc.editing.wiki/ |
| ====== Bibliography ====== | ====== Bibliography ====== | ||
| - | Feersum' | ||
| MSDN documentation on DXT1 textures: [[http:// | MSDN documentation on DXT1 textures: [[http:// | ||
| Squish Compression [[http:// | Squish Compression [[http:// | ||
| + | |||
arma/file_formats/paa.1184061153.txt.gz · Last modified: 2010/07/12 07:19 (external edit)
