Common information

In this section you will find information on different tools and techniques you need to master to create quality templates.

Template structure in Photoshop

In order for a template PSD document to be correctly read by the Template Creator, it needs to have a certain structure in Photoshop.

A template structure is defined by:

  • groups of layers
  • subgroups of layers
  • smart objects of user photo regions

Groups of layers

Groups of layers can be of 3 types: ‘portrait’, ‘landscape’ and ‘square’. The names of these groups should always correspond to their type: ‘portrait’ , ‘landscape’ and ‘square’. The names of these groups should always correspond to their type: ‘portrait’, ‘landscape’ and ‘square’. It does not matter whether these names are capitalized or not.

NB: As it appears from the names of the groups, each of them deals with a certain orientation of a template. I.e. each particular group stores layers and other elements adapted to a certain orientation of a user photo.

Below is an example of a template containing two types of layer groups (inside one PSD document). It is a frame template with ‘portrait’ and ‘landscape’orientations:

‘portrait’ ‘landscape’

A PSD document can contain 1, 2 or all 3 types of groups that define what types of user photos (portrait / landscape / square) the template is suited for.

A PSD document may also contain no groups dealing with a certain orientation. In this case all other template elements are positioned on the top level of the PSD file, and we say that this template has universal orientation.

PSD-документ для шаблона
с универсальной ориентацией

There are also templates that contain several PSD documents, each of them storing a certain orientation. You need to store each orientation in a separate PSD document when canvases in different orientations have different aspect ratio.

Subgroups of layers

The next element in the PSD document structure is subgroups of layers. A subgroup of layers consists of layers that have been grouped together, in terms of Photoshop.

Subgroups of layers contain graphic layers and other elements that are rasterized (‘merged’) into one layer on the level of this subgroup when the Template Creator reparses the PSD document.

In other words, everything placed into a subgroup of layers will appear as a single layer in the Template Creator after reparsing. If there are blending modes and masks applied to graphic layers inside a subgroup, all of them will be rasterized on the level of this subgroup.

Blending modes and masks applied directly to subgroups of layers will be transferred to graphic layers generated by the Template Creator.

As the contents of a subgroup will be merged into a single layer, the Pass Through blending mode cannot be processed correctly. Therefore, it is forbidden to apply this blending mode to subgroups of layers. Read more about the Pass Through blending mode here.

As for the layers arrangement in a PSD document, subgroups of layers can be positioned as follows:

  • If a template contains different orientations, subgroups of layers are positioned directly in groups that define layer orientation.
  • If a template has universal orientation, then subgroups of layers are positioned on the root level of a PSD document.
Arrangement of subgroups of layers in
a template with ‘square’ orientation
Arrangement of subgroups of layers in
a template with universal orientation

Important: stickers are a special case of subgroups of graphic layers. Subgroups of stickers are processed in a particular way.

User photo regions

A user photo region is an area where a user photo is placed. It is defined by a Smart Object in Photoshop. Depending on the type of a user photo region, its name should always start with one of the variants below:

  • SQ — a prefix used for frame user photo regions.
  • FSQ and FSQR — prefixes used for figure photo regions.
  • Face region — a prefix used for face user photo regions.

Besides playing a major role in user photo positioning in a template, smart objects offer the following possibilities:

  • You can store test user photos inside smart objects to try them with your template.
  • All smart objects of the user photo region ( except for face regions) can be transformed if your template needs it, but they must remain quadrangular (not necessarily rectangular, but you cannot use Distortion or Warp tools. If your template needs some distortion of the user photo region, learn about possibilities and restrictions regarding user photo region distortion here).
  • You can apply masks and blending modes to smart objects (see the list of supported blending modes), as well as set their opacity.

User photo regions are positioned on the same level with the subgroups of graphic layers and can be arranged in any order relative to the subgroups of graphic layers and other user photo regions.

Important:the Template Creator won’t be able to read a PSD file, if it contains user photo regions, groups or subgroups of layers with identical names on the same level. For example, you cannot have two groups of layers called "Square", or two subgroups of layers with the same name (i.e. "1_v") in the "Square" layer group

