TXTR (Metroid Prime): Difference between revisions
→Image Formats
imported>Antidote |
>Aruki |
||
(11 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
'''TXTR''' is, as the name suggests, the Retro Studios texture format. | ''See [[TXTR (File Format)]] for the other revisions of this format.'' | ||
'''TXTR''' is, as the name suggests, the Retro Studios texture format. The format remains completely unchanged from Metroid Prime all the way up to Donkey Kong Country Returns. | |||
{{todo|Could possibly use some more information on how the formats work and how to decode them, but then again the Custom Mario Kart Wiiki has this covered pretty nicely already.}} | |||
__TOC__ | __TOC__ | ||
Line 31: | Line 35: | ||
|- | |- | ||
| 0xC | | 0xC | ||
| colspan=2 | End of header | | colspan=2 {{unknown|End of header}} | ||
|} | |} | ||
Line 49: | Line 53: | ||
| 0x4 | | 0x4 | ||
| 2 | | 2 | ||
| | | '''Width'''. always 1 in C4, 256 in C8 | ||
|- | |- | ||
| 0x6 | | 0x6 | ||
| 2 | | 2 | ||
| | | '''Height'''. always 16 in C4, 1 in C8 | ||
|- | |- | ||
| 0x8 | | 0x8 | ||
Line 59: | Line 63: | ||
| '''Palette colors'''. 16-bit color values; 16 colors in C4, 256 in C8. | | '''Palette colors'''. 16-bit color values; 16 colors in C4, 256 in C8. | ||
|- | |- | ||
| colspan=3 | End of palette table; image data begins immediately after | | colspan=3 {{unknown|End of palette table; image data begins immediately after}} | ||
|} | |} | ||
== Image Formats == | == Image Formats == | ||
There are 11 different image formats | There are 11 different image formats supported by the hardware. Rather than storing pixels in a linear left-to-right order, GameCube textures are swizzled in blocks. Blocks are 32 bytes large (except for RGBA8), with their dimensions varying depending on the BPP of the image format. | ||
For example, suppose you have a format that stores 4x4 blocks. Pixels 1-4 of the image will make up the first row of the first block; pixels 5-8 will make up the second row; 9-12 will make up the third row; 13-16 will make up the fourth row, completing the block; and | For example, suppose you have a format that stores 4x4 blocks. Pixels 1-4 of the image will make up the first row of the first block; pixels 5-8 will make up the second row; 9-12 will make up the third row; 13-16 will make up the fourth row, completing the block; and then 17-20 will begin the first row of the second block, appearing directly to the right of the first row of the first block. | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 139: | Line 143: | ||
| 4 | | 4 | ||
| 8x8 | | 8x8 | ||
| DXT1 | | Compressed textures (almost the same as DXT1, but with a couple small differences) | ||
|} | |} | ||
== External links == | == External links == | ||
* [http://wiki.tockdom.com/wiki/Image_Formats Custom Mario Kart | * [http://wiki.tockdom.com/wiki/Image_Formats Custom Mario Kart Wiki]: More detailed information on each format, and how to decode them. | ||
[[Category:File Formats]] | [[Category:File Formats]] | ||
[[Category:Metroid Prime]] | |||
[[Category:Metroid Prime 2: Echoes]] | |||
[[Category:Metroid Prime 3: Corruption]] | |||
[[Category:Donkey Kong Country Returns]] |