How to mask a single color?
Correct me if I am wrong, but as far as I know, there's no simple workaround for this. You can however open any photo editor, select the pink area, and save that selection as an Alpha channel. This way you can recolour that part with any kind of color/texture.
If anyone is still following, I know it's been a long time, but on the forums a user named Christian Ronchi (www.chricchio.com) shared an amazing Material Function to get a mask of a single color in the material. I've added a tiny bit to the function, namely just the Input (Sensitivity).
The IFs are rather easy but can be annoying:
A input is always the MASK(R/G/B). B input is always the Input(Sensitivity) and Scalar (1) is always "A > B", while Scalar (0) goes to the rest of the inputs. Adding a Sensitivity Input helps a lot, because in the main material, you can add a Scalar Parameter, and you can adjust the sensitivity of the color check in a Material Instance.
The usage is fairly easy. Just add a MaterialFunctionCall to your materal, and specify this function in the details panel in your material. Then you can add a color, a sensitivity, and a texture to cut from. The result of the function will be a black-white mask (only your colors) or if you use "1-x" then the colors cut and rest kept, as you can see on the screen here.
Have fun and good luck!
answered Apr 27 '17 at 05:09 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here