If the Template Creator detects name coincidences in a PSD document, as mentioned above, it will prompt you to rename them automatically when reparsing the PSD file.

However, you can have layers with identical names within the subgroups.

The subgroups have identical
names, the PSD file cannot be read
The subgroups have different names,
the PSD file will be read successfully

The scheme below shows how template structure elements in Photoshop correspond to layers in the Template Creator.

Important: when a user photo is processed with a template, the template is applied on top of a white background. If a template canvas is not fully covered by graphics (graphic layers, stickers and user photo regions) the white background will be visible through ‘gaps’.

Auxiliary materials for creating a template (grids, etc.) can be inserted in two places:

  • on the same level with the subgroups of layers (do not combine layers with these materials into groups). Layers can be called as you like (without the SQ prefix, so that the Template Creator does not confuse the service materials with the Smart Object of the Frame Region).
  • on the top level (the same level with the Portrait/Landscape, etc. groups). Here the layers can be organized in groups with names other than "Portrait", "Landscape" and "Square".
Storing auxiliary materials
in a template supporting
different orientations

You are welcome to download samples of templates we’ve discussed above:

a template with several orientations can be downloaded here.

a template with universal orientation can be downloaded here.

a template with several orientations stored in different PSD documents can be downloaded here.

Different orientations support

Sometimes template orientations have different canvas proportions. For example, you may need to create a 1000 x 2000 px canvas for the Portrait orientation and a 2000 x 1000 px canvas for the Landscape orientation. You cannot do this inside one PSD document.

However, you can store each orientation in a separate PSD document, where you can set a suitable canvas size for a particular orientation. See the video tutorial on how to create a template with different orientations stored in different PSD documents.

You can also download a template including several PSD documents with different orientations to see its structure.

Duplicating template orientations

The Template Creator allows you to add additional orientations into your template by copying existing orientations. E.g. if your template includes only one orientation at the moment, you can use it later as a prototype for other orientations of this template.

Basic guidelines on how to do this can be found in these video lessons: part 1, part 2 and part 3. At the same time, the Template Creator lets you add / copy an orientation automatically. To add a new orientation into your template, select Insert > Template Orientation in the menu.

The following dialog will open:

It allows you to сreate a new orientation by copying an existing one. Using this dialog, you can:

  1. Select an orientation to be copied.
  2. Specify a new orientation for the copied one.
  3. If the project has only one (universal) orientation, you can convert the current universal orientation into a new one.
  4. Insert a new orientation into a separate PSD document.
  5. Set the path for saving a new PSD file (in case you placed a new orientation into a separate PSD document). Save it to the same folder as the project with the original PSD document

To copy and insert an existing orientation, do the following:

  1. Select an orientation to be copied. If your template has Universal orientation, use the “Set another orientation” drop-down menu to specify a new orientation your universal orientation will be converted into.
  2. In the Paste as drop-down menu select an orientation you want to create using the current orientation as a prototype.
  3. If you want to create a new orientation in a separate PSD document, check the Paste into a new PSD box.
  4. In case you need to save a new orientation in a separate PSD document, specify the folder that contains the project file together with the original PSD document you used for copying.
  5. Click “ОК” to confirm the settings.

You can arrange your orientations in two possible ways: all of them can either be stored in a single PSD document, or, vice versa, each orientation should be stored in a separate PSD document.

For example, if your template contains two orientations inside one PSD document, and you want to add another orientation into a separate PSD document, you should first split your existing orientations into separate PSD documents, and only then add a new orientation (also in a separate PSD document).

If, on the contrary, your template contains two orientations, each in a separate PSD document, you won’t be able to add one more orientation into one of the existing PSD documents. It can be added as a separate PSD document only.

Splitting orientations into separate PSD documents

If a template has several orientations inside one PSD document, sometimes it is necessary to split them into separate PSD documents. The Template Creator lets you do that easily.

Select Template > Split into Separate Documents in the Template Creator menu.

The Split Orientations window will appear. In this window you can change the paths for your orientations, but in most cases it is not necessary.

Click the OK button, and the Template Creator will split the original PSD document into several separate PSD documents with different orientations (click OK in pop-up windows in Photoshop while it creates new documents). The original PSD document can be removed manually.

