Friday, March 22, 2024

FBX Files and BVH Retargeter

As the name suggests, the BVH retargeter imports animations from BVH files. However, it appears that popular sites like Mixamo only offer animations in FBX format these days. Recently user GeneralProtectionFault suggested that one could use the BVH retargeter for FBX files as well, by first importing the FBX file with Blender's built-in FBX importer and then writing the animation as a temporary BVH file. This technique has previously been used in this add-on.

Support for FBX files has been implemented in the development version of the BVH retargeter. We can notice that the "Load BVH File" button has been renamed, and is now called "Load BVH or FBX File". To import the animation, we select our target rig and press "Load And Retarget" as usual.
Select the Capoeira.fbx file which can be downloaded from Mixamo or from the issue in the bug tracker.

Also note that the panel to the right has changed. The add-on now uses the standard Blender way to specify the orientation of the rig in the animation file.

And now our character does the capoeira.

The DAZ Importer has been able to import facial animations in the FaceCap and LiveLink formats for a long time, see e.g. this FaceCap test. Bouich Jules found another good way, and it’s UE4 facial animation, used here by QUICKMAGIC https://www.quickmagic.ai/index/. Again the files are in FBX format, so we need to do a similar trick as above. First the add-on imports the FBX file with Blender's FBX importer, and then copies the FACS animation from the imported mesh to the target rig. A sample file can be found in the issue in the bug tracker.

The complete FBX animation includes both the body poses and the FACS morphs. To import it to our target character we proceed in two steps. First we Load And Retarget the FBX file in the same way as we did with the capoeira file above.
Our character now moves, but her expression remains blank.
Let us now import the facial animation. If you have not already done so, go to the DAZ Importer and import the FACS morphs and make all bones posable.
Now open the new FACS panel in the BVH retargeter tab. These tools used to be located in the DAZ Runtime > Morphs > FACS panel, but it makes more sense to import the entire animation from the same add-on.

With the target character selected, press Import FACS From FBX File.

Select the same FBX file as above. Disable the New Action option so the face and body animations belong to the same action. Alternatively, we can make a new action and push both actions down on the NLA stack.
And now our character both moves and smiles.