Facial templates development

Facial templates recognize a face in a photo and insert it using the coordinates of facial points: the centers of the eyes and corners of the lips. Templates of this kind are often called face in hole effects, but we’re going to stick to the term facial templates for brevity.

Examples of facial templates can be found in the Photo Lab application in the ‘Face montages’ category.

Facial templates can be used together with stickers — just add the Rasterization filter in your project.

In order for a template to be properly processed by the Template Creator, it needs to have a certain structure in Photoshop. Read this page for rules and special aspects regarding layers arrangement in a PSD document.

Creating a project in the Template Creator

To work with the Template Creator, you should associate your PSD file, containing layers, with a .pttp2 format project file.

Use the Template Creator to generate drafts for any template you want. The Template Creator generates a set of groups with valid names, thereby minimizing the chance of error while creating the template structure.

How to start: a step-by-step guide

Open the Template Creator when Photoshop is already launched (if Photoshop is not running, it will start automatically when you open the Template Creator). Go to the "File" menu, and select "Create Project":

A dialog will open, where you need to fill the parameters of your template and save it in a selected directory.

This dialog allows you to create several types of PSD documents. In case of a facial template, "Universal orientation" option should be checked.

When you are done with the dialog, The Template Creator will generate a new PSD file in Photoshop. This file is associated with a new project and has the necessary structure of groups:

If there are open documents in Photoshop, the project creation dialog will allow you to make a project based on an existing document:

Select a PSD document to include into the project, then open the Orientation drop-down menu and select “All Orientations” (as facial templates are universal). Select “Ignore” for the documents you don’t want to include into the project.

You can change the binding of a PSD document to the project at any time by clicking “File” > “Edit Project” (CTRL + E).

Besides, you can also change template type - it can affect the result, all other things being equal.

More information about the Template Creator and how to test ready templates can be found in this section.

Face region

A face region is defined by a smart object located on the same level with the subgroups of the layers. Depending on the type of a template, smart objects have their own characteristics.

A smart object of a face region defines the points (the centers of the eyes and the corners of the lips) using which a user's face will be inserted into the template.

Inside this smart object there is another smart object (used by the Template Creator for technical purposes), the "Correction color" layer (it can be filled with a color to bring different skin tones to approximately the same shade), as well as a test user photo that should help you position the facial points in the template.

The provided test photo can be hidden, replaced or even deleted. However, to position the facial points in the template we strongly advise you to use this exact photo, while for other artistic purposes you can choose other facial photos.

If you want to use other photos in the smart object of the face region, simply add them by placing them next to the existing face, then display or hide the necessary faces.

On the given face, the eyes and corners of the lips coincide with the corresponding markers of the face on the diagram. If in your PSD document you have photos whose facial points do not match with the markers on the diagram, there is no need to edit the position of facial points because of this. Adjust the points only if faces look lopsided on a large number of test user photos when you test your template.

The final positioning of facial points is determined after testing the template on a large number of different user photos.

When you change the size of the smart object of the face region, always keep its proportions. To do so, click the ‘Maintain aspect ratio’ button in the parameters panel of the "Transformation" tool.

The Template Creator lets you flip smart objects of the face region horizontally or vertically.

To flip a smart object of the face region, use standard Photoshop tools. For example, go to Edit menu > Transform > Flip Horizontal / Vertical.

When you reparse your PSD document, you tell the Template Creator that one or several face regions have been flipped. Later, when you process test photos, make notice that images placed into a specified face region are flipped horizontally or vertically.

Flipping works in the same way for all user photo regions regardless of the template type.

Additional information

Automatic resizing of templates

If a user photo is smaller than the template, the photo will be upscaled to match the template size. If the difference in their sizes is quite noticeable, the user photo will look blurred and low quality in the template.

To avoid problems related to size mismatch, use the automatic resizing option.

Creating templates with several user photos

The Template Creator makes it possible to create projects with several different user photos inside one template. Read more about it here.

Animated templates

This template type can be animated. More information on animated templates development can be found here.

There are some temporary restrictions regarding using animation in templates. Learn more about them here.

Facial templates: examples of development

Step-by-step example of facial template development

Creating a facial template

Important video tutorials

See this page for other video tutorials (e.g. lessons about templates with several face regions and working with filters).