Author Topic: I think I almost have the .a file format  (Read 5051 times)

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
I think I almost have the .a file format
« on: 2001-06-04 20:21:00 »
I took a look at it last night and bounced some ideas off of qhimm. I think wetween the both of us we almost have to .a format figured out. I'll post what I've got so far. Qhimm or any of you can see if this effects FF7 the way I think.

Ok, all .a files  sectioned up into a header and then some "frames" Eash frame is a "pose" that the character is in during an animation. The header tells how many frames there are and other things I haven't quite figured out yet. The frames after that each have thier own header and then rotation data for each bone after that in the order of the bones are orderd in the HRC file. Qhimm says that the rotation data is stored as floats. I'll give an easy example of a single frame animation (the "stainding" pose for the characters) Now a standard male character has 21 bones. these are hip, chest, head, l_chest, l_collar, l_uparm, l_foarm, l_hand, r_chest, r_collar, r_uparm,
r_foarm, r_hand, l_hip, l_femur, l_tibia, l_foot, r_hip, r_femur, r_tibia, and r_foot

The standing model is broken down like this. Oh this is from AAFE.A

Offset: data
-----------
00000000 01000000 .... ;header
00000004 01000000 .... ;Number of frames(01)
00000008 15000000 ....
0000000C 01000200 ....
00000010 48E86701 H.g.
00000014 20AC6701  .g.
00000018 00000000 ....
0000001C 00000000 ....
00000020 00000000 ....
00000024 00000000 ....
00000028 00000000 ....
0000002C 00000000 ....
00000030 00000000 ....
00000034 86905841 ..XA
00000038 7FD69D3D ...= ;Start frame 1
0000003C 00008743 ...C ;hip X
00000040 00000000 .... ;hip Y
00000044 00000000 .... ;hip Z
00000048 00C8AF43 ...C ;chest X
0000004C 00000000 .... ;chest Y
00000050 00000000 .... ;chest Z
00000054 00000741 ...A ;Head X
00000058 00000000 .... ;Head Y
0000005C 00000000 .... ;Head Z
00000060 00C8AF43 ...C ;l_chest X
00000064 006CA243 .l.C ;l_chest Y
00000068 00B09A42 ...B ;l_chest Z
0000006C 00B09A43 ...C ;l_collar X
00000070 0058A743 .X.C ;l_collar Y
00000074 0080F741 ...A ;l_collar Z
...
...

I think you guys get the idea. The question is I don't know the exact format the X, Y , and Z data is. Is it co-ordints or rotation data. Also this is all therory as I haven't actully tried it yet. The numbers line up though. Here's another example of a head with more than one frame. (from AAFF.A)

offset: data
------------
00000000 01000000 .... ;header
00000004 1E000000 .... ;30 frames (0x1E)
00000008 15000000 ....
0000000C 01000200 ....
00000010 207C8C01  |..
00000014 A4318C01 .1..
00000018 00000000 ....
0000001C 00000000 ....
00000020 00000000 ....
00000024 00000000 ....
00000028 00000000 ....
0000002C 00000000 ....
00000030 00000000 ....
00000034 338C4E41 3.NA
00000038 7FD69D3D ...= ;frame 1 data starts
0000003C 00008743 ...C ;hip X
00000040 00000000 .... ;hip Y
00000044 00000000 .... ;hip Z
...
... (later on)
0000014C 7FD69D3D ...= ;start frame 2
00000150 00008743 ...C ;hip X
00000154 00000000 .... ;hip Y
00000158 00000000 .... ;hip Z
0000015C 00C8AF43 ...C (you get the rest)

Now I haven't tested this yet, so my offsets may be off. I still havent counted for the "root bone" and .a files with varible leangths. Probably need to decode the header some more. I hope this helps.

Oh yea, and to the newbies. If you guys think you are all cool and get a big head just 'cause you have the milkshape ".p" thing going. I'll have to reverse the world map on your ass to show who's the l33t ones here...

Unless you guys think you can beat me to it ^_^

-halkun


halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
I think I almost have the .a file format
« Reply #1 on: 2001-06-04 22:38:00 »
Oh, I think I found where the root bone is. It's actually a point between the feet of the character on the "floor" The root bone follows the poly plane and is used for calculation on where the character can and can't walk. It's also used with the where he/she is on the poly plane. See how it all starts to kind of fit togeather?

Sephiroth 3D

  • *
  • Posts: 1679
    • View Profile
    • ModCitizen 42
I think I almost have the .a file format
« Reply #2 on: 2001-06-05 00:42:00 »
halkun, you mentioned that you didn't know if the XYZ was for postion or rotation. Doesn't it make sense that it would be rotation? The position is already set up by the HRC file. Just add rotation, and you have a moving model that will conform to the body of the character.

Just a thought.

Sephiroth 3D @ School


The SaiNt

  • *
  • Posts: 1300
    • View Profile
I think I almost have the .a file format
« Reply #3 on: 2001-06-05 06:57:00 »
Yay!
Halkun is getting to work again.
Can't wait to go home now and get on with my part of the remake project  :)

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
I think I almost have the .a file format
« Reply #4 on: 2001-06-05 17:34:00 »
It's got to be rotation; some of the values are things like "180" or "90" if you interpret them as floats; can't be coincidence. And with one value per bone, it kinda has to be rotation (can't specify a 3d position with one number, ne?).

Anonymous

  • Guest
I think I almost have the .a file format
« Reply #5 on: 2001-06-05 23:48:00 »
argh! i dont understand hex at all! I dont see how you got 180 out of some of those. all i see is the numbers, the letters and what the letters represent. four bits at a time! AAAARRRRGGGGHHHHH!!!!!!!

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
I think I almost have the .a file format
« Reply #6 on: 2001-06-06 02:08:00 »
The format for float's isn't simple (unlike integers); which is why you should use a good hex editor which interprets data values into various formats for you. Actually, most hex editors should do that.

Anonymous

  • Guest
I think I almost have the .a file format
« Reply #7 on: 2001-06-06 16:23:00 »
i use ultraedit 32..........cant find a 'float' option

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
I think I almost have the .a file format
« Reply #8 on: 2001-06-06 15:41:00 »
It might call it a "Single". It's a 4-byte floating point number, anyway, UltraEdit's supposed to be pretty good so it should have it somewhere!

The SaiNt

  • *
  • Posts: 1300
    • View Profile
I think I almost have the .a file format
« Reply #9 on: 2001-06-06 15:53:00 »
I'm not too sure about Ultraedit, but I know Hex Workshop has everything I need  :)
All of the formats below are immediately viewable in Hex Workshop's bottom docked window.

8 bit signed byte
8 bit unsigned byte
16 bit signed short
16 bit unsigned short
32 bit signed long
32 bit unsigned long
64 bit signed quad
64 bit unsigned quad
32 bit float
64 bit double
64 bit date
16 bit DOS Date
16 bit DOS time
64 bit filetime
32 bit time_t
binary
 http://www.bpsoft.com" TARGET=_blank>http://www.bpsoft.com