This node setup use a colorfull texture as input and replace the mapped colors with materials.
This has some advantages because unlike stacked stencil textures you can edit the material assignment in one single image.
I use this because even if i can brush and draw arround in blender i cannot draw different maps (diffuse, specular) on the same stroke.
With this approach i just draw with a color and replace them later with a complex material.
Also creating texture patterns in vector programms becomes pretty easy
because of the simplification to simple colors.
Feel free to use and tweak it.
Maybe someone has a better example texture to share.
I'm going to look into it. I looks very interesting. Thanks, bitterulf. Great job.