In this tutorial, we will see how to simulate stitches on an object using Substance Painter brushes (version 2019) on the mask of a Material that, as we will see, will have only the Height channel enabled, allowing us to simulate raised details.
Video Transcript
Hello everyone! In this tutorial, we will see how to simulate stitches on an object using Substance Painter brushes (version 2019) on the mask of a Material that, as we will see, will have only the Height channel enabled, allowing us to simulate raised details.
In fact, we will cover two topics in a single tutorial:
how to simulate raised details using a Height Map, in this case with a uniform maximum height;
how to define an opacity mask for a Material or a Layer using brushes.
In this tutorial, I will show a very specific application using one of Substance Painter's native brushes, which allows us to quickly create a sequence of stitches or seams. However, the technique is generally applicable with many different types of brushes to achieve a variety of effects. What is shown here is just one example.
I created a new project using the "PBR Metallic Roughness (Allegorithmic)" template and a 3D belt model. In particular, I applied two different Substance Materials to different parts of the object using masks and the "UV Chunk Fill" selection mode, which I demonstrated in a previously published video tutorial, so I will not revisit that topic here.
For the record, I used the native Substance Material "Cobalt pure" for the buckle, while for the belt itself I used "Artificial leather", leaving the default settings unchanged in both cases.

At the top of the object's Material stack in Layers, let's now add the Material we want to use for the stitches.
The choice obviously depends on the specific case. This applies not only to this practical example, since the technique is valid in many different contexts. Here, I am using a Material from Substance's "Fabric" group. Type Fabric into the search box in the Materials tab of the Shelf, then choose one of the displayed Materials.

The Material can be customized by modifying its parameters, such as its color or base colors, in the Properties - Fill tab.
The Material will be applied to the entire object, which is obviously not what we want. To limit its effect, we will proceed differently this time. We will create a folder containing both the Fabric Material and the Height Fill Layer that will generate the actual raised details. Later, we will create a mask for the folder instead of the individual Layers, allowing us to apply the mask to all Layers at once.
Right-click the Fabric Material and choose "Group Layers" from the menu that appears.

Now click "Add a Fill Layer" at the top of the Layer panel to create a basic Fill Layer. In the Properties - Fill tab, disable all channels except Height.

Then modify the Height parameter, setting it, for example, to 0.2.

On screen, we will not see any difference. The reason is simple: at this moment, the effect is being applied to the entire surface of the object. To appreciate it, we need to restrict it to the stitches only.
Drag the Fill Layer into the folder we created a moment ago.

Right-click the folder containing the Height Fill Layer and the Fabric Material, then choose "Add Black Mask" from the menu.

Select the mask itself and click the Paint tool, located in the Tools Toolbar, usually positioned below the main menu.

With the default settings, we should already be able to paint on the model, or rather on its layer mask, using a brush with soft edges and a pure white color. This means we will paint white onto the mask wherever we pass the brush, revealing the Materials contained inside the folder.

Brushes can be found in the Brushes section of the Shelf. I will not list them all here, but I encourage you to experiment with them and modify their settings in the Properties - Paint tab, where you will find many parameters that are generally quite intuitive. The main settings are:
Size: the size of the brush;
Spacing: the distance between successive brush elements when clicking and dragging. We will see a practical example in a moment with stitches;
Angle: the orientation angle of the brush pattern. With brushes that have no specific direction, such as "Basic Hard" and similar brushes, this parameter has little visible effect, but it becomes much more evident with other brushes, such as the stitch brush;
Grayscale, usually located near the bottom of the panel, allows us to specify the grayscale value applied to the mask. Intuitively, setting this value to 0 (black) paints black onto the mask, removing the effect in those areas. This allows us to use a brush like an eraser.

Remove all brush strokes by right-clicking the mask and choosing "Add Black Mask" from the menu. Then let's move on to the main topic of this tutorial: stitches.
In the Brushes section of the Shelf, type Stitches into the search box to filter the available brushes. By default, Substance Painter should display five native brushes with this characteristic. The first brush in the list will work perfectly. Select it with a double-click.

Clicking and dragging the brush over the object will create stitches. As should now be clear, we are not painting the Material itself, but rather the layer mask of the folder containing both the Material and the Fill Layer responsible for the raised details.
The basic brush settings allow us to adjust the size and spacing between each stitch segment. However, drawing on curved geometry like this is not particularly convenient.

Let's switch to the 2D view to display the object's UV layout and work directly on it. Since the object is represented on a flat two-dimensional plane, and since the UV layout has been properly created with straight belt sections, this approach is much more convenient.

It becomes even more convenient if we use the following shortcut: left-click and immediately release at the point where the stitch line should begin. Then press and hold SHIFT, draw a line, and finally left-click at the endpoint before releasing both SHIFT and the mouse.

We have just drawn a straight line, and we can use the same technique for additional seams, avoiding the need to draw freehand on straight sections.

There is more. By holding SHIFT + CTRL and dragging before left-clicking, we can draw with angle snapping enabled. By default, the snap increment should be 22.5 degrees, allowing us to draw perfectly straight lines on this model's UV layout.

As we have seen, the Properties - Paint tab contains many parameters. Some of them allow us to introduce randomness between brush elements, for example by varying their size or rotation angle. However, I will discuss these features in future tutorials with practical examples. For this tutorial, focused on stitches, it is enough to understand the settings already discussed: size, spacing, and angle, all used with fixed values and without randomness or additional effects.
If you make a mistake while defining the stitches, don't worry.
The mask is simply a grayscale image and, as we have seen, it can be edited using brushes set to either black or white. Therefore, we can remove mistakes in both the 2D and 3D views by selecting the folder's layer mask, choosing a harder brush such as "Basic Hard", setting its color to black, and painting over the problematic areas.

The changes will affect all Materials and Layers contained within the folder, so there is no need to correct them individually.
Folders can also be nested, and their masks will be nested as well. For example, we can place this folder inside another one by right-clicking it and selecting "Group Layers".

At that point, we can define a new layer mask for the outer folder, even using a different technique. For example, we could use UV Chunk Fill or, since this model allows it, Mesh Fill, which selects connected geometry even when it belongs to different UV islands, and select only the belt.

This allows us to perform an initial broad selection of the affected areas, followed by more detailed selections using the inner folders and layer masks. It is also a useful method for preventing the stitches from being applied to parts of the object that should remain unaffected.
Using Materials and Layers inside a folder, while delegating the area definition to the folder mask, provides a great deal of flexibility when modifying Material parameters later. For example, we can now open the Fill Layer and modify the Height value, or change the color and other parameters of the Material, without worrying about the mask controlling their application. The mask is defined at the folder level and automatically affects all of its contents, as we saw when correcting errors.

In this tutorial, we covered quite a few topics:
how to group multiple Layers and Materials into a folder, and even into nested folders, in order to define a layer mask for the folder and control the application of multiple effects;
how to create a Layer that affects only the Height channel, allowing us to generate raised details with uniform intensity;
how to paint on a layer mask using brushes, including an overview of the main brush parameters available in the Properties - Paint tab;
how to create stitches using Substance Painter's dedicated stitch brushes, including perfectly straight seams in the 2D view by working directly on the UV layout and using snapping shortcuts.
As always, feel free to leave questions, comments, or requests in the YouTube video comments section. See you next time!