Miscellaneous Forums > Scripting and Reverse Engineering

FF8 Field Models - More information

(1/3) > >>

Vehek:
This is what I've learned about the FF8 MCH format, to add on to the information already collected.
Model header
Offset   Length   Description
0x1C   0x02   Triangle count
0x1E   0x02   Quad count

Undescribed data between vertices and faces
This appears to be texture-animations e.g. eye blinks. Its entry in the first part of the model header appears to be the length of the section, rather than the count.
Guess at structure. My names are rather rough.

--- Code: ---struct
{
byte unknown
byte total_textures?
byte unknown
byte uSize
byte vSize
byte replacement_section_count
UV_pair original_area_coords
byte unknown[2]
UV_pair replacement_coords[replacement_section_count]
}
--- End code ---

Face data
Offset   Length   Description
0x08   0x02   When bit 0x04 set, face has semi-transparency
0x36   0x02   Texture index

Undescribed data between faces and skin-objects
Seems to split up the skin-objects, triangles, and quads.
(A guess)

--- Code: ---struct
{
uint16 start_skinobject_index
uint16 skinobject_count
byte unknown[12]
uint16 start_triangle_index
uint16 triangle_count
uint16 start_quad_index
uint16 quad_count
byte unknown2[8]
}
--- End code ---

Some models (d049, d053, d075, and p019) have two of this data type.


Animations
The first 6 bytes of each animation frame are the coordinates shift (3 signed 16-bit numbers). I am only sure of the last one being the Z-shift.

Player models actually do have animation data after all, just in a different form than the one I documented in the field chara.one files. They use a simple six bytes per bone.


--
Edit: updated texture animation info

myst6re:
Wow, thank you for this supplementary informations, It must be added to the wiki!

Edit: I am currently editing the wiki: for face data the offset 0x36 is already in use by Vertex UV, it is a mistake?

Vehek:
The information in the wiki entry is misaligned due to its creator not knowing about/not making use of the section offsets in the model header, and therefore not being able to skip around the unknown sections. Faces are supposed to begin with the Polygon Type. This affects the skin objects as well, which actually start with the start vertex.

Edit: Mixed up what the skin-objects start with. Fixed.

myst6re:
You should give me the complete structures for Face and Skin-Object data, I may write errors ^^.

Vehek:
Faces
Here's JWP's version, with my additions:

struct face {
   u32 opcode; 0x07060125 = triangle, 0907012d = Quad
   BYTE unk[4];
   SHORT unknown; //When bit 0x04 is set, sets semitransparency
   BYTE unk[2];
   u16 verticies[4]; //vertex id's
   u16 verticies1[4]; //Edge data???
   u32 Vertex_Colours[4];
    TextureMap TextureData[4]; //haven't tested yet
    u16 Padding;
    u16 textureIndex;
    u32 padding[2];
   //64 bytes
};

Here's the structure I keep in my notes

--- Code: ---DWORD gpu_opcode
BYTE unk[4]
SHORT unkTransp //if this AND's with 0x04, sets semitransparency
BYTE unk2[2]
SHORT vertices[4]
SHORT vertices2[4]
DWORD Vertex_colors[4]
BYTE u1
BYTE v1
BYTE u2
BYTE v2
BYTE u3
BYTE v3
BYTE u4
BYTE v4
SHORT unused1?
SHORT textureNum
SHORT unused2?
SHORT unused3
SHORT unused4
SHORT unused5
--- End code ---

Skin Objects

I don't think mine is any different than what Qhimm wrote many years ago, but here it is anyway.

--- Code: ---?short vertexNum?
?short numOfVertices?
?short bone-index?
?short unknown?
--- End code ---

--
I've found that the model known as "n028" (Red Giant, in fejail1) has a value of 3 for its second bye of its texture animation data, but has 4 textures. Does this disprove my idea of it being the texture count? Out of 232 field models with texture animations, this is the only one that doesn't match up.

Anything else I should post about the format?

Navigation

[0] Message Index

[#] Next page

Go to full version