Skip to content

Use a MetaHuman

Libretto can drive your own MetaHuman as a dialogue character: postures, gestures, walk-to and lip-sync work without re-authoring any animation. One editor action turns an assembled MetaHuman into a Libretto character, and the lip-sync generator then animates its whole face from the voice with MetaHuman Animator.

A MetaHuman as a Libretto character

No MetaHuman ships with Libretto

The plugin contains no MetaHuman asset and declares no dependency on the MetaHuman plugins. This page uses your MetaHuman, created in your project with MetaHuman Creator.

Before you start

  1. Enable the MetaHuman plugins. Open Edit ▸ Plugins and enable MetaHuman Creator and MetaHuman Animator. Accept the dependencies, then restart the editor.
  2. Create and assemble your MetaHuman. In the MetaHuman Character asset, open the Assembly panel and assemble it. Use the UE Optimized pipeline: a Cine assembly weighs 1–2 GB, an Optimized one less than 100 MB.
  3. Save all. The assembly writes a Blueprint next to the character asset. Libretto reads that Blueprint.

What runs where

MetaHuman Animator is needed in the editor only, to generate the lip-sync. A packaged game plays the baked animations: it needs the MetaHuman runtime plugins (MetaHuman SDK, RigLogic), not MetaHuman Animator.

Create the Libretto character

  1. In the Content Browser, right-click the MetaHuman Character asset, or the assembled MetaHuman Blueprint.
  2. Select Libretto ▸ Create Libretto Character, then the voice gender: Female or Male.
  3. Libretto creates BP_LBR_<MetaHuman name> in the same folder and opens it.

The Create Libretto Character action

The new Blueprint derives from ALBRMetaHumanCharacter. Your MetaHuman Blueprint stays unchanged. The action does the following:

  • It copies the body and face meshes, their materials and the other parts of the MetaHuman (outfit, hair, eyebrows, beard…).
  • It assigns the Libretto animation Blueprints: ABP_LBRMetaHumanBody on the body and ABP_LBRMetaHumanFace on the face.
  • It makes the Libretto animations compatible with the MetaHuman body skeleton.
  • It sizes the capsule to the character height.
  • It sets CharacterName to the MetaHuman name and CharacterGender to your choice. The gender selects the text-to-speech voice.

The created Blueprint and its components

Place the character in your level and assign it to a role, like any other dialogue character.

Warnings after creation

The action also repairs the hair cards of the assembled grooms, so the hair stays visible in close-ups. If a part differs from the MetaHuman, a notification gives the number of warnings. Read them in Window ▸ Message Log ▸ Asset Tools.

What the character does

Body: idle, walk and dialogue animations

ABP_LBRMetaHumanBody plays the Relaxed idle and blends to the BS_Idle_Walk_Run walk when the character moves, for example during a walk-to entry. The dialogue postures and gestures play on top, in the dialogue slots.

Its parent class, ULBRMetaHumanBodyAnimInstance, computes the ground speed. Two class defaults set the blend:

Property Purpose Default
Full Walk Speed Ground speed (cm/s) at which the walk fully replaces the idle. 60
Walk Blend Rate Speed of the idle ↔ walk transition (1/s). 6

To use another idle or another walk:

  1. Create a child of ABP_LBRMetaHumanBody (right-click ▸ Create Child Blueprint Class).
  2. In its AnimGraph, change the animation of the Sequence Player (idle) or of the Blend Space Player (walk).
  3. Assign the child to the Body component of your BP_LBR_ character.

Keep the dialogue slots

Do not remove the DialoguePostureSlot and DialogueGestureSlot nodes. Without them, the postures and gestures do not play.

Face: lip-sync

ABP_LBRMetaHumanFace copies the body pose and plays the lip-sync in the DialogueLipsyncSlot. The MetaHuman face rig (RigLogic) then evaluates the face.

Cameras: framing on the eyes

