Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Baking Blendshapes to SkinnedMesh from Animations?

Discussion in 'Testing & Automation' started by Cellenseres, Oct 6, 2022.

  1. Cellenseres


    Mar 30, 2015
    Hey Guys!

    Currently I work on a side-project that involves creating all kinds of Characters using a "similar" (not the same) facial structure (different, already existing meshes) and the same rig.
    The meshes already exist and lack of Blendshapes.
    Usually I use Blender to manually create Blendshapes by creating a pose on the rig (blinking with one eye for example) and use "Apply as Blendshape" from the Armature Modifier.

    I'm not really good with scripting in blender (or python at all) and wanted to know if it's possible to try a similar approach in Unity.
    For the project I work on, a lot of stuff I usually have to do manually on the Characters is already automated, so I thought automate the Creation of Blendshapes in Unity might also be possible.

    I'd like to do the following approach:
    - Create One-Frame Animations for each Blendshape I want to create
    - Create a Script that lets me reference the SkinnedMesh, a List of SOs, where each one is basically storing the blendshape name and the animation it should create a blendshape out of
    - a method that runs through all the SOs in the List, creating Blendshapes on the SkinnedMesh which then will be stored in the Assets Folder.

    I don't know if that's possible, but if someone could help me out with that, It'd mean a lot to me!

    Thank you very much in advance!