FF9/File/0x02

From Final Fantasy Inside
< FF9
Revision as of 12:36, 4 April 2018 by my_wiki>BukTop (5 revisions imported)

3D Model Header

Global header for the 3D model, one per model.
Size: 20 bytes


Offset Size Description
0x00 WORD NULL (0x0000)
0x02 BYTE Number of Bones
0x03 BYTE Number of Groups
0x04 WORD Total size of data, excl. all headers (3D Model/Bone/Object-Group Headers)
0x06 WORD Unknown (possible an ID)
0x08 WORD Unknown (possible an ID)
0x0A WORD Unknown (possible an ID)
0x0C DWORD Pointer to Bone Header(s)
0x10 WORD Pointer to Group Header(s)


Bone Header

Global header for bones, one header per bone.
Size: 4 bytes


Offset Size Description
0x00 24BIT Length
0x03 BYTE Parent Bone


Group Header

Global header for groups, one header per group.
Size: 40 bytes


Offset Size Description
0x00 WORD Size of the group's data (excluding the header).
0x02 WORD Number of Quadrangle Polygons (Type-A)
0x04 WORD Number of Triangle Polygons (Type-A)
0x06 WORD Number of Quadrangle Polygons (Type-B)
0x08 WORD Number of Triangle Polygons (Type-B)
0x0A WORD Number of Quadrangle Polygons (Type-C)
0x0C WORD Number of Triangle Polygons (Type-C)
0x0E WORD Group X offset
0x10 WORD Group Y offset
0x12 WORD Group Z offset
0x14 DWORD Pointer to Bone Data Chunk
0x18 DWORD Pointer to Vertex Data Chunk
0x1C DWORD Pointer to Polygon Data Chunk
0x20 DWORD Pointer to Texture Mapping Data Chunk
0x24 DWORD Pointer to End-of-Group


Bone Data Chunk

Local group data for bones, one data chunk per bone of the group.
Size: 4 bytes


Offset Size Description
0x00 DWORD Number of vertices connected to the bone


Vertex Data Chunk

Local group data for vertices, one data chunk per vertex of the group.
Size: 8 bytes


Offset Size Description
0x00 WORD X-Coordinate (signed value)
0x02 WORD Y-Coordinate (signed value)
0x04 WORD Z-Coordinate (signed value)
0x06 BYTE ID of the bone the vertex is connected to
0x07 BYTE Unknown


Polygon Data Chunk

Local group data for polygons.
There are six different types of polygons, three types of polygons made out of four vertices (quadrangle) and three types of polygons made out of three vertices (triangle).


Quadrangle Type-A

Size: 24 bytes

Offset Size Description
0x00 WORD Vertex index 1
0x02 WORD Vertex index 2
0x04 WORD Vertex index 3
0x06 WORD Vertex index 4
0x08 WORD Texture index 1
0x0A WORD Texture index 2
0x0C WORD Texture index 3
0x0E WORD Texture index 4
0x10 24BIT Vertex colour (R8G8B8)
0x13 BYTE Texture material index (Referenced to 0x12 chunk)
0x14 DWORD Unknown

Triangle Type-A

Size: 20 bytes

Offset Size Description
0x00 WORD Vertex index 1
0x02 WORD Vertex index 2
0x04 WORD Vertex index 3
0x06 BYTE Texture material index (Referenced to 0x12 chunk)
0x07 BYTE Unknown
0x08 24BIT Vertex colour (R8G8B8) ?
0x0B BYTE Unknown
0x0C WORD Texture index 1
0x0E WORD Texture index 2
0x10 WORD Texture index 3
0x12 DWORD If first bit = 1, then packet type chenging from 0x24 to 0x26 and "ANDed" with 0xE0 part "ORing" with TPage.

Quadrangle Type-B

Size: 32 bytes


Triangle Type-B

Size: 24 bytes


Quadrangle Type-C

Size: 24 bytes


Triangle Type-C

Size: 20 bytes


Texture Mapping Data Chunk

Local group data for texture mapping.
The number of texture mapping coordinates are: Number of quadrangle polygons (any type) * 4 + Number of triangle polygons (any type) * 3.
Size: 2 bytes


Offset Size Description
0x00 BYTE U-Coordinate
0x01 BYTE V-Coordinate