Articles
People Effects
The Face Tracker

The face tracker

A screenshot from Meta Spark Studio that shows a face mask being tracked to a user's face.

In Meta Spark Studio, use the face tracker to create an effect that responds to someone's face.

When a face tracker is combined with a face mesh, it creates a surface that can detect facial movements and expressions. You can add a material to the face mesh to create a mask effect.

Adding a face tracker

To add a face tracker to your scene:

  1. Click + in the Scene panel.
  2. Select Face Tracker.
  3. Click Insert.

You'll see an axis tracking the face in the Viewport:

A screenshot of the face tracker working, as seen through the Viewport.

Instructions

As soon as you add a face tracker to an effect, an automatic instruction saying Find a face will appear until a face is detected by the camera. You can add a custom instruction instead if you prefer.

Adding more than one face tracker

To create an effect that can be used by more than one person, you can add more than one face tracker to a scene.

The face tracker texture

You can use the face tracker to create a texture that replicates the face of the person using the effect.

Making objects respond to face movements

Objects that are children of a face tracker will move with the face detected in the scene.

To make an object the child of the face tracker, simply drag the object onto the face tracker in the Scene panel. You can then use the manipulators to adjust its position.

To track objects to precise positions on the face, use face landmark patches.

Properties

When you've selected the face tracker in the Scene panel, you'll see its properties in the Inspector on the right of the interface.

Adjust these properties to make changes to how the face tracker works.

Layer

Click the dropdown next to Layer to adjust which layer the face tracker is assigned to.

Visible

Clear the box next to Visible to stop the face tracker and any children from being rendered in the scene.

Tracked face

Choose which face the face tracker will track.

Adjust this property if you're creating an effect with more than one face tracker, to be used by more than one person.

For example, if a face tracker is set to Face 1, it will track the first face to appear in the camera after the effect has been opened.

Transformations

You can't change the position, scale or rotation of a face tracker. This is because these values are controlled by the position of the face detected by the face tracker.

Texture Extraction

Turn the points being tracked on the face into a texture.

Interactions

Insert simple combinations of patches involving the face tracker into the Patch Editor.

Enable For

Choose whether the face tracker and its children are rendered in the front or back camera, or both.

The face tracker patch

You can create a patch representing the face tracker by dragging it from the Scene panel into the Patch Editor.

Three patches will be created:

  • Face Finder - This patch represents the faces detected by the camera.
  • Face Select - This patch can be adjusted to select a specific face from the Face Finder patch.
  • faceTracker0 - The outputs of this patch represent the face being tracked by the face tracker, its 3D Position, Scale and Rotation.
A patch graph representing the Face Tracker. It includes the Face Finder, Face Select and facetracker0 patches .

Optimization

Adding multiple face trackers to a scene will have an impact on performance, so it's good idea test your effect as you build it using the Meta Spark Player app.