Skip to main content

Embedding/Integration into FBX

This is a sample samples/fbx_exporter_sample.py for embedding the output results of CriLipsMake2's Mpeg4-Visemes animation curve file (.csv) into FBX.
By embedding animation curve data into FBX, you can maintain the conventional production workflow and make it easier to import into various tools.

Preparation

The following environment is required to run the sample script:

  • Python 3.10.x (Confirmed operation with 3.10.11)
  • FBX Python SDK 2020.3.7 Python (*SDK is for Python 3.10.x only)

Also, to run this sample script, you need to install Autodesk's FBX Python SDK.

Download the FBX Python SDK from Autodesk FBX SDK.
After that, please install the whl file you installed in the path below into your Python execution environment.
C:/Program Files/Autodesk/FBX/FBX Python SDK/2020.3.7/fbx-2020.3.7-cp310-none-win_amd64.whl

How to Use

> python fbx_exporter_sample.py input.csv output.fbx
  • input.csv
    • Specify the file path of the Mpeg4-Visemes animation curve file (.csv) analyzed by CriLipsMake2.exe
  • output.fbx
    • Specify the output path for the FBX file with the contents of input.csv embedded

Replacing the Target FBX File

The FBX file to embed the animation curve into is defined in the code.

# FBX file name of the target character
TEMPLATE_FBX_FILE = f"{os.path.dirname(__file__)}/LipsyncHead.fbx"

If you want to replace it with another character, you need blend shape targets as specified in the lip sync information specification.