Exporting FaceFX Animation to UDK

How do I use FaceFX Studio 2009 animations with the Unreal Developer Kit?

Permalink

Very basic FaceFX in UDK tutorial:

  • Right-click on an existing SkeletalMesh object in the UDK content browser and "Create New FaceFX Asset"
  • Right-click on the FaceFX Asset and "Import from FXA" to bring your bone poses in from Max/Maya FXA plugins
  • Create a sound cue and soundNode Wave object by "Importing" a WAV file with the Import button at the lower left of the content browser. Be sure to click the option to create the sound cue when you import.
  • Open FaceFX by double-clicking the FaceFX Asset.
  • Setup your face graph like you normally would.
  • Select your sound cue so that when you analyze from FaceFX Studio you can use the selection in the browser.

Using XML

  • From the FaceFX Studio file menu, you can Export or Import XML. Export a file from Unreal to examine it on disk.
  • Export an XML file from FaceFX 2009 too.
  • Open both files in a text editor and look towards the bottom of the files where animations are listed.
  • notice that the unreal version's "audio_path" variable is set to something like: unrealPackageName.soundCueName. Also notice that there is an "audio_name" variable.
  • In the 2009 XML file, notice that the "audio_path" variable is a relative path to the WAV.
  • If you modify the 2009 XML file so that the "audio_path" points to a valid sound cue, and you provide the "audio_name" variable to match the SoundNode Wave object, you can import the 2009 XML file into UE3.

Warnings

  • The UDK version of FaceFX does not allow spaces in names. Set up your content in 2009 with underscores instead of spaces to avoid problems down the road.
  • Make sure you aren't relying on events. The UDK doesn't know what to do with them. Bake them to curves before exporting XML.
  • Importing an XML won't overwrite an existing Face Graph, but if you have zero nodes in your graph it will import the graph from the XML file.
  • You can't use the FaceFX 2009 plugins with the UDK. To get bone poses into the UDK, you must use the plugins that ship with the UDK. These plugins are supplied by Epic.
Permalink

Thanks Doug! I'll give this a try!

First of all, I'm sorry for my English but I'm Italian.
the latest versions of FaceFX plugin for Max don't save in FXA file format (but save in .facefx file format) and so I can't do this step.

Right-click on the FaceFX Asset and "Import from FXA" to bring your bone poses in from Max/Maya FXA plugins

Maybe I'm wrong because I am a novice in use of FaceFX but, if it's correct, how can I fix this?

Thanks

Hi folken,

FaceFX 2010 plugins are different from the ones that come with the UDK. As you have noticed, the UDK version saves in .FXA format, while FaceFX 2010 saves in .facefx format (a newer file format).

If you are using the UDK, you must use the FaceFX plugins that ship with the UDK. You have to get these plugins from Epic.

Doug

Thank you very much for your help, I hope to find this plugin form Epic Games.

UDK users: note that the FaceFX plugins you need (the old ones that export to .FXA files) are contained in the UDK distribution itself. Check in the UDK\Binaries\FaceFXPlugins folder. Note that you need to manually install those plugins (there's no installer).

Permalink

I have tried using the above XML process by exporting my XML actor from FaceFX Studio Professional 2010 and have not had success. In the UDK I have a package named Virtual_Human with a Group name Sounds and a Soundcue named Hobbies_Cue. I have edited the XML corresponding to a FaceFX track as follows:

animation name="Hobbies_demo1" language="USEnglish" analysis_actor="Default" audio_path="Virtual_Human.Sounds.Hobbies_Cue" audio_path_full="Virtual_Human.Sounds.Hobbies_Cue"

Any advice on what I am doing incorrectly?

Thanks,

Blake

Permalink

I figured it out. Not sure how I didn't think of this earlier. After exporting an XML actor from the FaceFX within UDK I found a difference in the XML tags used.

Exported from FaceFX Studio Pro 2010 it looks like this:

animation name="" language="" analysis_actor="" audio_path= audio_path_full=""

The FaceFX in UDK uses this format:

animation name="" language="" coarticulation_config="" gesture_config="" audio_path="" audio_name="" audio_index=""

So after adding the proper audio_name and audio_index entries everything works.

Permalink

Yes, baking out events prior to XML export and changing the audio path to an unreal package name and sound name are the two steps that are needed.

It is worth noting that the postxmlexport python callback was added to FaceFX 2012 to assist in automatically updating the XML with package names.