Need node setup to make color as alpha

Hi,

is there any way to create some node setup to make a color become alpha?
Lets say I have an image texture where some parts are red, some parts are green.
Now I want to make the red parts (only) become transparent (alpha) as input / factor for other nodes?
I need this with any color, but the color I want to specify by e.g. one color input of a mix node.

Hope it is clear what I mean.

Thanks!

Take a look at the SeparateRGB node, and some of the other Separate nodes. One of them should be able to get you pretty close. And use a ColorRamp node to adjust the contrast.

Hi hype,

thanks for reply, but I need it for all colors not only red, green, blue.
I mean I want to select any color by color picker and make it alpha.
Sorry if that was not clear.

It would also help if I can make black or white parts as alpha.
But if I can do it with any color this would be great.

Thanks again!

Try a Keying node. Pick which ever color you like, then work with it using the ColorRamp node.

There’s many, many ways to get alphas from images. A lot of the ways will also involve rotoscoping.


are you talking about cycles node tree work, or are you talking about compositor image work?

I assumed he was talking about compositing, as we’re in the compositing section. :wink:

I know, but it said ‘image texture’ which made me think cycles materials… just making sure

Hello,

sorry I mean in compositor