Cycles - Is there a way to make mask semi-transparent?

Hello. I know that masks in Cycles are black and whitea and they do not provide alpha info for shader.
But what if i want my mask to be slightly transparent, so that i can see greenish tint under red bands. Is there a way to create semi-transparent mask?

Here is *.blend filetranspatent-mask-question.blend (469 KB)

Attachments


What you want is a mix of two colors. To get a mix, the factor value must be not black (0.0) or white (1.0) but some value between 0.0 and 1.0, that looks gray. You can do that by lifting the blacks or lowering the whites on the image that goes to Fac input. Use a ColorRamp or Curves or Math nodes or whatever method you find fit.

There is nothing mystical in what a mask does, a mask gives a value for each pixel that tells the Mix (or any other node), how much does one (bottom? I always forget the order in Blender) input contribute to the result.

many thanks kesonmis

Here is node setup as i understand it.
With Math node
[ATTACH=CONFIG]443211[/ATTACH]

with ColorRamp (I set up 0 as dark gray and 1 as light gray)
[ATTACH=CONFIG]443212[/ATTACH]

Result
[ATTACH=CONFIG]443213[/ATTACH]

*.blend file transpatent-mask-question.blend (473 KB)