Lens Studio by Snap Inc.

An Introduction

By Anessa Petteruti

Overview

Lens Studio is an augmented reality platform to create Snapchat lenses. Users can create lenses for the front-facing or rear cameras. The Studio contains several templates or you can create your own.


Preview of an object in Lens Studio

The Platform

To create a project, click File → New Project. The top bar contains three sections: the Project Information section, Tools section, and Testing section.

The Project Information allows you to edit the logo, name, function, and publish the lens. You can then access the tools in the Tools menu. Finally, you can test your lens in the Testing section (clicking the Testing button allows you to pair your device and test your lens).

Many features of Lens Studio act like a traditional IDE. The Scene allows you to visualize your lens in 3D space, manipulating the scale, position, and rotation of the objects. Through drag and drop, objects can be parented to one another, and 2D objects can be rendered as well. The Inspector allows you to edit parameters on any object in the scene. Like an ordinary console, the Logger displays debug messages that are printed via ‘print(“Hello”)’, for example. Finally, Preview mode allows you to view your lens in real-time and see what it looks like when applied to your face.


A Scene in Lens Studio

Adding a Face Mesh

The face mesh acts as a mask and mimics the user's face in real-time. The face mesh resource and Head Binding component add a 3D mask on the user's face.

1. Add a face mesh to the user's face by navigating to Add New --> Face Mesh in the Objects panel or go to Add New --> Face Mesh in the Resources panel:

2. To display the face mesh, click on Render Mesh Visual.

3. Select the Face mesh in the Resources and Inspector panels to change its settings.

4. Specify which part of the face mesh should be rendered by adjusting the Eye Geometry, Face Geometry, and Mouth Geometry settings.

5. A new PBR material can be created in the Resources panel by selecting Add New --> PBR.

6. Set the material of the Render Mesh Visual to be the new PBR material in the Inspector panel after selecting the face mesh object in the Objects panel.

7. Select the PBR material in the Resources panel, adjusting the Blend Mode to Normal so that the material is transparent. Enable the Opacity Texture checkbox. This will create a Texture field, which you can set to your own texture.

And now you've visualized your own face mesh!

Download the 3D Face Mesh OBJ HERE.