FXA and FXM research

Post Reply
AndreasFSC
Posts: 45
Joined: 15 Jul 2021, 12:23

FXA and FXM research

Post by AndreasFSC » 16 Jul 2021, 15:18

I thought I should move some of my projects ti this forum.
Feel free to take up any of them today, tomorrow or never...
If this can help building a better editor it is a win for everyone.



I have spent some time analyzing the fxa and fxm animation files, used for windscreen wipers, and can also be used for animates spectators, pit marshal, pitcrew, flag marshals etc.
Most car moders know how to hex-edit the position of windscreen wiper(s), but I haven't found much more information other than that.

I share what I have found here so others can help and contribute.

The files were exported in "EMotion FX 2 Exporter" by Mystic game development, now owned by Amazon.
It is now part of Lumberyard game development pack, but the file types are not the same any more.
These file types were used a lot in different games, but still I haven't been able to find anything that can edit them.

The fxa files (actor file) contains rig information called nodes and can probably also contain meshes, textures and materials too. But in Race07/GTR2 they are only used for the rig information.
Since I spent some time learning more about hex-editing I thought I should analyze the files more closely.

This is part of the information in an export log (with some coments):

===================================================================
EMotion FX 2 Exporter
Copyright (C) 2001-2004 Mystic Game Development. All Rights Reserved.
===================================================================
==========================
Nodes - movable part
==========================
- Node: name='Pagani_CPITWIPER1'
+ Parent: Has no parent(root).
+ Position: x=-0.000164 y=0.656332 z=-1.546496 - Position of mesh (pivot point)
+ Rotation: x=-0.228568 y=-0.340660 z=0.048845 w=0.910671 - Rotation before any animation
+ Scale Rotation: x=0.000000 y=0.016106 z=-0.038115 w=0.999144
+ Shear: x=0.000000 y=0.000000 z=0.000000 - Not used/no reason to use here
+ Scale: x=1.000000 y=1.000000 z=1.000000 - Not scaling/no reason to change here

- Node: name='Zonda_Windows1' - Not important here, windows are not animated
+ Position: x=0.000000 y=0.000000 z=0.000000
+ Rotation: x=0.000000 y=0.000000 z=0.000000 w=1.000000
+ Scale Rotation: x=0.000000 y=0.000000 z=0.000000 w=1.000000
+ Shear: x=0.000000 y=0.000000 z=0.000000
+ Scale: x=1.000000 y=1.000000 z=1.000000
==========================
Node Limits - limit movements, like bones or hinges, not used here
==========================
==========================
Materials - Probably not used in Race07
==========================
- Material: name = EMFX Default
+ Shader File: fileName=
...

==========================
Meshes - Not included in Race07? Maybe rigging?
==========================
==========================
Skins/textures - Not included in Race07
==========================

An FXA wiper file can look like this (edited with colors and comments by me):
1618151780241.png
The numbers are in float32 format, and I have located the positions/offsets. Only the wiper animation is interesting here.

This is the animation file, and it contains the keyframes, or "animation steps":
1618152333128.png
And analyzed. Only rotation is animated here.
The colorful parts are the keyframes. It seems to be: Rotation X (Pitch) rotation Y (Yaw) rotation Z (roll) animationweight and time (after "||")
1618152266768.png
I plan to continue to analyze more complicated animation files like spectator and pitcrew.

Maybe some editing program can be created and new cool animations can be made.
Would be cool to have some pit mechanic holding out a pit board when cars passing the start finish straight or something like that

AndreasFSC
Posts: 45
Joined: 15 Jul 2021, 12:23

Re: FXA and FXM research

Post by AndreasFSC » 16 Jul 2021, 15:49

I am working on a very basic editor for these files.
It is HTML and javascript-based because that is the easiest for me.

The editor imports the FXM (motion) file as binary, and splits by "42 69 70 30 31" = Bip01 to get the parts.
After that comes the name of the part.
Then 24 bytes of data, I believe it is hierarchy of the parts.
Then the keyframes as in the picture above.

Spectators, crew and driver animations would be nice to edit, but wipers are probably a more realistic goal.
1618152266768.png
It should be possible to to edit them from this picture also, but some visual representation with editable graphs should be useful :D

Deleted User 51

Re: FXA and FXM research

Post by Deleted User 51 » 16 Jul 2021, 17:01

Hi Andreas,

i think you are right about, that an Editor for such parts would be interesting and off course would give the possibility
to cars (and other stuff) not possible in other ISI games

Do i understand correct, you working on an editor already?

AndreasFSC
Posts: 45
Joined: 15 Jul 2021, 12:23

Re: FXA and FXM research

Post by AndreasFSC » 16 Jul 2021, 17:29

Yes, but it is very slow progress, and a C/C++/somethingelse -version would be much better, so if you have time later it would be much appreciated if you can have a try. I think it would be much better, I like the looks of the new aiw editor :)

Deleted User 51

Re: FXA and FXM research

Post by Deleted User 51 » 16 Jul 2021, 17:47

in the near future i will not, as i dont have the motiviation,
i create the AIW editor, only because i want to repair some tracks and want to understand some stuff

but
may i make a proposal ?

if you like the look of the AIW Editor
we can do a joint venture,
i can help you to do it in C.

i will supply you the code for the base app and guide you step by step
you will see, if you understand JScript this will be easy to do it in C

how about that?

i can imagine following steps

loading (easy)
editing (easy)
saving (easy)
creating (moderate)

and as a bonus 3d object animation

the ui i would provide is able doing this
i and yuca did build it for such things

AndreasFSC
Posts: 45
Joined: 15 Jul 2021, 12:23

Re: FXA and FXM research

Post by AndreasFSC » 17 Jul 2021, 01:04

Sounds good. I have studied the basics of c++ some weeks ago and it is not that different from javascript as far as I can tell. It would obviously be a slow start, so some pre made code would be helpful. I use visual studio code, but have not been able to make it and its addons to compile anything. It has been a real pain to set it up.
I think I have installed the plugins and the compiler, but there are many issues. I have the regular visual studio too, but I am a silly person who really like to stick to what I have and don't like changes... :lol:

Post Reply