Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - perkyplumber

Pages: [1]
1
Final Fantasy VIII battle files Animation data decryption

General

Number of animations      Long Integer
Offset to Animation stream   Long Integer ( * Number of Animations )

Animation stream

Number of frames      Byte

The rest of this data needs to be decoded 1 bit at a time. Byte boundaries are ignored.

position xyz of bone 0               variable length
rotation xyz of bone 0 to number of bones      Variable length


Position data

bits 1,2 data length 00 = 3bits 01 = 6bits 10 = 9 bits 11 = 16bits
data signed integer multiply by 0.15
repeat for y and z position then skip 1 bit

Rotation data


bone angle valid ( 1 = true 0 = false )
next 2 bits data length 00 = 3bits 01 = 6bits 10 = 8 bits 11 = 12bits
data signed integer
repeat until number of bones * 3 are read

repeat reading position and rotation data * number of frames

for frame 1 convert data to degrees using 180 * data / 2048
for the rest of the frames add the data to frame-1 data before
converting to degrees

ie frame 1 bone0.x = -949   180 * -949 / 2048       = -83.408 degrees
   frame 2 bone0.x = 9      180 * (-949 + 9) / 2048 = -82.617 degrees

Pages: [1]