The Color to Mask node groups similar colors in the input texture into regions. For each region, it creates a grayscale mask output, containing a representation of that region.
You can control which colors the node treats as similar via the Threshold property. Higher values make the node more likely to group similar colors into one region, and lesser values make color identification more precise.
The node can identify and output up to a total of 10 color regions and their corresponding masks. It also outputs an ID Map, containing a representation of all regions in one texture. In the ID Map, each region is represented with a different solid color as per the region’s properties.
To use Color to Mask, follow these steps:
- Create a new Color to Mask node on the Node Graph. It can be found under the Paint category in the Node Library.
- Connect the texture where you want to identify color regions into the Input port on the node.
- Set the Max Output Dimensions property to the desired output resolution.
- Adjust the tolerance of the color grouping using the Threshold property.
- View the result by bringing the Color to Mask node into the 2D and/or 3D Viewports.
- Access the individual region masks via the Region (1-10) outputs in the node.
|Node execution style||Automatic|
|Input Name||Input Type||Description|
The texture input in which the node identifies color regions and transforms them into masks.
|Output Name||Output Type||Description|
Contains the texture with all of the regions that the node identifies, each of them represented with a solid color as per that region’s properties.
Contains the grayscale mask for the identified region within the input texture. There can be up to 10 region outputs in this node, depending on how many regions the node identifies.
Max Output Dimensions
Set the output resolution of this node, in pixels. This determines the resolution of both the ID Map and the region masks. Note that this will not upscale the output if the chosen resolution is higher than the input resolution.
Set the tolerance of the color grouping algorithm, as a value between 0 and 100. At higher values, the node is more likely to group similar colors into one region. At lower values, similar colors are more likely to form new regions instead.
Set the opacity of the ID Map overlay in the 2D Viewport, as a value between 0 and 100 percent.
These properties are specific to each color region.
The number of per-region settings available varies, based on how many regions the node identifies in the input.
Set the output name of the region.
Set the amount of feathering applied to the region mask, as a value between 0 and 50 pixels. This uniformly expands the edges of the mask, blurring them in the process.