Back to Facial templates development page

Examples of creating facial templates

Creating a basic facial template

Let's create a facial template where a face from a user’s photo will be inserted into a certain area using the facial points: the centers of the eyes and the corners of the lips. You can download the artwork for this template here. The result of this lesson can be downloaded here.

Original photo Photo processed with the template

Step # 1

Launch the Template Creator and wait for Photoshop to open. In the Template Creator select Create Project from the File menu.

A New Project window will open. Select the Face template type, Universal Orientation and save the project. The Template Creator will generate a PSD file with the necessary template structure.

Step # 2

Now go to Photoshop. You can see that the Template Creator has generated a PSD document with the necessary layers arrangement, so you can start working with your template

You must be familiar with the template structure: it consists of subgroups of layers, and a smart object of the user photo region. As this template has universal orientation, the subgroups of layers and the smart object are positioned on the top level of the PSD document.

As a reminder, the subgroups of layers and the smart object of the user photo region can be positioned in any arbitrary order that you may need for your particular template.

In this particular case we need only 1 subgroup with a graphic layer positioned above the face region. So we can delete the other two subgroups as useless.

Step # 3

Place the image with the robot head (can be downloaded here) into the graphic layer subgroup.

Adjust the canvas size to the size of the artwork. Use the Crop tool to trim the excess canvas.

Step # 4

Let us now position and scale the smart object of the face region.

When scaling the face region with the transform tool, always keep the proportions of the smart object. To do so, click the "Maintain aspect ratio" button (see below).Keeping the proportions of the smart object while transforming it will keep the facial points correlation safe in the smart object. As a reminder, facial templates insert faces from user photos using the facial points of the smart object. The position of these points should conform with universally applicable face features correlation. If the correlation of the face features in the smart object is broken, user photos will not be inserted correctly.

Scale and position the smart object. After you have tested your template using different test photos, you might need to go back to this step and adjust the smart object size, position and rotation.

But now, when you are satisfied with its position, head to the next step.

Step # 5

Go to the smart object of the face region. To do so, double-click on its thumbnail in the layers list.

You must be familiar with the structure of the smart object of the face region, so let’s proceed to correction color.

The point is that this particular template inserts faces from user photos into the head inside the template. The skin tone of the face (head) inside the template can be very different from the skin tone of faces in user photos. If we leave things as they are and process a random photo with a template, the result can look like this:

Original photo Photo processed with the template
without correction color.

To avoid such problems, you should use correction color - it will bring face skin tone in a user photo to the shade found in the template.

Go to the main document and use the Eyedropper Tool to pick up a color from the head a user photo will be inserted into.

Then go back to the smart object of the face region and use the Fill tool to fill the Correction color layer with that color.

The correction color layer will overlap the face scheme and the sample user photo. To be able to make further edits to the template, move the layer down under all layers.

The arrangement of layers inside the smart object of the face region does not affect anything except the convenience of working with the smart object.

Save the changes you’ve made to the smart object and close it.

Step # 6

Go to the Template Creator and reparse the PSD document. As soon as the document is reparsed, go to user photo region filters (learn more about the ‘Filter settings for User Photo Region dialog’ here).

Double-click on the user photo region to see the list of filters applied to it.

As we can see, there is the Face insertion filter applied to the user photo region. This filter is added automatically to the user photo region in facial templates or if you add a face region to a template.

The value shown in the ‘Correction color’ property indicates that the Template Creator has successfully retrieved data about the correction color that we specified in the smart object.

In case you need to change the correction color, go back to the PSD document and select another color in the smart object. Then save the changes you’ve made and reparse this smart object layer.

Close the Filter settings dialog and process several test photos. The result should be similar to the example shown at the beginning of the lesson.

Original photo Photo processed with the template
without correction color.

If the result is different from what you expected, you can always go back to any previous step and make edits. Then reparse the specific layers or the whole PSD document.

The result of this lesson (resulting template) can be downloaded here.

Creating a facial template with dynamic masks along facial contours

In this section we are going to cover the algorithm of making a creatively different facial template.

Original photo Photo processed with the template

As it appears from the example given above, this template is a facial type, as only facial templates let you control precisely the size and position of the face in relation to the canvas. It is quite clear that we need a mask for each face region in this template. A mask should be used to insert only faces, not entire user photos.