The stage cameras compensate for the height of each character. They measure the eye line, so a MetaHuman and a mannequin get the same framing.

  • By default, Libretto finds the eyes automatically: the middle of the MetaHuman eye bones (FACIAL_L_Eye / FACIAL_R_Eye), then other common eye bones, then an eyes socket, then the head socket.
  • To frame on another point, set Framing Socket (category Dialogue ▸ Staging) in the class defaults of the character.
  • To check the framing, run the console command Libretto.Stage.LogFraming 1. Each camera cut then logs the measured height and the offset.

Generate the lip-sync

  1. Open the Generate Assets wizard and enable LipSync, with a TTS voice if your lines have no recorded audio yet.
  2. Generate. Libretto picks the generator for each speaker:
    • a MetaHuman character goes to LBRMetaHumanLipSyncGenerator (MetaHuman Animator, whole face);
    • the other characters go to LBRAmplitudeLipSyncGenerator (jaw only).
  3. Generate the sequences. The LIP_ animations are placed on the face like any other lip-sync.

MetaHuman Animator processes each line on the GPU: count about 2–4 seconds per line. An existing LIP_ animation is kept, unless you set the Force flag.

A custom MetaHuman class

The choice depends on GetLipsyncModel. ALBRMetaHumanCharacter returns "MetaHuman". If your MetaHuman character uses its own class, override GetLipsyncModel to return "MetaHuman". Without this override, the amplitude generator handles the character.

Mood and generator settings

MetaHuman Animator adds a mood to the face. Libretto reads the Emotion of each line and converts it with the Mood Mapping of the generator:

Line emotion MetaHuman Animator mood
Angry Anger
Disgusted Disgust
Excited Excitement
Happy Happiness
Sad Sadness
Scared Fear
(any other) AutoDetect

The generator properties:

Property Purpose Default
Mood Mapping MetaHuman Animator mood for each line emotion. Valid moods: AutoDetect, Neutral, Happiness, Sadness, Disgust, Anger, Surprise, Fear, Confidence, Excitement, Boredom, Playfulness, Confusion. see the table above
Mood Intensity Strength of the mood on the face (0–1). 1
Mouth Only Animates the mouth only: no brows, eyes or blinks from the voice. off
Use MetaHuman Animator Off: always bakes the amplitude lip-sync, for a fast preview. on
Fallback To Amplitude When MetaHuman Animator is missing or fails on a line, bakes the amplitude lip-sync instead of skipping the line. on

To change these defaults, create a C++ child class of ULBRMetaHumanLipSyncGenerator and set the properties in its constructor. Then replace LBRMetaHumanLipSyncGenerator with your class in Project Settings ▸ Libretto ▸ Asset Generators. See custom asset generators.

Unknown mood

A mood name that is not in the list above is replaced by AutoDetect, with a warning in the log.

Troubleshooting

The face moves only the jaw

MetaHuman Animator is not available, so Libretto used the amplitude fallback on the CTRL_expressions_jawOpen curve. The log shows one warning per generation: "LipSync: the MetaHuman Animator plugin is not enabled…".

  1. Enable MetaHuman Animator in Edit ▸ Plugins and restart the editor.
  2. Generate the assets again with LipSync and the Force flag.

If Fallback To Amplitude is off, these lines get no lip-sync at all.

"The exported animation targets the skeleton …, not the face skeleton …"

MetaHuman Animator exported the animation for another skeleton than the face of your character. The line gets an error and no LIP_ animation (or the amplitude fallback).

  • Check that the Face component uses the face mesh of the MetaHuman, on its face skeleton.
  • If you changed the face mesh, create the Libretto character again from the MetaHuman.

Linux and macOS

MetaHuman Animator processes the audio in the editor, on platforms that Epic supports. On another platform, or when the processing fails, Libretto uses the amplitude fallback on every MetaHuman line. You can generate the lip-sync on a Windows editor and commit the LIP_ animations.

The face is at the character's feet in the editor

This happens after you change the Anim Class of the body on a character that is already loaded: the face loses the body pose. Restart the editor. The face then follows the body again.

"… is not an assembled MetaHuman Blueprint"

The action needs a Blueprint with a Body and a Face skeletal mesh component. Assemble the MetaHuman first (Assembly panel, UE Optimized), save all, then run the action again.

See also: Animation & gestures FAQ · Generation overview — LipSync · Text to speech