Changes
Jump to navigation
Jump to search
After header there is 12 bytes of data that are unknown to me. It could be some center of the coordinate system or anything. Frame starts with 6 floats (unknown)the root rotations and root translations, followed by rotations for each bone. Rotations are stored as 3 floats (float is 4byte floating-point number).
== Data Organization ==
== "A" Field Animation Files for PC by [[User:Mirex|Mirex]] (Edits by [[User:Aali|Aali]]) ==
Each animation file holds one character animation ( run, walk or some other). Some characters have more animation files. Animation is set of frames, in each frame are stored bone rotations.
|-
|style="background:rgb(255,255,255)" | header
|style="background:rgb(255,255,255)" align="center" | 24|-|style="background:rgb(255,255,255)" | unknown|style="background:rgb(255,255,255)" align="center" | 1236
|-
|style="background:rgb(255,255,255)" | frames
|}
-- one frame, size is (bones * 12 + 2412 + 12) -- unknown 24 bytes = 6 floatsrotations bones * 12 bytes = bones * 3 floats
{| border="0" cellspacing="1" cellpadding="3" style="background: rgb(0,0,0)" align="center"
! style="background:rgb(204,204,204)" align="center" | Size
|-
|style="background:rgb(255,255,255)" | unknownroot rotation|style="background:rgb(255,255,255)" align="center" | 24 12 = 6 3 floats|-|style="background:rgb(255,255,255)" | root translation|style="background:rgb(255,255,255)" align="center" | 12 = 3 floats
|-
|style="background:rgb(255,255,255)" | rotations
|}
header structure, 24 36 bytes
struct {
unsigned long x1version;
unsigned long frames_count;
unsigned long bones_count;
unsigned char rotation_order[3]; unsigned char unused; unsigned long x2, x3, x4runtime_data[5];
} anim_head;
I understand only two values from the header, 'frames_count' which is number of animation frames and 'bones_count' which is suprisingly number of animated bones.
''version should always be 1 or FF7 will not load the file''
''rotation order determines in which order rotations are applied, 0 means alpha rotation, 1 beta rotation and 2 gamma rotation.''
If you want to load all possible animations for the model (even animations of different models) then check if animation file has same number of bones as current model.