Author Topic: .a files question  (Read 3407 times)

tomba12

  • Guest
.a files question
« on: 2007-06-25 20:51:54 »
I have read mirex's FAQ on the .a for ff7 and i have a question.
http://mirex.mypage.sk/FILES/ff7_a.txt

Each bone is given a bone length, say 1.7457236 from the HRC file
then the .a files has an angle for this: say it was 270,0,0 (X,Y,Z)

when i converted this file into milkshape 3d (biturn) , it said the cordinate was : 0.000000 1.745724 0.000000

how did it go from : 1.7457236  (270,0,0) to  => (0.000000 1.745724 0.000000)

can someone explain the math involved in this. Is there some sort of tranformation matrix involved? If so can someone write it and explain it. Thank you very much.
« Last Edit: 2007-06-25 20:54:56 by tomba12 »

tomba12

  • Guest
Re: .a files question
« Reply #1 on: 2007-06-25 23:02:10 »
srry it is actually (0,0,270) and => (0,0,1.7...) on biturn

tomba12

  • Guest
Re: .a files question
« Reply #2 on: 2007-06-26 13:05:15 »
okay... does anyone know how to convet a bone length with given (X angle, Y angle, Z angle) into bone's (x,y,z) compoent. Like , 1.7 to (0,0,1.7) from (0,0,270)?

Basically how do u convert the magnitude into it;s vector compoents given the 3 angles?
« Last Edit: 2007-06-26 13:13:11 by tomba12 »

mirex

  • *
  • Posts: 1645
    • View Profile
    • http://mirex.mypage.sk
Re: .a files question
« Reply #3 on: 2007-06-26 13:34:43 »
It can be done easily by some basic 3D math. I'll post it here when I get to see my code.

To sum it up:
1) place the bone point somewhere into the space - from 1.75 create a point (0, 1.75, 0)
2) rotate the point by the angles (0,0,270), which can result in (0, 0, 1.75). ( rotating something by 270 degrees is the same as rotating it by -90 degrees which is clearly moving the point from one axis to another )

important thing is - order of performed rotations.

tomba12

  • Guest
Re: .a files question
« Reply #4 on: 2007-06-26 13:44:48 »
To sum it up:
1) place the bone point somewhere into the space - from 1.75 create a point (0, 1.75, 0)


wouldn't i get a different answer if i start at point (1.75,0,0) or (0,0,1.75). How would i know how to get a starting bone point for each bone? Dones;t it get complex when a bone has a parent?

what is the proper rotation order for the field animation models?
also, do u just use euler angle matrix for the rotation?
http://anorganik.uni-tuebingen.de/klaus/nmr/conventions/euler/euler.html


From what i seen in biturn, u set all the bones as (0,0,bone length) and then read from the .a file in the order of (Z,Y,X). what is it like this? it has (0,0,1.7) then (0,0,270). what matrix did u use to make it (0,1.7,0).

i apologize for this many question and thanks so much for the help :)
« Last Edit: 2007-06-26 15:08:32 by tomba12 »