BTI (File Format)

From Wexos's Wiki
(Redirected from BTI)
Jump to navigationJump to search

BTI is an image format. It is used a lot in Mario Kart: Double Dash!!, but also appears in other games such as Mario Kart Wii. A BTI file can only contain one texture, with mipmaps, which makes the format very simple.

File Format

The file byte order is always big endian.

Offset Type Description
0x00 Byte Image format. The pixel data type is determined by this value.
0x01 Byte Alpha enabled. 0 disables alpha, anything else enables it.
0x02 UInt16 Width of image in pixels.
0x04 UInt16 Height of image in pixels.
0x06 Byte Wrap S. 0 = Clamp, 1 = Repeat, 2 = Mirror
0x07 Byte Wrap T, same enum as above.
0x08 Byte Has palette.
0x09 Byte Palette format.
0x0A UInt16 Number of palette entries. Each consist of a color of the type specified by the palette format.
0x0C UInt32 Palette offset. Offset to the palette colors.
0x10 Byte Enable mipmaps.
0x11 Byte Enable edge LOD.
0x12 Byte Clamp bias.
0x13 Byte Max anisotropy.
0x14 Byte Minification filter. 0 = Nearest, 1 = Linear
0x15 Byte Magnification filter.
Value Type
0 Nearest
1 Linear
2 Nearest_Mipmap_Nearest
3 Linear_Mipmap_Nearest
4 Nearest_Mipmap_Linear
5 Linear_Mipmap_Linear
0x16 Byte Min LOD, multiplied by 8.
0x17 Byte Max LOD, multiplied by 8.
0x18 Byte Total number of images, including the main level image.
0x19 Byte Unknown.
0x1A Int16 LOD bias, multiplied by 100.
0x1C UInt32 Image data offset. Offset to the data of the first image. The mipmaps are stored directly after the end of the first image.

Tools

The following tools can handle BTI files: