Face Tracker

Use the face tracker to create an effect that responds to or augments 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.

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

Learn about:

Inserting a face tracker

To insert a face tracker:

  1. Click Add Object.
  2. Select Face Tracker.

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



If your effect has a face tracker in it, an instruction saying Find a face! will appear until a face is detected by the camera. You can also add custom instructions.

Making objects respond to the movement of the face tracker

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, you can use face landmark patches.

Face tracker - 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 the how the face tracker works.

Layer

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

Visible

Uncheck 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. Find out more.

Transformations

You can't change the position, scale or rotation of a face tracker, 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 - find out more in this guide.

Interactions

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

Enable For

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

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 Spark AR Player app.

Creating a patch to represent the face tracker

You can create a patch representing the face tracker by dragging it from the Scene Panel, to 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.

Learn more