Distorting the Face and Adding Retouching

You can use Meta Spark Studio to change the shape of people's faces. You can also add a retouching effect to faces and the whole scene. In this tutorial you'll learn to do both.

You'll find everything you need to build this effect in the sample content folder. Download it to follow along.

Getting started

To change the shape of the face you'll need an object called a blendshape created in 3D modeling software. We've included one in the sample content file. Use it to create all kinds of different face effects.

Open the unfinished effect in the sample content folder to follow along. To help you get started quickly we've already imported the set of blendshapes you'll need. It's listed in the Assets panel as faceDistortionPack.

The Assets panel is shown, highlighted.

Adding a face mesh and face tracker

Start by adding a face tracker to your scene:

  1. Click Add Object at the bottom of the Scene panel.
  2. Select Face Tracker from the menu.

It'll be listed as faceTracker0 in the Scene panel.

Next, add a face mesh as a child of the face tracker. The face mesh is a 3D model of a face. It works with the face tracker to create a surface that reconstructs someone's expressions. We'll then use the blendshape to change the shape of the face mesh, creating the distorted effect.

To add the face mesh to your project:

  1. Right-click on faceTracker0 in the Scene panel.
  2. Select Add.
  3. Select Face Mesh from the menu.

You'll see faceMesh0 in the Scene panel, and an object tracking the face in the Viewport and Simulator:

The face mesh is shown in the Viewport and Simulator.

Applying the blendshapes

You’ll apply the blendshape to the face mesh. To do this:

  1. Select the face mesh in the Scene panel.
  2. Go to Deformation in the Inspector.
  3. Click the + next to Deformation.
  4. Select the faceDistortionPack.

Selecting the face distortion pack.

Clear the Eyes and Mouth boxes

Before you adjust the blendshape, you'll need to clear the boxes next to Eyes and Mouth in the face mesh's properties. This will stop the blendshape from covering and distorting the openings for the eyes and mouth.

Adjusting the blendshape

Now you've added the blendshape, you'll see an option labeled Morph Object. There's a list of 14 options underneath:

The distortion options are highlighted.

You can adjust these to make all sorts of changes to the shape of the face - from adjusting the size of someone's eyes to completely changing the shape of the face.

Play around with the different options here, adjusting the sliders until you're happy with the effect.

When you apply your own object to the face mesh, you'll see a different list of options here.

Adding retouching

In Meta Spark Studio a retouching effect is created by adding a material to a face mesh, and changing the Shader Type in the material to Retouching.

Add a face mesh

Start by adding another face mesh to the scene as a child of the face tracker:

  1. Right click on the face tracker.
  2. Select Add.
  3. Select Face Mesh.

Create a material

Next create a material for the face mesh:

  1. Select the face mesh in the Scene panel.
  2. In the Inspector, click + next to Materials.
  3. Select Create New Material to create a new material.

Here's how your project will look:

A material has been added to the face mesh.

Now select the material to change the Shader Type. It'll be listed as material0 in the Assets panel. In the Inspector:

  1. Change the Shader Type to Retouching.
  2. You'll see an option labeled Skin Smoothing with a slider next to - adjust this to change the smoothing effect. Adjust the slider to 100%.

In the Inspector you'll see an option labeled Full Screen with a box next to it. This applies the smoothing effect across the whole effect. Clear this box to just apply retouching to the face.

You've now finished an effect with retouching and face distortion.