1
Scripting and Reverse Engineering / Final Fantasy® VII battle animation formats exposed!
« on: 2004-10-16 06:36:08 »
Argh... I hadn't touched the anim data for about a year and a half and you suckered me back into looking at it tonight.
I translated the unknown part of Cloud's anim to bit form a long time ago and lined it up. Once you view it as a bitstream it's pretty apparent where the translations are because you have huge strings of zeroes. It looks to me like the second frame is ~39 bytes, the third ~40, the fourth ~39, and the rest about +/-5 from those for a total of 19 deltas + 1 key = 20 frames. 39 bytes for 34 axis deltas plus a translation comes out to a little over 8 bits per non-zero axis, which isn't out of line.
What I don't like is that (a) the translations have to be bitshifted to align, and (b) the really nutty things the game does when you flip single bits are in line with a variable-length coding scheme getting derailed temporarily. I tried comparing the deltas you listed again the bitstream, and didn't see an obvious correlation; you'd expect that the low bits of each delta would show up in sequence but that didn't seem to be the case.
By the way, the first three longs don't appear in the PSX data -- this is what I see in the start of the third record for CLOUD.LZS, which corresponds to the bone data you posted:
I translated the unknown part of Cloud's anim to bit form a long time ago and lined it up. Once you view it as a bitstream it's pretty apparent where the translations are because you have huge strings of zeroes. It looks to me like the second frame is ~39 bytes, the third ~40, the fourth ~39, and the rest about +/-5 from those for a total of 19 deltas + 1 key = 20 frames. 39 bytes for 34 axis deltas plus a translation comes out to a little over 8 bits per non-zero axis, which isn't out of line.
What I don't like is that (a) the translations have to be bitshifted to align, and (b) the really nutty things the game does when you flip single bits are in line with a variable-length coding scheme getting derailed temporarily. I tried comparing the deltas you listed again the bitstream, and didn't see an obvious correlation; you'd expect that the low bits of each delta would show up in sequence but that didn't seem to be the case.
By the way, the first three longs don't appear in the PSX data -- this is what I see in the start of the third record for CLOUD.LZS, which corresponds to the bone data you posted:
Code: [Select]
00000000: 14 00 56 03 00 00 00 FE-2E 00 00 00 00 00 00 0C