Clear
Back

There may be differences between your version of Spark AR Studio and this tutorial because the product is currently in beta and we update it regularly.

Tutorial: Face Distortion and Retouching

You can use Spark AR 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.

Something Went Wrong
We're having trouble playing this video.


We’ll cover:

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 blend shape 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 blend shapes you'll need. It's listed in the Assets panel as faceDistortionPack.

Adding a face mesh and face tracker

Start by adding a face tracker to your scene:

  1. At the bottom of the Scene panel, click Add Object.
  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 blend shape to change the shape of the face mesh, creating the distorted effect.

To add the face mesh to your project:

  1. In the Scene panel, right-click on faceTracker0.
  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:

Applying the blend shapes

You’ll apply the blend shape to the face mesh. To apply the blend shape:

  1. In the Scene panel, select faceMesh0.
  2. In the Inspector, go to Deformation.
  3. Next to Deformation, click +.
  4. Select the faceDistortionPack.

Uncheck the Eyes and Mouth checkboxes

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

Adjusting the blend shape

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



You can adjust these to make all sorts of changes to 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 Spark AR 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. In the Scene panel, right click on faceTracker0.
  2. Select Add.
  3. Select Face Mesh.

Create a material

Next create a material for the face mesh:

  1. In the Scene panel, select faceMesh0.
  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:



Change the Shader Type

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 checkbox next to it. This applies the smoothing effect across the whole scene. Uncheck this box to just apply retouching to the face.

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

Summary

In this tutorial you've learned to distort the shape of the face using a collection of blend shapes and add retouching. To learn more about creating face effects:

Join the Spark AR Creator's community

Find inspiration, see examples, get support, and share your work with a network of creators.

Join Community

Join the Spark AR Creator's community

Find inspiration, see examples, get support, and share your work with a network of creators.

Join Community

Frequently asked questions

Have a specific question? Maybe it's been answered.


Read FAQs
Was this document helpful?