FaceFX Support

FaceFX Documentation and support

FaceFX commands - fgcollapse

The fgcollapse command is used to create a simplified version of an existing actor file. The simplified version only contains essential nodes like bone pose nodes and morph target nodes that are used in the animations to drive targets. The simplified face graph has zero Face Graph links. Each node contains keys representing the node’s value for each animation.  If a bone pose or morph node is unused in all animations, it will not be exported.

The fgcollapse command is most useful as a final step before taking FaceFX data out of FaceFX. Without access to the FaceFX SDK, most applications can only use pre-calculated animation curves. Alternatively, this command can be used to simplify a complex cinematic Face Graph with hundreds of nodes into an optimized actor file for in-game use.

Collapsing the face graph is an optional step when publishing an actor, but this command can be used outside of the publishing framework..

Warning - This command is slow and it doesn’t have a progress bar!

Specifically, the fgcollapse command does the following:

  1. Open the specified actor file for processing (does not open the file in FaceFX Studio).
  2. Create a list of all important nodes including bone pose nodes and morph target nodes that are active in at least one animation.
  3. Add the specified “forced nodes” to the list of important nodes.
  4. For each animation stored in the actor, evaluate the animation at a very high frame rate in order to calculate key times, values, input slopes, and output slopes for each of the important nodes.
  5. Delete all Face Graph links and all non-important face graph nodes.
  6. Save a copy of the collapsed actor to a new file. Append -FG_Collapsed to the existing filename.

Flags

Flag LongFlag Arg Description
-f -file Yes The file to save the actor to with the collapsed face graph.
-fn ‑forcenodes Yes A string array of non-target (FxCombinerNodes for example) to leave in the Face Graph.
-o -output Yes The filename to output the result. By default “-FG_Collapsed” is added to the loaded .facefx file’s name.

Examples

%fgcollapse -file "C:\Slade-Maya.facefx" -forcenodes "ImportantCombinerNodeName1|ImportantCombinerNodeName2";