Difference between revisions of "FTEX (File Format)"
Jump to navigation
Jump to search
(→Header (FTEX): I don't have time to do a proper analysis now, but I've added the infomation I could glean from my notes.) |
(Added some stuff I found in TexConv2.) |
||
Line 17: | Line 17: | ||
| 0x04 | | 0x04 | ||
| 4 | | 4 | ||
− | + | | '''Dim'''. Indicates the "shape" of a given surface or texture (see line 849 [http://pastebin.com/DCrP1w9x here]). | |
|- | |- | ||
| 0x08 | | 0x08 | ||
Line 29: | Line 29: | ||
| 0x10 | | 0x10 | ||
| 4 | | 4 | ||
− | + | | '''Depth''' | |
|- | |- | ||
| 0x14 | | 0x14 | ||
− | | | + | | 4 |
− | | | + | | '''numMips''' |
|- | |- | ||
− | | | + | | 0x18 |
− | | | + | | 4 |
− | + | | '''Texture Format'''. Go to line 589 on [http://pastebin.com/DCrP1w9x this page] for explanation and format values. | |
|- | |- | ||
− | | | + | | 0x1C |
− | | | + | | 4 |
− | | ''' | + | | '''AA Mode'''. Indicates the AA mode (number of samples) for the surface (see line 865 [http://pastebin.com/DCrP1w9x here]). |
|- | |- | ||
− | | | + | | 0x20 |
− | | | + | | 4 |
− | | | + | | '''Usage'''. Indicates how the given surface may be used (see line 823 [http://pastebin.com/DCrP1w9x here]). |
|- | |- | ||
| 0x24 | | 0x24 | ||
Line 52: | Line 52: | ||
|- | |- | ||
| 0x28 | | 0x28 | ||
− | | | + | | 4 |
+ | | {{Unknown}} | ||
+ | |- | ||
+ | | 0x2C | ||
+ | | 4 | ||
+ | | '''mipSize''' | ||
+ | |- | ||
+ | | 0x30 | ||
+ | | 4 | ||
+ | | {{Unknown}} | ||
+ | |- | ||
+ | | 0x34 | ||
+ | | 4 | ||
+ | | '''Tile Mode'''. Indicates the desired tiling mode for the surface (see line 795 [http://pastebin.com/DCrP1w9x here]). | ||
+ | |- | ||
+ | | 0x38 | ||
+ | | 4 | ||
+ | | '''Swizzle Value''' | ||
+ | |- | ||
+ | | 0x3C | ||
+ | | 4 | ||
+ | | '''Alignment''' | ||
+ | |- | ||
+ | | 0x40 | ||
+ | | 4 | ||
+ | | '''Pitch''' | ||
+ | |- | ||
+ | | 0x44 | ||
+ | | 0x6C | ||
| {{Unknown}} | | {{Unknown}} | ||
|- | |- |
Revision as of 13:34, 1 March 2015
Under Construction
This article is not finished. Help improve it by adding accurate information or correcting grammar and spelling. Please do not add speculation here.
The FTEX texture format is a format for textures which appears as a subfile of a BFRES file.
Header (FTEX)
Every FTEX file begins with an 0xC0 byte FTEX header.
Offset | Size | Description |
---|---|---|
0x00 | 4 | "FTEX" File identifier, ASCII string. |
0x04 | 4 | Dim. Indicates the "shape" of a given surface or texture (see line 849 here). |
0x08 | 4 | Texture Width. Width of the texture in pixels. |
0x0C | 4 | Texture Height. Height of the texture in pixels. |
0x10 | 4 | Depth |
0x14 | 4 | numMips |
0x18 | 4 | Texture Format. Go to line 589 on this page for explanation and format values. |
0x1C | 4 | AA Mode. Indicates the AA mode (number of samples) for the surface (see line 865 here). |
0x20 | 4 | Usage. Indicates how the given surface may be used (see line 823 here). |
0x24 | 4 | Data Length. Length of texture data in bytes. |
0x28 | 4 | unknown |
0x2C | 4 | mipSize |
0x30 | 4 | unknown |
0x34 | 4 | Tile Mode. Indicates the desired tiling mode for the surface (see line 795 here). |
0x38 | 4 | Swizzle Value |
0x3C | 4 | Alignment |
0x40 | 4 | Pitch |
0x44 | 0x6C | unknown |
0xB0 | 4 | Data Offset. Offset to the texture data. Relative to this field. |
0xB4 | 4 | Mipmap Offset. Offset to the mipmap texture data. Relative to this field. 0 if not present. |
0xB8 | 8 | unknown |
0xC0 | End of FTEX header |
Incomplete header documentation. Last 8 words (32 bytes) seem to change per file. Offset 160 (dec) from FTEX header always seems to be zero, followed by a single byte (value of 1), 3 padding bytes, then a relative offset to the string table, then a relative offset to UnknownDataA, a relative offset to UnknownDataB, a relative offset to unknown DataC, and then two more unknowns (usually zero).