In this tutorial, created with the 2019 version of Substance Painter, we will see how to retrieve the ID Colors of a model, when available, and use them to quickly create layer masks.
Video Transcript
Hello everyone! In this tutorial, created with the 2019 version of Substance Painter (but also applicable to other versions, both earlier and later), we will see how to retrieve the ID Colors of a model, when available, and use them to quickly create layer masks.
ID Colors are, as the name suggests, colors associated with vertices or faces of a 3D model. They are not the colors displayed during rendering, but additional information stored in the object's "Vertex Colors" data channel. Since the RGB values of a color are actually numerical values, they can be used as parameters for filters and other tools.

Substance Painter (as well as other software and tools) can retrieve this information and use it for various purposes. For example, in Substance we can create layer masks by selecting, in a single operation, all geometries that share the same Vertex Color.
When we add a layer mask to a Material in a project, one of the available mask effects is "Color Selection". However, after adding such an effect, you may encounter the message "ID not found", while the "Pick Color" tool fails to detect any color on the geometry...

In fact, during the introduction of this tutorial I specified "when available" because these colors are assigned to the object's "Vertex Colors" information channel when exporting a model, but this operation is not always performed, so they may sometimes be missing. Let's move to Blender 3D (version 2.92 in this particular case) to see how to assign Vertex Colors to parts of an object before exporting it to Substance Painter.

In the example I am using, we want to identify at least four areas: the cable, the two glossy plastic housings, the metallic connector parts, and the matte plastic separators.
Let's take a look at the object's UV layout. We can see that the various parts have indeed been separated using seams, so they are placed on different UV islands. However, these islands are not easy to identify and, in this particular model, there are only a few of them, but you will certainly encounter much more complex UV layouts. For this reason, we decide to assign Vertex Colors.

In the 3D View, switch to Vertex Paint mode and, most importantly, enable Face Selection mode in the 3D View header. Then deselect everything with ALT+A, or Select → None from the header, so we can begin selecting the different parts and assigning colors to them.


Selections can be made using the various tools provided by Blender. Since, in this example, the different parts have been separated and arranged into distinct UV islands, I can select them easily by pressing the L key ("Linked") while the mouse cursor is over one of them.

I will start by selecting the glossy plastic connector parts, which will change color and no longer display the wireframe edges as I select them.
To assign a Vertex Color to these parts, first select a color in the Vertex Paint Properties panel (which can be opened or closed with the N shortcut), then press SHIFT+K, or choose Paint → "Set Vertex Color" from the 3D View header.

To move on to the next group, deselect everything with ALT+A, then repeat the process: select the islands you want, choose a color, then use "Set Vertex Color", and continue in the same way for all remaining groups, four in our case.

When choosing colors, I recommend selecting colors that are VERY different from each other whenever possible, so that the areas stand out at a glance, both in Blender, where this helps identify missing or incorrectly assigned parts, and in Substance Painter, where it prevents confusion between color shades that are too similar during selection.
Once this work is completed, all that remains is to export the 3D model in a format that supports Vertex Color information, such as FBX, and then return to Substance Painter.

After importing the model file again into Substance Painter, click "Bake Mesh Maps" in the "Texture Set Settings" tab.

In the Baking window, disable the entries you are not interested in and leave "ID" enabled. Before clicking the Bake button, however, open the settings for this channel and make sure that the "Color Source" option, which defines the source of the colors used to generate the map, is set to "Vertex Color". Substance will then access this additional model information to create the ID map.

Click Bake and wait for the map to be generated. You will find it both in the ID section of "Texture Set Settings" and in the "Properties – Color Selection" panels of the various "Color Selection" effects created for your project masks.

At this point, by clicking "Pick Color", you will be able to select an ID Color from the project and the mask will be generated instantly, assigning that material to all areas of the model that have the corresponding Vertex Color.

The operation can then be repeated for the other materials if we consider it useful. This is a tool that can be very helpful in certain situations, but depending on the case, it may be easier to use Brush, Polygon, UV Chunk, or other selection tools. ID Mask is simply another arrow you can add to your quiver, without having to discard the others.

To summarize: if a model contains Vertex Colors, it is possible to retrieve this information in Substance Painter by baking the ID map, making sure to specify "Vertex Color" as the source of the information to recover from the model. After that, you can add a "Color Selection" component to the masks of your materials and, using the "Pick Color" tool, generate a mask that includes only the geometries assigned to the selected Vertex Color.

That's all for this video tutorial! See you soon!