After several requests from Unity developers, we’ve created a sample integration with FaceFX, our audio-based facial animation product. You can check out the demo here.
The integration is just an editor script to import a FaceFX XML file on your character and a controller script based on the Character Animation documentation. The integration and demo use bones-based animations.
Using curves to drive bone poses as opposed to importing FBX files for facial animations was very effective at reducing the amount of data needed to store the facial animations. After some quick tests, we estimated that we were saving over 90% versus default FBX export. Obviously, that figure can change based on the number of bones, number of curves, FBX compression, etc. But for anyone using bones that has a lot of facial animations to play, the Character Animation documentation is a good place to start. A custom controller script also helps keep the animation in synch with the audio.
Thanks to the Unity team for putting together such a great product. We’re looking forward to using Unity more internally.
For anyone curious, FaceFX is a leading audio-based facial animation solution. It’s been used in over 150 triple-A titles. The solution available on a per-title basis, as a standalone product, or as plugins for Max, Maya, XSI, and MotionBuilder.
Let us know if anyone has any questions, comments, etc.
FaceFX plugins are $199, which is pretty cheap. And the FaceFX License Manager lets you easily transfer your license to other computers. FaceFX Studio Professional is $1,995.
You can use the cheaper plugins with this integration, but there is one “gotcha”. The unity integration requires a curve for each bone pose in the animation. The Face Graph is capable of driving multiple poses with a single curve, so prior to XML export into Unity, we require that you publish your FaceFX actor to collapse the Face Graph. Publishing is only available in FaceFx Studio Professional, so if you want to use the plugins you would need a Face Graph with no links and curves for each bone pose you want to drive. Then you would generate your animations from the plugin, load up the .facefx file in “FaceFX Studio Free” (available from the evaluation installer) and export an XML file from there.
I think there is a lot more we can do with Unity, and I recognize that there is a large community of developers that would need a free or almost free option to make use of our technology. We’re looking into it, and if we can figure out a way to make it work, we will.
As far as paypal support, I’ll look into that. We can process your order manually too.
Awesome stuff!
So correct me if I am wrong - I can’t produce the XML files except via FaceFx Studio?
If I already have the FaceFx plugin - what else do I require aside from the Unity integration files ?
I guess my question is how do I export the necessary XML files?
KITT, once you have generated an animation with the plugin and saved the .facefx file, you open the .facefx file in “FaceFX Studio Free” which was installed along with the plugin in the evaluation installer. FaceFX Studio Free can export the XML file.
Load up the .facefx files in the FaceFX No-save version. (You can’t save your work or export new XML files for playback in unity).
With a license to FaceFX Studio Professional, getting an animation to play in unity would involve the following steps:
Open one of the included .facefx files in FaceFX Studio Professional and generate one or more animations. Save the .facefx file.
Run the fgcollapse command to simplify the Face Graph because it can’t be computed by the Unity integration. (This step requires a license to FaceFX Studio Professional. Plugins don’t have this capability, so complex Face Graphs are not an option there)
Open the collapsed file, and export an XML actor file into the unity project. Make sure the FaceFX actor name matches the Unity GameObject.
Make sure the FaceFXImportXMLActor.js file has successfully imported the new XML file. The animation is ready to play!
If you don’t have a license to FaceFX Studio Professional, but instead have a license to a FaceFX plugin (or you want to try out the phrase-locked evaluation version), getting an animation to play in unity would involve the following steps:
Load one of the .facefx files in the plugin
Generate an animation from the plugin
Save the .facefx file
Load the .facefx file in FaceFX Studio Free
Export an XML file into the unity project.
Make sure the FaceFX actor name matches the Unity GameObject. Then check that the FaceFXImportXMLActor.js file has successfully imported the new XML file. The animation is ready to play!
For plugin users, because we haven’t collapsed the Face Graph, you will notice that the body gestures, and the head and eye rotation do not work in Unity. These features are utilizing the Face Graph which is not being evaluated in Unity. There is a workaround however…when you generate the animations from the plugin, use an analysis actor that outputs curves for each bone pose. I’ve created an analysis actor here that will create head and eye rotations for the Evolver characters in this demo.
EvolverTim, thanks for all of your help putting this demo together! I’m excited to see what the Unity community can do with FaceFX and Evolver. The sky is the limit!
For anyone interested in using Evolver in Unity like we have done for this demo, we used the FBX export option with “Y-up”, the “Darwin Default” skeleton and the facial bone rig. You can transfer bone poses from one evolver skeleton to the other using the bonepose command in FaceFX Studio Professional, so character setup is extremely easy if you are using Evolver characters!
I downloaded the free no-save version of facefx studio and it looks great so far. Do you have a reference model that could be sent to an animator that shows all of the poses needed?
@EvolverTim @ facefx - I think a tutorial which takes us from Evolver–FaceFx in Max–Unity 3D would be awesome.
Many people in the community, once they see the workflow, will gain a better understanding of the process and ease which is achieved via these great services/products.
Inside of the FaceFX evaluation installation directory, look in the FaceFX Studio No-Save Evaluation/Samples/Src directory. Slade.FBX, and Slade-Maya.ma are in there. They have all of Slade’s bone poses laid out in the timeframe, and you can use the plugins to “batch export” the bone poses with the Slade-Batch-Export.txt file. Once you have the bone poses, you can use the Slade-Maya.fxt or a Slade-Face-Graph-Setup.fxl file to set up the Face Graph.
Another option is to use the bones-based evolver characters included with the Unity demo. You can get the source FBX files from the zip file, and you can get the bone poses from the included .facefx files.
Both of these options might have more bone poses and Face Graph setup than you absolutely need. For a minimalist setup, start with the 6 mouth targets (open, PBM, FV, ShCh, W, wide) then add Blink, Eyebrow Raise, and Squint. If you have a tongue, you can add the tBack, tTeeth, and tRoof poses. Finally, you can add poses to rotate the head and eyes in all directions.
I agree with KITT, there are some good videos up on the FaceFX site but it would be great to see a start to finish video on how to bring a character through facefx into unity.