Opacity Mask in Materials using a white or non-black mask

Hello, apologies if this has been answered, but I spent about 2 hours searching and could not find anything that addressed this question. I am fairly new to UE4 and learning fast, but have a lot of ignorance still.

I am trying to create a material that would have the option of allowing a logo to overlay an area of the texture. I have it all working, except that the area I want to overlay is white, and I want to use a black logo overlay. As a test, I basically made a black background TGA file with the logo in red, then used a Multiply with a constant (to allow it to be varied from 0 “off” to 1.0 full) and then run into a LERP on the alpha channel, and then into the base color node. I also tried this without the LERP and just running the multiply into the Opacity Mask, and it looks exactly the same, so either method seems to work. I just can’t find any info about how (or even if) its possible to mask any color other than black for the alpha/masking. I want to be able to have the logo/overlay be all black.

I’m open to other methods than this one, but I would prefer for now to keep it simple (if possible) and within the material itself. I eventually want to try to move some of these to a material function as well, but for now I’m just trying to learn as much as I can and understand how things like this can be accomplished. Thank you.

You actually want a grayscaled version of that texture (just use the red channel) and plug that into the alpha. then plug the full channel into B of the lerp.

that should do it :slight_smile:
If you want the logo to be black, then it should be black instead of red ofcourse.

Thank you for the fast reply! Could you be a little more explicit about how to set up the texture? Are you saying I would prepare the logo texture as a black logo on a white background? I tried doing that and plugging the red channel of this into the alpha, leaving the rest of the nodes as you see them above, and it just tinted the entire material white. I saved the file as a TGA and as a grayscale JPG, came out the same each way. Also should I be setting up my TGA files as 32 bit with the Alpha channel as well? I cant make the red logo black in the existing texture, or I will have black-on-black and it wont show (already tried this with a slightly-less black (RGB=5,5,5) for the logo, but it must have fell within the threshold so it masked out)