...

/

Face Tracking: Filters App (Masks, Makeup, or Glasses)

Face Tracking: Filters App (Masks, Makeup, or Glasses)

Explore the AR Foundation face-tracking module to create a face filter AR application.

Face tracking in AR Foundation

Developers can leverage AR Foundation’s built-in capability for AR face tracking to create AR applications that can track and analyze users’ facial movements and expressions. Doing so makes it possible to offer more captivating AR experiences involving virtual makeup, filters, or masks.

After identifying the crucial facial features using a camera device, AR Foundation can utilize this information to overlay virtual objects onto the user’s face. This can involve applying virtual masks or makeup that dynamically adjust and react in response to the user’s facial expressions. Let’s get started with face tracking with AR Foundation.

Creating a Unity project

We’ll be using the 2021.3.13f1 Unity environment to create our filter application.

Select suitable version
Select suitable version

Once we click “Unity Hub,” we’re prompted to open the app by a pop-up in our browser. Choose either “Visual Studio for Mac” or “Visual Studio for Windows” (depending on what machine you’re using) and the “Android Build Support” modules for installation.

Select packages to install
Select packages to install

Once we click “Continue,” it will start downloading and installing the selected packages.

Unity project creation

In the Unity Hub, select “Projects” and click the “New project” option.

Press + to interact
Create a new project
Create a new project

Then select the “3D” template from the listed templates. Define the “Project name” and “Location,” and click the “Create project” button.

Press + to interact
AR project creation
AR project creation

A Unity project is created ...