Merging PSD documents with different orientations into a single PSD document

Sometimes, when you work with a template supporting different orientations, you may create a separate PSD document for each of them. If later it becomes clear that you find it more convenient to keep all orientations inside one PSD document, you can use the Template Creator to combine your PSD documents with different orientations into a single PSD document. To do so, select Template menu > Merge into a Single Document.

The Merge documents dialog allows you to specify the canvas size for a new PSD document as well as tell the Template Creator what to do with the original PSD documents.

In case you are going to merge PSD documents with different canvas sizes, the Template Creator will warn you about that.

When you click ОК in this warning box, the Merge documents dialog will open, where you will need to specify the reference canvas size for a new document. If you click Cancel in the warning box, the merging process will be discontinued to let you adjust the canvas sizes manually.

Exporting a template to ZIP

Some files contained in the resources subfolder are auxiliary files needed for the Template Creator to work correctly. The template itself does not actually need them. The total archive size, with these ‘unnecessary’ files, may be way too large. This may lead to a longer time that the template takes to process a user photo. For this reason, it is not recommended to zip up the resources folder manually. It is advisable to use the Template Creator instead.

To do so, go to the File menu and select Export template resources as ZIP.

This will create a zip archive inside a specified folder containing only the resources that a template needs to function. Now the archive is ready to be uploaded to the server (you only need to add the template preview picture to it).

The zip archive generated via the export option cannot substitute the project file or the PSD document. This zip file can only be used for uploading to processing servers. To proceed working with the template project you still need to have the project file and the PSD document.

Automatic resizing of templates

If the dimensions of a user photo are smaller than the dimensions of 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.

To do so, check the Avoid photo scaling box in the New project or Edit project dialog and specify the minimum size of the template, taking into account its shorter side (see the screenshot below).

If a user photo is larger than the template, the photo will be downsized to the size that will make it possible to insert the photo properly into the template. The dimensions of the template remain unchanged in this case.

If a user photo is smaller than the template, the template graphics will be downsized to match the size of a user photo.

In case if a user photo is smaller than the specified minimum size of the template, then the template will be downsized to that specified limit, and the userphoto will be upsized to the limit.

This option cannot be used with sticker or filter templates, as in these types of templates the graphics is always downscaled or upscaled to match a user photo size.

If there are several user photos in a template, you need to specify one photo whose size will be used for resizing. To do so, choose a user photo region with a desired photo index, then set the value of the Do not scale parameter to true.

As a result, the template graphics will be resized to match the size of a user photo with a specified index number.

If there are several user photo regions that have the same index number as the chosen photo, then the value of the Do not scale parameter will be applied to all of them.

If you change the value of the Do not scale parameter from true to false, you’ll get the following error message:

The point is that a template must contain one particular photo whose size will be used as a sample for the template canvas. If you want to set the Do not scale parameter to false for a particular photo, you need to set this parameter to true for another photo (with another index number). As a result, the value of this parameter will be false for user photo regions with other index numbers.

By default, Do not scale = true for a user photo region with 0 index number.

Creating templates with several user photos

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

The procedure of creating a template with several user photos is pretty much the same for all template types, except for sticker templates.

Sticker templates can have only one user photo region and, as a result, only one user photo.

Here is a step-by-step guide on how to create a template with several user photos:

  • Create several smart objects of the user photo region in your PSD document.
  • Specify an image index for each user photo region in the Template Creator.

An image index is a sequence number of a photo uploaded by a user.

It is assumed that all photos uploaded by a user are indexed from 0 to N-1, where N is the total number of photos. An image index assigned to a user photo region, means that a photo with a corresponding sequence number will be inserted into this user photo region.

Thus, if a template has 3 user photo regions, each of them for a different user photo, then the user photo regions should be indexed as 0,1, 2 (enumeration should have no gaps and start with 0).

Besides, several user photo regions may have an image index belonging to one photo.

For instance, there may be a template with 7 user photo regions designed for 3 user photos. In this case the user photo regions may have the following image indexes: 0, 1, 1, 2, 0, 1, 2.

