Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Format:BTI texture (JSystem)

From ReverseEngineering.wiki
Format
On this wiki Facts · Code · Notes · Topics

The J3D/JSystem texture image header (.bti, also embedded in TEX1 of BMD/BDL models and in RARC archives): a 0x20-byte big-endian header with GX format, size, wrap modes, palette, filters, LOD, mip count and a data offset, followed by GX tiled pixel data.

Overview

BTI is the texture container of Nintendo's JSystem (Library:JSystem). Standalone .bti files and the texture entries of the TEX1 chunk of Format:J3D model (BMD, BDL) use the same header; pixel data uses the GX formats of Format:GX texture formats (GameCube and Wii). Source: noclip.website (MIT) src/Common/JSYSTEM/JUTTexture.ts, readBTI_Texture, at commit fd973ff240233c63883750a557c62baf6ff2a6c7 (read, not run). All reads use DataView defaults, which are big endian.

Header

readBTI_Texture (lines 24-55) reads: u8 format at 0x00 (GX texture format id), u16 width at 0x02, u16 height at 0x04, u8 wrapS at 0x06, u8 wrapT at 0x07, u8 palette format at 0x09 (GX TLUT id), u16 palette entry count at 0x0A, u32 palette data offset at 0x0C, u8 max anisotropy at 0x13, u8 min filter at 0x14, u8 mag filter at 0x15, s8 minLOD at 0x16 (value / 8), s8 maxLOD at 0x17 (value / 8), u8 mip count at 0x18, s16 LOD bias at 0x1A (value / 100), u32 image data offset at 0x1C. Bytes 0x01, 0x08, 0x0B, 0x10-0x12 and 0x19 are not read by this function; Unverified: their meaning (alpha flag, palette-enabled flag, LOD-enable bits and padding are plausible but not seen in this source).

Offsets for the image data and the palette are relative to the start of the BTI header (the reader slices the header buffer at those offsets); a value of 0 means absent. The palette byte size is entry count times 2. The reader asserts minLOD is 0.

Wrap modes: 0 clamp, 1 repeat, 2 mirror. Filters: 0 near, 1 linear, 2 near-mip-near, 3 linear-mip-near, 4 near-mip-linear, 5 linear-mip-linear (gx_enum.ts lines 24-31 and 315-319).

In models

In TEX1 of a BMD/BDL, the headers are stored one after another in the chunk, and their offsets are relative to each header, not to the chunk. Unverified: this was not read in this pass; check Format:J3D model (BMD, BDL) and the TEX1 parser.

Related

Format:TPL texture palette (the SDK's own texture file with similar fields), Format:RARC archive.

Code & repositories

  • https://github.com/magcius/noclip.website @ fd973ff240233c63883750a557c62baf6ff2a6c7 · license: MIT (declared by the contributor for the files used; GitHub reports MIT (read from LICENSE; GitHub's detector did not classify it) for the repository)
    src/gx/gx_enum.ts, gx_texture.ts, src/Common/JSYSTEM/JUTTexture.ts, src/rres/brres.ts and u8.ts: TypeScript parsers for GX textures, BTI, BRRES and U8
    Tested on: source read, not run · checked 2026-10-19; last activity 2026-10-19