Does FaceFX for Unity3D work with Unity's Flash export?

Does FaceFX for Unity3D work with Unity's Flash export?

We are trying to export a Unity project that uses face fx successfully in normal unity player export, but will not work when using Unity3D's new export to flash feature.

We are currently using FaceFX 2011 with Unity 3.5 beta .

Permalink

Hi Pitaman,

I was able to get the PhraselockedDemo example working with a few modifications. This is what I did:

1) In FaceFXControllerScript.cs, delete the "using UnityEditor;" and
"using System.Xml;" lines at the top.

2) In FaceFXControllerScript.cs, comment out the function bodies to the ImportXML and ImportXMLAnimations functions, but leave the function signatures. (Obviously, you will need to make sure your characters have the FaceFX data imported on them correctly before you do this).

3) Delete the DialogueActions.js file from the project.

4) Declare the following two variables at the top of the PhraseLockedDemo.js script:

private var animState : AnimationState;
private var ffxController : FaceFXControllerScript;

You can see the result here. I'm a bit concerned that the character does not look as good in Flash. The animation on the mouth looks rough, but I do not believe this has anything to do with the FaceFX Controller script. You can see that the shading on the shoulders looks very rough too, but the FaceFX Controller script is clearly moving the bones correctly it's just that the results don't look as good in Flash. I'm not sure if the issue is just with the materials/textures, or if the actual vertices are in different positions. I will be trying a few things to pin this down, but if anyone has any ideas, let me know.

It's also worth noting that in the next version of the controller script, I'll be moving the XML operations out of the main controller script and into FaceFXControllerScriptGUI.cs file. You won't be able to dynamically download new XML animation and actor files, but I don't think it is an important feature in most cases, and it certainly doesn't work in flash. Also, there is really no need to inflate the game size by importing System.xml when most people import the XML files offline.

If you need more help with this, just let me know.

Doug

FYI, The latest version of the demo is fully compatible with Unity 3.5.

There are visual artifacts with Flash, but they exist with both FBX animations and animations played with the FaceFX controller, so there isn't anything to be done about them.