How to set up Facial Morph Targets for your avatar.

These morph targets are used by ARKit and Webcam for Face Tracking.


Model Requirements

kemorig uses the standard 52 "ARKit" shapes for face tracking. Webcam tracking, while not actually ARKit, uses a subset of the same morph targets.

Your model must implement morph targets (aka blendshapes or shapekeys).

kemorig uses the standard 52 “ARKit” morph targets. See the following list: (NOTE: these are the exact case sensitive names kemorig uses):

EyeBlinkLeft
EyeLookDownLeft
EyeLookInLeft
EyeLookOutLeft
EyeLookUpLeft
EyeSquintLeft
EyeWideLeft
EyeBlinkRight
EyeLookDownRight
EyeLookInRight
EyeLookOutRight
EyeLookUpRight
EyeSquintRight
EyeWideRight
JawForward
JawLeft
JawRight
JawOpen
MouthClose
MouthFunnel
MouthPucker
MouthLeft
MouthRight
MouthSmileLeft
MouthSmileRight
MouthFrownLeft
MouthFrownRight
MouthDimpleLeft
MouthDimpleRight
MouthStretchLeft
MouthStretchRight
MouthRollLower
MouthRollUpper
MouthShrugLower
MouthShrugUpper
MouthPressLeft
MouthPressRight
MouthLowerDownLeft
MouthLowerDownRight
MouthUpperUpLeft
MouthUpperUpRight
BrowDownLeft
BrowDownRight
BrowInnerUp
BrowOuterUpLeft
BrowOuterUpRight
CheekPuff
CheekSquintLeft
CheekSquintRight
NoseSneerLeft
NoseSneerRight
TongueOut

You can find various references online for how to author these. Here are a few:

Morph Target Naming Convention

Your model’s morph targets do not have to match the exact names above. In a later step we will create an asset that maps your model’s morph target names to ARKit names.

If you do use the exact names, and you don’t create that asset, kemorig will find the morph targets and use them. This could potentially save you time, but it’s good practice to make the mapping anyway.

Do I Need All 52?

No. Any missing morph targets will simply not play, and the rest will work.

In the mapping asset we’ll make below, you can also map one of your model’s morph target to multiple expected ARKit names.

Obviously, if you don’t implement all 52, the final look may suffer.

Webcam Morph Target subset

Webcam Tracking uses a subset of the full list above.

For Webcam tracking, you can choose to set up all morph targets, or just the following subset. Whatever morph targets the tracking finds, it will apply:

EyeBlinkLeft
EyeWideLeft
EyeBlinkRight
EyeWideRight
JawOpen
MouthSmileLeft
MouthSmileRight
MouthShrugLower
MouthShrugUpper
BrowDownLeft
BrowDownRight
BrowInnerUp
BrowOuterUpLeft
BrowOuterUpRight

Enable Face Tracking in your Avatar

Open your avatar blueprint and navigate to the Class Defaults.

In the ARKit category, enable Support Face Tracking.

Create a KemorigMorphTargetMapping DataTable

Now let’s create a DataTable to map our model’s morph targets with ARKit names.

If your morph target names match the ARKit names exactly, this file is optional. However, it's good practice to do this anyway, and you'll get extra control over each morph target.

I like to put this file into the subfolder MyCharacter/Animation/Mappings/.

We could make this from scratch, but we’d have to enter a lot of data manually. Instead we can copy a blank example DataTable included with the project.

In the content browser, navigate to the folder KemorigExampleContent Content/Data/MorphTargetMappings/ and find Blank_ARKitMappings. Copy/Paste a copy of this into our folder and rename it.

In case you need to make it yourself, this DataTable uses the row struct KemorigMorphTargetMapping.

Populate the DataTable

Open your DataTable. You’ll see 52 rows (one for each ARKit name).

For each row, enter the name of the corresponding morph target in your model.

You’ll also notice a few additional options. You can leave these at their defaults, but they can come in handy with some models.

Set the DataTable in your Avatar blueprint

Go back to your avatar blueprint.

Right under where you enabled ARKit, there’s a field for Facial Morph Target Mappings. Reference your DataTable here.