Miscellaneous Forums > Scripting and Reverse Engineering

FF8 Field Models - More information

<< < (3/3)

Vehek:
Been a long time, but I think you divide it by 4096 to get the percentage of a full revolution, then convert it to whatever angular measure unit you're using. But the MCH models in main_chr.fs (like d024.mch you're viewing) don't use that packed system I described. They use simple 16-bit (2-byte) integers. All the real animations anyway aren't in those model files, but part of the chara.one files in the archives for each field.

red_evilspirit:
Following your post, i knew the animations are stored in chara.one files. I just thought i can get T-pose with that code.
----------------------------
I found this in an old topic.

--- Quote from: Vehek on 2009-05-25 04:15:19 ---My guess on how the chara.one files work. Might be incorrect because I didn't do any disassembly or testing in-game.


--- Code: (Chara.one Header Hypothesis) ---0x00: Number of PC and NPC models (32-bit). Might not count for calculating offsets.
0x04: First model's header (detailed below)

PC Model chara.one header:
0x00: Pointer to animation data? (32-bit)
0x04: Size of the animation data or whatever it is. (32-bit)
0x08: Size again.
0x0C: MCH number? (32-bit? Upper 16-bits might determine whether header refers to PC or NPC)
0x10: 4 bytes
0x14: MCH name? Not sure if used. (4 bytes)
0x18: 4 unknown bytes

NPC header:
0x00: Pointer to first TIM (32-bit)
0x04: Size of TIM & Model data (32-bit)
0x08: Size again.
0x10: MCH-type header possibly starts here. Offsets are relative to the TIM image.
After the model data pointer: 8 unknown bytes.

Both types usually end with the hex bytes "EE EE EE EE" after the unknown bytes, though there may be exceptions.
--- End code ---

Edit: The next to last section (the section pointed to by the DWORD at 0x38 of the model data header) of the MCH model data looks similar to what I guessed to be the animation data in the chara.one files. So that might be the pose information.


--- Code: (Animation Section hypothesis) ---Section Header:
WORD Number of animations

Animation Header:
WORD Number of frames
WORD Number of joints (Koral labeled them bones.)

In that old thread, Qhimm said the animations were stored using 4 bytes per node. By counting I think there might also be an additional 6 bytes per frame, but I'm not absolutely sure.

--- End code ---

--- End quote ---
Is it the structure of char.one ?
It look like http://wiki.ffrtt.ru/index.php/FF8/FileFormat_ONE, but i can't check when it is npc or main field model

===========================

--- Quote ---32-bit? Upper 16-bits
--- End quote ---
Does it like this?

--- Code: ---type = readUInt()
type >> 16
--- End code ---

Navigation

[0] Message Index

[*] Previous page

Go to full version