You can add masks to face regions using one of the methods below:

  1. Mask each face region manually, using cut-and-try approach to find a universally applicable mask shape.
  2. Use the Template Creator to build dynamic masks along facial contours.

You can learn more about dynamic masks here.

The second method is preferable as it is way more accurate (a mask is always built automatically using specific facial contours). Besides, it lets you avoid doing routine work.

Now it is clear how to implement the creative idea of this template: it is necessary to build a template with multiple face regions, with dynamic masks applied to each of them along the facial contours

Let’s get started!

Step # 1

In the Template Creator select Create Project from the File menu.

A New Project window will open. Select the Face template type and Universal Orientation

Save the project and wait while the Template Creator generates a PSD file with the necessary template structure.

Step # 2

Now go to Photoshop. You can see that the Template Creator has generated a PSD document with the necessary layers arrangement, so you can start working with your template.

To implement our creative idea we’ll need quite a few face regions (about 10 of them). The canvas automatically created by the Template Creator will function as the white background (it is visible in some places in the resulting template).

Let us now adjust the structure of the PSD document. Delete three unnecessary subgroups of graphic layers.

Step # 3

Go to the Template Creator and reparse the PSD document. Our template is semi-finished at the moment, and we can try processing a test photo.

The result that we got is quite expected. The test user photo has been positioned using its facial points and it has not been cropped. But, as we said before, we need it to be masked (cropped) along its facial contours.

Step # 4

Double-click on the user photo region thumbnail to see the list of filters applied to it.

As we can see, there is the Face insertion filter in the list of applied filters. This filter is added automatically to face regions by the Template Creator.

Set the ‘Face’ value in the ‘Mask’ property.

Setting this value will let us hide everything beyond facial contours from user photos. Confirm the changes and close the filter settings dialog.

Step # 5

After we've adjusted dynamic masking of the face region, we can check the result using a test photo.

The result is not bad. However, since our template combines multiple photos, it would be great to feather the edges of facial contours and make the mask a little bit ‘closer to the face’. To do so, open the Dynamic mask generation settings dialog.

To open the dialog, right-click the face region and select the corresponding item from the context menu.

This dialog lets you configure dynamic masks settings. Values set in this dialog affect all filters regarding face eroding and figures for a given user photo region.

Select Face Mask, then set Eroding Width to 10 and Smooth Radius to 15. Eroding Width determines how close image borders should be drawn up to the figure. The meaning of the Smooth Radius parameter should be clear from its name.

These settings let you make a dynamic mask ‘closer to the face’ as well as make its edges smoother. You can experiment with the parameters to find even more suitable values, in your view. Confirm the changes and process a test photo to check the result.

Well done! Let us now go to Photoshop and address the composition of the template.

Step # 6

As we've already said, we’ll need about 10 face regions to implement our idea. At the moment, the template contains only one face region, for which we’ve enabled a dynamic mask along its facial contours and configured its parameters. Now we need to add 9 more face regions. Of course, we could do this using the Insert menu in the Template Creator, but this method has some shortcomings.

The point is that if you add face regions using the Template Creator, you will get new regions without any added filters and configured settings. In this particular case, all 10 face regions should have the same settings regarding facial contours eroding. It is not a good idea to do quite a lot of extra work configuring the parameters for each of the face regions manually. That’s why we will create copies of the existing smart object of the face region right in our PSD document. All clones of this smart object will inherit the filters and face region settings in the Template Creator.

Right-click the smart object layer to open the context menu and choose ‘Duplicate Layer’.

Repeat this operation until you have 10 smart objects of the face region in the PSD document.

Step # 7

As soon as you've added all face regions into your PSD document, it is necessary to position and scale them.

Please remember that when you work with the Transform Tool, it is very important to keep the proportions of the smart object - this will keep the facial points correlation safe. To do so, click the ‘Maintain aspect ratio’ button immediately after enabling the Transform Tool. This should be done each time you transform the smart object of the face region.

Step # 8

Arrange the smart objects in the PSD document in a way that suits you, then reparse the PSD document in the Template Creator and process several test photos.

Original photo Photo processed with the template

If the result differs greatly from what you see here, you can always go back to any previous step and make edits. Besides, you can download the ready-made sample of this template and compare it with the result you got.

Back to Facial templates development page