Create an Animation Sequence from a .csv file with animation curves (MetaHumans)

Hello!
I know almost nothing about graphics and animations, I am machine learning engineer. I trained a model that predicts animation from voice. Now I have a hard time trying to put my predicted animations (.csv file) into Sequencer so I could add audio track, check that it looks synchronized and render a video file.

To make train-test data, I capture animations with Live Link and MetaHuman model and record animations in Animation Blueprint editor for MetaHuman Face node - “Face_AnimBP”. I also get audio from the video that Live Link Face app saves.
As a result of the recording in Unreal, I get Animation Sequence which I can trim (remove pauses in beginning and ending of animation) and use in Sequencer with any MetaHuman model. I also synchronize audio with animation in Sequencer: I just move audio track until it looks synchronized and then trim audio correspondingly.

Then I export Animation Sequence as .fbx file, and parse it with Python script. I get .csv file with values of animation curves as a result. CSV file looks like:

| No | CTRL_expressions_noseWrinkleL | CTRL_expressions_noseWrinkleR |
|----|-------------------------------|-------------------------------|
| 0  | 0.085                         | 0.063                         |
| 1  | 0.086                         | 0.062                         |

I get a .csv file with the same format as a prediction from my model. I have an Animation Blueprint that reads the .csv file and modifies curves of the model according to the file. It works, I can see animations when open it in the editor.

Is there a way to get an Animation Sequence, not Animation Blueprint?

My Event Graph:

My Anim Graph:

You would take your csv into blender, and create curves there based on the values…

Then export (using my curve plugin probably, not sure if stock finally exports curves or not as I never use it personally http://mosthostla.com/gamedev/ue4curves)

That way you just get an animation.

Note that regular curves are just the same values of the CSV packed into the animation file itself - thus avoids having to use the csv.

If you want to actually animate with the curves in blender, then youd have to create a quick python script to generate morph animations and alter their values.

2 Likes