Difference between revisions of "TXTR (Tropical Freeze)"
From Retro Modding Wiki
m (→Format) |
(adding some info that RandomTalkingBush figured out - just wanting to get the info up, we can clean it up later when we understand more of it) |
||
Line 33: | Line 33: | ||
| u32 | | u32 | ||
| 4 | | 4 | ||
− | | | + | | '''Image Format''' |
| | | | ||
|- | |- | ||
Line 63: | Line 63: | ||
| u32 | | u32 | ||
| 4 | | 4 | ||
− | | | + | | '''Swizzle''' |
| | | | ||
|- | |- | ||
Line 107: | Line 107: | ||
| {{unknown|Unknown}} | | {{unknown|Unknown}} | ||
| | | | ||
+ | |} | ||
+ | |||
+ | == Image Formats == | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! ID | ||
+ | ! Name | ||
+ | |- | ||
+ | | 0x14 | ||
+ | | DXT1 | ||
+ | |- | ||
+ | | 0x18 | ||
+ | | DXT5 | ||
+ | |- | ||
+ | | 0x1C | ||
+ | | ATI2 | ||
|} | |} | ||
Revision as of 05:52, 24 December 2015
See TXTR (File Format) for the other revisions of this format.
The TXTR format is Tropical Freeze's texture format. The image data in the GPU buffer is compressed using LZSS compression.
This file format needs a lot of research Most everything in the header + image compression formats needs to be cracked + documented. |
Format
The format starts with the typical RFRM Header found in every Tropical Freeze format. Following that, there's a HEAD header section that contains most of the texture parameters, then the GPU section containing the actual compressed image data. This is the structure of the HEAD section:
Offset | Type | Size | Description | Notes |
---|---|---|---|---|
0x0 | Section Header | 0x18 | "HEAD" section header | |
0x18 | u32 | 4 | Unknown | |
0x1C | u32 | 4 | Image Format | |
0x20 | u32 | 4 | Width | |
0x24 | u32 | 4 | Height | |
0x28 | u32 | 4 | Depth | |
0x2C | u32 | 4 | Unknown | |
0x30 | u32 | 4 | Swizzle | |
0x34 | u32 | 4 | Unknown | Mipmap count? (MC) |
0x38 | u32[MC] | 4 × MC | Unknown array | Appears to be mipmap sizes, but it doesn't match the size of the image data (unless there's 1)... |
- | u32 | 4 | Unknown | |
- | u8 | 1 | Unknown | |
- | u8 | 1 | Unknown | |
- | u8 | 1 | Unknown | |
- | u8 | 1 | Unknown |
Image Formats
ID | Name |
---|---|
0x14 | DXT1 |
0x18 | DXT5 |
0x1C | ATI2 |
PAK Metadata
The pak metadata for the TXTR format primarily contains compression-related information and provides the values required to decompress it.
Offset | Type | Size | Description | Notes |
---|---|---|---|---|
0x0 | u32 | 4 | Unknown | |
0x4 | u32 | 4 | Unknown | |
0x8 | u32 | 4 | GPU section offset | Relative to the start of the file |
0xC | u32 | 4 | Unknown | |
0x10 | u32 | 4 | GPU data start | This is the offset to the start of the GPU data, immediately after the GPU section header. |
0x14 | u32 | 4 | GPU section size | Matches the size from the GPU section header. |
0x18 | u32 | 4 | Compressed buffer count (BC) | |
0x1C | Compressed Buffer[BC] | 0xC × BC | Compressed buffer metadata |
Compressed Buffer
This is a small struct that defines a compressed data buffer within the GPU section.
Offset | Type | Description | Notes |
---|---|---|---|
0x0 | u32 | Decompressed Size | |
0x4 | u32 | Compressed Size | |
0x8 | u32 | Offset | Relative to after the GPU section header |