There are some rules for assigning image indexes:

  • enumeration should start with 0.
  • an image index cannot be more than M-1, where M is the total number of user photo regions.
  • here should be no gaps in the sequence of image indexes. That is, if the maximum image index you use is 5, then all numbers from 0 to 5 must be used in the sequence (e.g. you cannot omit 4).
  • the quantity of unique image indexes used in different template orientations should be the same.

You can test a template with multiple user photos in the same way as a regular template, using the panel with test photos (in the right part of the window) and the Process All / Process Selected buttons. In this case the same photo will be inserted into all user photo regions.

For a more detailed testing with different test photos, open the multiple user photo dialog.

This can be done in two ways:

  1. Select several test photos in the panel on the right, then right-click and click “Process Multiple Photos...”:
  2. Or select File > Process Multiple Photos… in the menu:

You will see a dialog for testing a template using several test photos. Before processing a test photo, the Template Creator performs a validity check of index numbers. Сommon errors found at this stage and their solutions are described here.

Add a few photos for testing your template. In the example above, 2 test photos for 2 user photo regions have been added. The right and left arrows allow to add or remove test photos from the list. The up и down arrows let you shuffle the photos. A click on the “Random” button creates a list of randomly selected test photos.

If you click the unpaired button with the right arrow, the template will process the selected test photos. To save the result, click the Export results button.

Before processing a test photo, the Template Creator performs a validity check of image indexes. The following errors can be detected:

  • Found an image index larger than the number of user photo regions.
    If your template has M user photo regions for each orientation, none of the index numbers can be more than M-1. Check all orientations to make sure they don’t contain invalid index numbers (exceeding M-1) and correct them
  • Missing image index.
    Make sure that you have used all index numbers in the sequence including 0. That is, if the maximum index number in the template is 5, then all numbers from 0 to 5 must be used in the sequence (e.g. you cannot omit 4).
  • A zero-indexed user photo region is missing.
    No user photo regions with the 0 image index have been found in the template. Enumeration of photos starts with zero, so the first photo should have the 0 index number. Assign the zero index to one of the user photo regions.
  • Each template orientation must contain the same number of unique image indexes.
    The quantity of unique image indexes (that is, the number of unique user photos) should be the same for all template orientations. Compare your indexes in all orientations and create the same index number set for all orientations.

IIf there are several user photos in a template, you need to specify one photo whose size will be used for resizing. To do so, choose a user photo region with a desired image index, then set the value of the Do not scale parameter to true.

The photo with a specified index number will be used as a sample, and all other graphics will be resized to match its size.

If there are several user photo regions that have the same image index as the chosen photo, then the value of the Do not scale parameter will be applied to all of them.

If you change the value of the Do not scale parameter from true to false, you’ll get the following error message:

The point is that a template must contain one particular photo whose size will be used as a sample for the template canvas. If you want to set the Do not scale parameter to false for a particular photo, you need to set this parameter to true for another photo (with another image index). As a result, the value of this parameter will be false for user photo regions with other index numbers

By default, Do not scale = true for a user photo region with 0 index number.

Dynamic masks

A dynamic mask is a mask that is built based on specific user photo regions. It can be applied both to a user photo region and to a graphic layer.

All types of user photo regions can be used to create a dynamic mask based on them (figure regions, face regions or even quadrangular regions). The Template Creator will build a dynamic mask for a user photo basing it on:

  • figure
  • face
  • skin
  • hair found in a user photo.

To understand the meaning of dynamic masks, have a look at a template that uses dynamic masks based on a figure.

Original photo Result of processing

Note that the mask applied to the graphic layer accurately follows the figure outline. If we use the same template to process another user photo with a different figure, a dynamic mask will be based on a different figure outline.

The scheme below explains the basic idea of a template with a dynamic mask:

Graphic layer Dynamic mask based on a figure found in a user photo Result of processing

If there is a dynamic mask applied to a graphic layer, blending modes can also be used.

