Format:J3D model (BMD, BDL)
| On this wiki | Facts · Code · Notes · Topics |
|---|
JSystem's model container for GameCube and Wii games (.bmd, .bdl, .bmt, and animation files .bck .btk .brk .bpk .bca .btp): a 0x20-byte header with an 8-character magic such as J3D2bmd3 or J3D2bdl4 and a chunk count, then four-character chunks (INF1, VTX1, EVP1, DRW1, JNT1, SHP1, MAT3, TEX1).
Overview
J3D is the model format loaded by the J3D module of Library:JSystem (J3DModelLoader). Everything is big endian. The chunk layout below is from the loader in magcius/noclip.website (MIT; src/Common/JSYSTEM/J3D/J3DLoader.ts), which reads the format used by Super Mario Sunshine, Wind Waker, Twilight Princess, Super Mario Galaxy and others. Models are commonly packed in Format:RARC archives, often Format:Yaz0-compressed.
File header (0x20 bytes)
| Offset | Field |
|---|---|
| 0x00 | 8-byte magic: J3D2 plus a type: bmd2 (early, MAT2 chunk), bmd3 (model), bdl4 (model with display-list chunk MDL3), bmt3 (material table only)
|
| 0x08 | u32 file size |
| 0x0C | u32 chunk count |
| 0x10 | 16-byte sub-version string |
| 0x20 | first chunk |
Animation files use the prefix J3D1: J3D1bck1 (joint animation, chunk ANK1), J3D1bca1 (ANF1), J3D1btk1 (texture matrix animation, chunk TTK1), J3D1brk1 (TRK1, register colours), J3D1bpk1 (PAK1), J3D1btp1 (texture pattern, TPT1), plus a VAF1 (vertex animation) chunk type.
Chunks
Each chunk is a four-character id and a u32 size (chunks are consecutive; the loader advances by the size). Model files carry them in this order: INF1 (scene graph), VTX1 (vertex arrays and formats), EVP1 (envelopes), DRW1 (draw matrices), JNT1 (joints), SHP1 (shapes, GX display lists), MAT3 (materials; MAT2 in bmd2), optionally MDL3 (precompiled material display lists, in .bdl), TEX1 (textures). noclip notes that TTK1 chunks need a size bias of -4.
- INF1: u16 load flags at +0x08 (low nibble is the scaling rule: 0 basic, 1 XSI, 2 Maya), u32 matrix group count at +0x0C, u32 vertex count at +0x10, u32 hierarchy offset at +0x14. The hierarchy is a stream of nodes whose type values are (Unverified: each node is a u16 type plus a u16 index): 0x00 end, 0x01 open (push), 0x02 close (pop), 0x10 joint, 0x11 material, 0x12 shape.
- VTX1: u32 vertex format table offset at +0x08, then a lookup table of array data offsets from +0x0C (positions, normals, colours, texture coordinates in GX formats).
Related
Library:JSystem, Format:RARC archive, Platform:Nintendo GameCube, Platform:Nintendo Wii.
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)
Browser-based map viewer; src/Common/JSYSTEM holds readers for J3D models and animations (J3DLoader.ts), JKRArchive (RARC), JPA particles, J2D and JStudio
Tested on: source read, not run: source read, not run · checked 2026-10-18; last activity 2026-10-06