First time poster, long time lurker here.
I'm using a script in a vector drawing program that separates color fields into greyscale bitmaps, that can then be interpreted as areas with different shaders in a Blender material. These shaders can be metal, glitter, flip flop paint, so just using a texture doesn't work. I'm dealing with 1000s of designs, each needing different shaders from a limited but huge set. Automation to the rescue!
I've neatly lined up all the nodes, so the data can flow without obstruction, but I've run into a problem:
Every design only utilizes a few of the total amount of defined shaders, so at the moment I need to generate fully black 2x2 pixel textures for the unused shaders, otherwise the missing texture gets interpreted as being mid-grey all over.
Is there a more elegant solution to handle this problem procedurally, from within the nodes system? That way I can render Blender's output from the command line without having to edit every single node tree by hand, or generate about 50 bitmaps for each design (instead of only the ones actually used).
Thanks in advance, Ron
The image below the result of CreeDorofl's offered solution.
This trick just moves the problem one node further upstream, but when I use "linear light" instead of "add" mode it almost works. Almost, because it shrinks the shader area - it seems to influence the way the mask is interpreted, and when using a blurred texture, it becomes clear that it chops of the darker tones, turning them all black.
Zooming in shows the way it shrinks the green shader area, and it means I can't use gradients in the mask.
[