Skip to content

Blender Color Mask Node Setup and Breakdown

CDDTreborn edited this page Jul 4, 2023 · 1 revision

DESCRIPTION

Simple Node Group to help split and apply color mask textures in Blender. This is general blender info and requires no credits.

SETUP

  1. Load this blend file into your asset library
  2. Append the Material MI_Base_Masked or the Object Demo_Sphere to your current blend file.

INCORPORATE

  1. The object has the masked material assigned.
  2. View the material in the shader editor to see a node_group called "Mask_Splitter".
  3. Copy and paste this inside whatever material you wish to split out a color mask

UTILIZE

  1. Assign the Color output of your image mask to the Color_Mask input of the node group.
  2. Using a MixRGB node or Mix node (3.4+) to assign colors according to the mask map as needed.

General knowledge of Mix Nodes

The dropdown has different blend modes

Fac: This is the mixing factor of the blend. It works on a black-to-white scale from 0.00 to 1.00 by default or the data plugged into the Fac input. You can not use the 0-1 slider if an input is used.

Color1: Is the Base Color or Image Color2: This is the added color or image.

The color output is the result of the factor and the blend mode selected.

Breakdown of the Node Group

This group separates the primary colors used when creating a color mask by most of the industry into their own fac which can be used as you see fit when mixing your nodes.

Black / White / Red / Green / Blue / Cyan / Yellow / Magenta.

Node Breakdown: White = (R x G) x B) Black = (R x G) x B) [Con, Inv] -R)-G)-B) Red = (R-G)-B Green = (G-B)-R Blue = (B-R)-G Cyan = (R-G) x B Yellow = (G-B) x R Magenta = (B-R) x G

Con = Contrast/Brightness Node Inv = Invert Node

I then used a Con node at the end with a Contrast of 10 to ensure I have a clean mask when blending.