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. 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 blend shape 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:

Applying the blend shapes

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

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

Adjusting the blend shapes

Now you've added the 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 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 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.

To do this yourself, add 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.

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:



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%.

You'll also see option labeled Full Screen with a checkbox next to it. This applies the smoothing effect across the whole effect. You could 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. You've also added 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?