Using Evolver content in FaceFX Studio

Here are some steps to using Evolver content in FaceFX Studio:

  • Open the Evolver character in Maya, and do File->Export and select the Ogre(*.Mesh) option to export Ogre files. Export into your \My Documents\FaceFX Studio 2009\Ogre\Resources\Meshes folder
  • Export Bone poses for your Evolver character by running the attached MEL script below. http://www.facefx.com/sites/default/files/EvolverExport.mel
  • Save the .facefx file from the Maya FaceFX plugin. Then open the .facefx file in FaceFX Studio
  • Go to Actor->Change Render Asset and change to the name of the file you saved in the first step (without the .MESH extension)
  • Apply the attached template file by going to "Actor->Sync to Template"
    http://www.facefx.com/sites/default/files/Evolver-Simple.fxt

And that's it! If you are having problems see below:

Morph Targets Don't Work At All

Depending on the resolution of the Evolver file you have, the blend shape controllers and targets will be named differently. The Evolver.facefx file file that ships with FaceFX Studio is a high resolution Evolver mesh. As a result, the blendshape controller is called "h_expressions" and the targets end in "_h". If you have a medium resolution mesh, your blendshape controllers will start with "m_" and the targets will end with "_m". To fix this, all of the node names and target properties of the morph nodes must be updated. Doing it by hand would take a while, so put the attached updateEvolver.py file in your Studio/Scripts directory (remove the .txt extension) and call: exec -f updateEvolver.py from the FaceFX Studio command bar at the lower left.
http://www.facefx.com/sites/default/files/evolverUpdate.py.txt

The Skeleton Doesn't Look Right

You are probably trying to use a .faceFX file from one Evolver character on a different character, right? This won't work because 1) there are different skeletons available for export with Evolver characters and 2) depending on the size and shape of your Evolver character, the bone positions will be different.

If the skeletons are the same, and you can get the reference poses to match, you can look into "transferring bone poses" from within FaceFX Studio using the bonepose command (see docs). If you are trying to re-implement the hand-gestures used in the sample content, this approach won't work because it transfers bone poses between characters, not the reference pose, and additionally the the hands need to be touching when at rest so even the smallest difference is noticeable. To implement the hand gesture system on your character, you would need to manually position the character with the hands together, export a reference pose, then duplicate the bone poses used in the gesture system in Maya and export bone poses for them.

The evolver pipeline has gotten significantly more simple in FaceFX 2010. Just start the program and execute the prepareEvolver.py script by typing: "exec -f prepareEvolver.py"

The script will prompt you to browse for a .MESH file. The script will create new files in a subdirectory where the .MESH file is located. This works in the no-save version, but bone poses are not transferred, so head and body movements will not occur.

For plugin users that don't have FaceFX Studio Professional's bonepose command to transfer bone poses from one evolver character to another, here is a script that will export a reference pose and bone poses for the head and eye poses. When combined with importing the Evolver-FaceFX-Sample.fxt in FaceFX Studio free, plugin users can get an evolver character talking with head movements very quickly.

fxsetdisplaywarningdialogs -toggle "off";
$frame = `currentTime -query`;
string $FxBone_Name_Array[] = {"Head", "RightEye", "LeftEye"};

string $boneList = "";
for($boneName in $FxBone_Name_Array)
{
$boneList = $boneList + $boneName + " ";
}

fxexportrefpose -frame $frame -bones $boneList;
for($boneName in $FxBone_Name_Array)
{
select -r $boneName ;

string $poseName = $boneName + "RotXNeg";
rotate -r -os -30 0 0 ;
fxexportbonepose -frame $frame -name $poseName;
rotate -r -os 60 0 0 ;
$poseName = $boneName + "RotXPos";
fxexportbonepose -frame $frame -name $poseName;
rotate -r -os -30 0 0 ;

rotate -r -os 0 -30 0 ;
$poseName = $boneName + "RotYNeg";
fxexportbonepose -frame $frame -name $poseName;
rotate -r -os 0 60 0 ;
$poseName = $boneName + "RotYPos";
fxexportbonepose -frame $frame -name $poseName;
rotate -r -os 0 -30 0 ;

rotate -r -os 0 0 -30;
$poseName = $boneName + "RotZNeg";
fxexportbonepose -frame $frame -name $poseName;
rotate -r -os 0 0 60 ;
$poseName = $boneName + "RotZPos";
fxexportbonepose -frame $frame -name $poseName;
rotate -r -os 0 0 -30;
}
fxsetdisplaywarningdialogs -toggle "on";

Permalink

Is there also a way for users who don't have Maya or Max?

Here's what I've tried so far:

I'm using FaceFX Studio and have modo and Blender, and want to use the animations in Unity.

With the information from the tutorial "FaceFX Evaluation Unity Maya Evolver", I was able to put my own audio animations on Jake using the Unity Demo and the Evolver-FaceFX-Sample actor in FaceFX to create the animation. That much worked fine - probably because it's all the same Evolver character.

