granny grn file, Importing bones
Posted: Wed Jul 22, 2015 5:13 am
Hey guys, I've been working on being able to import, and export .grn files from the Age of Mythology game to 3ds Max, and I was wondering how I can create a proper bone system.
I have position, and quaternion data, but I notice most other scripts I've found online are for formats that have the entire transformation directly. Right now I'm just creating each bone as a dummy.
Here is an example bone data that I extracted in xml format. These values are local to the bone, so they would have to be multiplied by the parent's transform matrix.
Also, I know that in maxscript you can set an objects scale to a point3 value, but here I'm given a 3x3 matrix. What do I do in this case? I'm thinking I can just multiply the entire transform by this matrix, after applying position, and rotation.
Thanks!
I have position, and quaternion data, but I notice most other scripts I've found online are for formats that have the entire transformation directly. Right now I'm just creating each bone as a dummy.
Here is an example bone data that I extracted in xml format. These values are local to the bone, so they would have to be multiplied by the parent's transform matrix.
Code: Select all
<boneData>
<parentIndex>5</parentIndex>
<position>{X:0.08962885 Y:-1.721544E-09 Z:2.114075E-15}</position>
<rotation>{W:1 X:5.108084E-15 Y:1.104274E-09 Z:-0.0003988306}</rotation>
<scale>{[A1:0.9999999 A2:-5.772494E-12 A3:-3.124496E-16] [B1:-5.772494E-12 B2:0.9999999 B3:-1.176143E-14] [C1:0 C2:-1.176132E-14 C3:0.9999999]}</scale>
</boneData>Thanks!