Author Topic: FF9 Animation of models  (Read 3130 times)

Zidane_2

  • *
  • Posts: 28
    • View Profile
FF9 Animation of models
« on: 2007-05-21 17:02:13 »
I need some help in animation from ff9.

The animation contains in type 03 section of DB records.

1 byte - it`s type 03(of DB).
1 byte - it`s number of animations in section
2 bytes - zero`s

Next - Block by 2 bytes * number of animations, but i don`t know,what that.      !!!!!!!!
Next - block by 4 bytes * (number of animations +1), that pointers to the anim sequances, last used for find end of last animation sequance.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Animation block:
       First - header 14 bytes:
               2 bytes = 0000         'Start Of offsets'
               2 bytes  - number of frames in this animation block
               2 Bytes - X position of Root Bone
               2 Bytes - Y position of Root Bone
               2 Bytes - Z position of Root Bone
               2 Bytes = 0000 (Not sure)
               2 Bytes - offset from 'Start Of offsets' to table, that contain initail angles of bones
               2 Bytes - !!!!Flags???? if 0, then anim block contain all x,y,z positions animations, if 7 - no position animation, 1 - Y and Z animation (not sure), 2- X and Z animation, end etc (look for bits of numbers from 0 to 7, i think 1-not using animation on they axis, 0 - used. Example 0-in bin 00000000: all 3; 1 in bin 00000001: Y and Z; 2 in bin 00000010:X and Z;.....;6 in bin 00000110: X  |But i not sure to 100% )
               4 bytes - offset from 'Start Of offsets' to end of useful animation info(end of anim angles block).

Next, is block of position animation, but that may not be, or partially(look to the flag in header)
First stripe is X postion animation (2 bytes * frames)
Second stripe is Y postion animation (2 bytes * frames)
Third stripe is Z position animation (2 bytes * frames)

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Next, is table of init angles of bones, i Fink :)
size of table = Number of bones * 8

Each record size of that table = 8 bytes, and contain
Pitch 2 bytes  ?
Yaw 2 bytes   ?
Roll 2 bytes    ?
Flag 2 bytes  - as before in header, but used in animation angles block, becouse anim angles block had length less than: bones*3*frames, and then i sum all flags in that table (0=3, 1=2, 2=2, 3=1, 4=2, 5=1, 6=1, 7=0, by used axises), i get value and if multiply that value by number of frames i get new value = length of anim angles block .

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Please help me analyse Angles data, and make normal euler angles from that data.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Example of that table:

7F 00 00 00 00 00 07 00         A0 01 BA 01 D4 01 00 00
DD FF 00 00 00 00 07 00         EE 01 00 00 00 00 06 00
08 02 22 02 3C 02 00 00         56 02 70 02 8A 02 00 00
A4 02 BE 02 D8 02 00 00         F2 02 0C 03 26 03 00 00
40 03 5A 03 74 03 00 00         8E 03 A8 03 C2 03 00 00
DC 03 F6 03 10 04 00 00         2A 04 44 04 5E 04 00 00
78 04 92 04 AC 04 00 00         C6 04 E0 04 FA 04 00 00
14 05 2E 05 48 05 00 00         62 05 7C 05 96 05 00 00
B0 05 CA 05 E4 05 00 00         FE 05 18 06 32 06 00 00
4C 06 66 06 80 06 00 00         AF FF 00 00 D0 FF 07 00
9A 06 B4 06 CE 06 00 00         E8 06 00 00 00 00 06 00
02 07 1C 07 36 07 00 00         AF FF 00 00 2F 00 07 00
50 07 6A 07 84 07 00 00         9E 07 00 00 00 00 06 00
B8 07 D2 07 EC 07 00 00         06 08 00 00 00 00 06 00
20 08 3A 08 54 08 00 00         6E 08 88 08 A2 08 00 00

In this table value=0+3+0+1+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3+0+3+1+3+0+3+1+3+1+3+3=70
And Value*frames=70*26(1A in hex)=71C - its length of anim axis block
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Next, anim Angle Block.
This block contain angles animation sequence. In this block data divided to 'strips' of sequences for each axis separately. Number of 'strips' = value in table of init angles (From example number of strips = 70). length of one strip = number of frames(one value of one angle = 1 byte).

For example:
Look to the example from init angles table, and you can see:
First have not strips, becouse flag = 7
Second have 3 strips, becouse flag=0, first of them is pitch values, second of them is yaw values and Thrid of them is roll values.
.......
that simple:
Flag=6, Pitch strip only
flag=4, Pitch and Yaw strips
flag=3,Roll strip
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Next Block is similar to table of init angles, but i can`t understand how game use this table.
Next Block is data that i can`t understand too.

Then I change last block ang start game, in game i can`t mark changes of animation of model, but then i change more values to zeros in game appearance many lags, and reset it, becouse that very slow speed.

Please help my analyse init angles, becouse i really need that, and simply intrestead :)

P.S. SORRY for my bad ENGISH.

Akari

  • *
  • Posts: 766
    • View Profile
Re: FF9 Animation of models
« Reply #1 on: 2007-05-22 17:16:01 »
Is this battle model or field model?

This looks like field animation data. At least it looks similar to FFVII =)

Header, Idle position of bones, Animation sequence. There is only one block that I don't understand yet.

Could you PM me animation data file. I want look more closely.
« Last Edit: 2007-05-22 17:30:07 by Akari »