pivke wrote:Is there a way, you could give us some hints on how to find some animation-data in files? I'm not asking for a complete tutorial, a few notes were enough (better than nothing).
There is no 'easy way'.
What is your background? Do you know the basics (matrices, keyframes etc.?)
This is an excerpt from an *.x-File (Textformat) to get an idea of the data structure:
Code: Select all
Animation {
{Armature_Bone_010}
AnimationKey { //Position
2;
41;
0;3; -0.000000,0.685021,0.000000;;,
1;3; -0.000000,0.685021,0.000000;;,
2;3; -0.000000,0.685021,0.000000;;,
...
38;3; -0.000000,0.685021,0.000000;;,
39;3; -0.000000,0.685021,0.000000;;,
40;3; -0.000000,0.685021,0.000000;;;
}
AnimationKey { //Rotation
0;
41;
0;4; -0.988916,-0.116904,0.071956,0.056577;;,
1;4; -0.988916,-0.116904,0.071956,0.056577;;,
2;4; -0.988916,-0.116904,0.071956,0.056577;;,
...
38;4; -0.988916,-0.116904,0.071956,0.056577;;,
39;4; -0.988916,-0.116904,0.071956,0.056577;;,
40;4; -0.988916,-0.116904,0.071956,0.056577;;;
}
AnimationKey { //Scale
1;
41;
0;3; 1.000000,1.000000,1.000000;;,
1;3; 1.000000,1.000000,1.000000;;,
2;3; 1.000000,1.000000,1.000000;;,
...
38;3; 1.000000,1.000000,1.000000;;,
39;3; 1.000000,1.000000,1.000000;;,
40;3; 1.000000,1.000000,1.000000;;;
}
}
But be informed that this is only one of many possible formats.
This is an excerpt from a decoded xmot file of Gothic 3, a Piranha bytes Game:
Code: Select all
!FH_Dragon_Right_Leg_Leg_1_New Layer_NEWIKGoalHelper
28.953161 62.622551 81.680565
0.000000 0.000000 0.000000 1.000000
1.000000 1.000000 1.000000
7C 04 00 00 BC EA C3 00 02 00 00 00 A4 EA C3 00 18 EB C3 00
02 00 00 00 D3 DF C5 00 F8 F3 C0 2C 98 EB C3 00 28 F0 C5 00
!FH_Dragon_Left_Leg_Leg_1_New Layer_NEWIKGoalHelper
-19.221125 0.000000 -14.409900
0.000000 -0.022962 -0.000000 0.999736
1.000001 1.000000 1.000000
7C 04 00 00 BC EA C3 00 02 00 00 00 A4 EA C3 00 18 EB C3 00
02 00 00 00 D3 DF C5 00 F8 F3 C0 2C 98 EB C3 00 28 F0 C5 00
!FH_Dragon_Spine_Spine_1_New Layer_GradientRotation
13 Frames. LP
0 0.000000 -19.220705 0.000000 -14.409900
1 0.040000 -20.047342 -0.000000 -14.662723
2 0.080000 -22.300449 -0.000001 -15.352195
...
11 0.440000 -51.983521 -0.000006 -24.718256
12 0.480000 -52.383598 -0.000006 -25.123568
13 Frames LR*
0 0.000000 0.000000 -0.022950 0.000000 0.999725
1 0.040000 0.000000 -0.020875 0.000000 0.999756
2 0.080000 0.000000 -0.015229 0.000000 0.999878
...
11 0.440000 0.000000 0.058321 0.000000 0.998291
12 0.480000 0.000000 0.058535 0.000000 0.998260
You will find that animation files often are in binary format.
So knowledge of IEEE754 (floating point format) is required to translate something
like 00 00 0x80 0x3F to "1.000000".
This and the knowledge of the x-File format was the way how i decoded the binary G3 xmot format to
a (more or less) readable text file.
HTH
PS:
viewtopic.php?f=16&t=6392&p=76559&hilit ... ion#p76559 might be interesting...