texHeaders.bin File Format: Difference between revisions
Jump to navigation
Jump to search
m (→mipmap: oops) |
m (→TexBody) |
||
Line 27: | Line 27: | ||
ulong AlwaysDefault; // 0xFFFFFFFF | ulong AlwaysDefault; // 0xFFFFFFFF | ||
byteBool OnOff[4]; // 01 01 00 01 typical | byteBool OnOff[4]; // 01 01 00 01 typical | ||
// 4th bool always set. 3rd bool seems related to NoAlphaWrite | |||
ulong SameCount; // always == nMipmaps | ulong SameCount; // always == nMipmaps | ||
ulong TextureType; // see below | ulong TextureType; // see below | ||
Line 34: | Line 35: | ||
Asciiz PaaFile[]; //"data\icons\m4a3_cco_ca.paa" | Asciiz PaaFile[]; //"data\icons\m4a3_cco_ca.paa" | ||
//"fnfal\data\fnfal_smdi.paa" | //"fnfal\data\fnfal_smdi.paa" | ||
ulong | ulong SomeCount; //Range 0..12. Might be bitflags | ||
ulong nMipmaps; | ulong nMipmaps; | ||
MipMap MipMaps[nMipmaps]; | MipMap MipMaps[nMipmaps]; |
Revision as of 08:49, 21 June 2011
intro
TextHeader.bin is created by Binpbo personal edition 2.5 and greater. It is placed in the primary folder of the addon.pbo, and comprises of information from all pax files encountered in that addon from all it's possible data trees.
Information here has been gleaned from the very few texheaders in Arrowhead (approx 24) and won't necessarily be complete as a result.
Conventions
see Generic FileFormat Data Types
File Structure
struct TexHeader.bin { MimeType "0DHT" ; // NOT asciiz. '0' = 0x30. This is mimetype "TexHeaDer0" ulong version; // 1 ulong nTextures; // TexBody TexBodies[nTextures]; };
TexBody
TexBody { ulong Always1; ulong Always0; floats AverageColor[r,g,b,a];//AVGCTAGG floating-point equivalent. Note that order is different bytes AverageColor[b,g,r,a];//AVGCTAGG in PAx file bytes MaxColor[b,g,r,a]; //MAXCTAGG in PAx file ulong Always0; ulong AlwaysDefault; // 0xFFFFFFFF byteBool OnOff[4]; // 01 01 00 01 typical // 4th bool always set. 3rd bool seems related to NoAlphaWrite ulong SameCount; // always == nMipmaps ulong TextureType; // see below byte Always1; byte Always1; Asciiz PaaFile[]; //"data\icons\m4a3_cco_ca.paa" //"fnfal\data\fnfal_smdi.paa" ulong SomeCount; //Range 0..12. Might be bitflags ulong nMipmaps; MipMap MipMaps[nMipmaps]; ulong EndOfMipMaps; //offset in pax to last (dummy) mipmap };
- BIS have finally learned to use relative file addressing. This might be the precursor to a better future where we leave oops modelling nightmares behind.
Texture Type
values seen
- 0 GREY
- 4 RGB4
- 6 DXT1
- 10 DXT5
this value is repeated in each mipmap
Color float
anyfloat= anybyte/255.0;
mipmap
MipMap { ushort width,ushort height; //as per same mipmap in the pax ushort Always0; byte TextureType; //same value as above byte Always3; ulong dataOffset; //OFFSTAGG in PAx file. position of mipmap data in pax file };