Make transparent rain layer to use as overlay

I have followed this tutorial to make a rain
le link
and it works ok with a picture in it, using that blend mode Screen, but I want to make that rain layer to not have black background, and have the rain, so I can use it as an overlay in programming. Any idea how can I do it?

Answer

You could change all of the black to transparency as is answered here

Or a possible alternative since you are programming (depending on what you are programming of course) could be to program the behavior that the screen blend mode enforces;

From Wikipedia;

With Screen blend mode the values of the pixels in the two layers are inverted, multiplied, and then inverted again. This yields the opposite effect to multiply. The result is a brighter picture.

f(a,b) = 1 – (1 – a)(1 – b), where a is the base layer value and b is the top layer value.

This mode is symmetric: exchanging two layers does not change the result. If one layer contains a homogeneous gray, Screen blend mode is equivalent to using this gray value as opacity when doing “normal mode” blend with white top layer.

Best of luck!

Attribution
Source : Link , Question Author : Sartheris Stormhammer , Answer Author : Community

Leave a Comment