How to use Diffuse maps to create mask?

So I’m creating a material with a diffuse map that I made in 3ds Max. For the primary colours, I’m dragging the respect channel out and using that as the mask. However, the diffuse map also contains a combination of the 2 primary colours (i.e. yellow and cyan) and I don’t know how to use these colours to create a mask.

It’s a fairly simple problem I just can’t think how to get round it.

Thanks in advance.

I’m not sure if it would work the way you want it to, but here’s what I would do.

In your material you take your RGB link and create a multiply. Then in the B input of the multiply I’d connect a Constant (1 key and click on the material editor window) with a value of 1 (white color). Then I’d plug the result into the opacity mask.
Basically, this will make anything that isn’t black turn into white, creating a mask. However, I see no reason why your texture wouldn’t have an alpha channel.

Sorry maybe I’m not being very clear. I’m using a diffuse map as a mask to mark out which parts of the mesh will have certain colours/materials applied to it.

As you can see below my diffuse map also has yellow, however as there is no ‘yellow’ channel, I don’t know how to isolate the parts of the map that contain the yellow colour. Red/green/blue is simple as there are dedicated channels, but it’s yellow (red/green) and cyan (blue/green) that I’m having a problem with.

Diffuse_Map_Problem.png

If you know the rgb values of the colors, you could probably do it using some If nodes.

For yellow, multiply RED and GREEN, only area with some red and some green will have values above zero. Then multiply, clamp and power resulting texture until you get mask you need

Great! I didn’t have to clamp or power as the multiply alone worked. Strange I’m sure I tried that before and got an error.

Here’s the final set up if anyone’s interested, I can now go on to creating the actual material.

Thanks.

6e46dff1ec6e03356bb70aba6e06eb684cbbec13.jpeg