You can open a dialog that lets you add dynamic masks using one of the methods below:

  • Right-click a graphic layer / user photo region and select Dynamic mask application settings... from the context menu
  • Click a graphic layer / user photo region to select it in the list, then go to the Layer menu and select Dynamic mask application settings...
  • Click a graphic layer / user photo region to select it in the list, then go to its parameters displayed in the panel below the layers list

The Dynamic mask editor for a selected layer / user photo region displays the list of all user photo regions contained in the current orientation.

You may optionally disable a mask specified in the PSD document for a graphic layer / user photo region you are going to apply a dynamic mask to. To do so, check the box labeled Ignore layer mask specified in Photoshop. This will disable a test mask created in Photoshop to roughly estimate the result.

A mask can be built using one or several user photo regions. In case a mask is built using several user photo regions, all resulting masks are composed into one. Masks can be composed in different modes. Masks can also be inverted.

When building a mask for each selected user photo region you can select the mask type:

  • figure mask;
  • face mask;
  • skin mask;
  • hair mask.

You can also adjust the parameters of dynamic mask generation. To open the Dynamic mask generation settings dialog for a particular user photo region, use one of the methods below:

  • Right-click a user photo region and select Dynamic mask generation settings... from the context menu
  • Click a user photo region to select it in the list, then select Dynamic mask generation settings in the panel below the layers list.
  • Click a user photo region to select it in the list, then go to the Layer menu and select Dynamic mask generation settings.

Dynamic mask generation settings

This dialog lets you switch between different types of masks and adjust their settings individually for each type.

Important:

  • Face mask settings are used for manipulations with faces only (such as cutting out a face when inserting it, building a dynamic face mask and using facial filters).
  • Figure mask settings function in the same way, but with regard to figure regions.
  • Settings for other types of masks (skin masks and hair masks) are valid when such masks are created.

All types of masks have the same set of parameters:

  • Eroding width determines how close dynamic mask borders should be drawn up to the object outline (a figure, a face, skin areas etc., depending on mask type). If the value of this parameter is non-zero, the borders of the area get sharply defined thanks to thresholding. If the value of this parameter is too big, part of the object will be hidden by the dynamic mask.
  • Smooth radius determines how smooth the mask borders will look after eroding has been done (see above). This parameter is valid only if the value of eroding width is non-zero.
  • Sizes in percentage toggles units of measurement for the Eroding width and Smooth radius parameters. If the parameter value is False, pixels are used; if the value is True, sizes are specified in percentage.

The Template Creator supports the following mask blending modes:

  • Multiply — the color of each mask pixel is normalized (reduced from the [0, 255] range to [0, 1]) and is multiplied then. The result is brought back to [0, 255].
  • Add — masks are summarized in each pixel. If the result of addition in each particular pixel exceeds 255, the value of the resulting mask will be 255.
  • Subtract — masks are subtracted in each pixel. If the result of subtraction in each particular pixel is negative (less than 0), the value of the resulting mask will be 0.
  • Minimum — the lesser value of the two masks are chosen in each pixel.
  • Maximum — the greater value of the two masks are chosen in each pixel.

The schemes below illustrate these blending modes for dynamic masks.

Dynamic mask 1 Dynamic mask 2

Masks 1 and 2 - Add Masks 1 and 2 - Multiply

Masks 1 and 2 - Subtract Masks 1 and 2 - Minimum

Masks 1 and 2 - Maximum

A user photo region lets you apply to it a dynamic mask based on this user photo region. For example, you can apply an inverted mask to a quadrangular user photo region and build this mask based on a figure found in this user photo region. This will let you achieve an effect of a ‘missing figure’.

Original photo Resulting image

As was said above, masks can be built based on face outline, as well. For example, you can apply a mask to a user photo region based on a face found in this user photo region.

Original photo Resulting image

You can also invert this face mask for a given user photo region and achieve an effect of a ‘missing face’ in the resulting image.

Original photo Resulting image

You can also build a mask based on skin and hair areas found in a user photo:

Original photo Skin dynamic mask
(with a blend mode applied to the graphic layer)

Note that the skin dynamic mask excludes eyes and lips areas.

Original photo Hair dynamic mask
(with a blend mode applied to the graphic layer)

Animated templates

Using all existing types of templates as a base, you can also create animated templates. 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.