Export Control Rig FBX From Metahuman Performance via Python

Hi,

Is there a way to directly export the control rig FBX from a metahuman performance using the python API?

Running in headless mode I am importing a directory of wav files, generating metahuman performances from those audio files, and then would like to export a control rig fbx per performance. If i open up the performance asset in the editor, there is an option to “Export Control Rig fbx” if i right click in the face control board channel, but i can’t seem to find a way to access that control rig via python.

I do see examples of exporting from a level sequence ( as well as python functions like “export_fbx_from_control_rig_section” for level sequences ) , does this mean I have to make a level sequence from the performance and export from there? Ideally I would like to skip making another asset, and would just export the fbx from the performance asset.

Thanks,

Steve

[Attachment Removed]

Hi Steve,

The recommended approach is to export via the level/anim sequence route and then generate the FBX from those assets. If you take a look at UMetaHumanPerformanceExportUtils::RecordAnimationSequence, you can see the MH-specific work that’s being done when you use the Export Animation route compared to exporting the FBX directly from the control rig track. I think the option to export to FBX directly from the control rig track is actually an oversight and exists only because the Performance asset reuses the Sequencer UI.

As a side note, you may also want to look at MetaHumanBatchMenuExtension::ProcessAudioPerformancesToAnimSequences as this is an existing implementation that allows for batch processing of audio directly anim/level sequence assets. It isn’t currently exposed to blueprint/python, but you could potentially add that functionality if you’re able to make engine changes. Or you could use it as a reference for your implementation.

Let me know if you’ve got more questions.

Thanks,

Euan

[Attachment Removed]

Thanks,

Good to know we are doing things the expected way, and I will keep generating the sequence and exporting from there when batch processing audio.

We are running rig-logic outside of unreal so getting the animation file exported on the control rig is super important to us. We are currently using audio to animation, and video to animation, so having that export option in the Metahuman Performance is a plus for us, and makes it easier for animators who are not super familiar with unreal to get assets into our engine quickly.

We don’t have plans to modify the code but i can take a look at ProcessAudioPerformancesToAnimSequences just to see what is going on.

thanks again,

steve

[Attachment Removed]

Sure, sounds good. In that case, I’ll close out this thread. But feel free to reopen it, or open another one, if you run into any issues.

[Attachment Removed]