Using the same animation directly in Unity on a character I created with Evolver myself "almost works": The lip-sync looks fine, also the eye brows seem to behave correctly - but the character closes its eyes and enters a somewhat weird pose. It's using the Darwin skeleton with default male size and is a high res character. I also tried a med res version of that same character as I noticed that Jake is also med res - but that didn't make a difference (still in Unity).

To get the character into FaceFX, I also tried creating an actor file from my character using Blender's OGRE export (the "official, stable OGRE export for 2.49"). One thing I noticed was that what Blender exports is a *.mesh.xml file instead of *.mesh. When I remove the ".xml", I can select the file when using "exec -f prepareEvolver.py" but get an error message: "The script requires that your evolver .mesh, .material, and .skeleton files share the same name. Normally this is the case, but I can't find one of these files, so I'm exiting." ... well, there are no ".material" and ".skeleton" files coming from Blender's OGRE export, and I'm not even sure if the .mesh is in the correct format and would have all the information that FaceFX needs (I guess it doesn't).

Blender doesn't even have FBX import, so I'd rather use modo than blender - but modo has no OGRE export at all (there once was a script for that but it was for modo 201 ... and it doesn't seem to be maintained).

Finally, I tried getting the OGRE file directly from Evolver. This way, I can get the model into FaceFX Studio (without the textures, though), using prepareEvolver.py but Evolver isn't using the Darwin skeletons for OGRE but some "Evolver Gameroll skeleton"; it's not even clear to me whether the Evolver OGRE transport does export facial bones or morphs. As expected, there's no animation with that actor for me in FaceFX.

So ... is there a way of using Evolver + FaceFX without Maya (and Max) at all?

Permalink

As far as Unity:

The Unity pipeline does not require Max/Maya so using the same animation on a Unity character you create yourself should work provided the following:

  • The Darwin Default Skeleton is used
  • The FBX file for your Unity character is in the unmodified T-Pose
  • When you do "Assets->Import FaceFX XML Actor", the "Use Reference Pose from FBX" option on the FaceFX Controller Script option is selected.

Both "Jake" and "Doug" in the Unity demo use the same XML Actor file. They have slightly different bone positions, but the FaceFX Controller Script takes care of "transferring the bone poses" with the different skeletons. Isn't this the same test? Perhaps you can send your FBX file to support (at) oc3ent.com if it's not working for you?

As far as Blender:

I haven't tested the Blender Ogre exporter, but if it can export a .Mesh.xml AND a .Skeleton.xml it might work. You will have to download the OgreXMLConverter to convert the .xml to the binary format first however. Is there a way to generate an Ogre .skeleton file from Blender?

Permalink

Cool - I tried again, and now it works. What I did to fix it was simply re-download the FBX file from Evolver. I'm not exactly sure what broke it - the most likely cause I could think of is opening and saving the FBX file in modo. I'll see if I can reproduce that.

[EDIT: Ok, checked that ... actually, when I open the FBX in modo and save it, no FaceFX animations work at all anymore in Unity ... so it seems it was something else]

Another thing I ran into was that with the new file, the first time I tried it I missed fixing the scale factor in the FaceFXControllerScript. So I had scale on import 0.01 and scale factor in the script 1 ... that looked funny ;-)

But now it seems it all works - so this is really nice :-)

According to http://www.ogre3d.org/tikiwiki/Tools%3A+Blender you can convert the XML both to binary mesh and skeleton. I don't really know these formats but maybe XML contains both mesh + skeleton. So that would also be worth a try - thank you for the pointer!

Permalink

Glad that is working for you now.

I'm not sure what to make of the Ogre/Blender link. The .mesh and .skeleton formats are definitely two distinct formats, and FaceFX will need them both to animate a bones based character (morph characters can be .mesh only). The link talks about "armatures" in the "Mesh Exporter" which sounds a bit promising, if you could get a .skeleton out of that, I don't think they would call it a "Mesh exporter".

If you can get a .skeleton file, and you can export a skeleton animation on the skeleton, you can use FaceFX's python interface to create a reference pose and bone poses from the skeleton animation. Blender support is on our list, and that's how we would probably do bone poses (assuming we could get a .skeleton out of Blender)

Permalink

It seems the 2.49 ogre exporter doesn't give us the skeleton file. I've just tried the OgreXMLConverter - and that seems to only run on systems where OGRE is installed (which is not the case on my Mac). Then, I had a quick look at the XML-file, and there's only a mesh-element. It seems that the XML format could theoretically also have a skeleton element but that's not the case.

There's currently (at least) two OGRE-exporters being worked on for the current version of blender. This one for 2.6 does export mesh and skeleton: http://code.google.com/p/blender2ogre/ - I haven't tried it, yet, but it's probably the safest bet.