Why don't two 50% opacity layers of the same color make the solid color in Photoshop?

8

1

I am trying to create a gradient that when flipped and overlayed on itself will show a solid color.

I thought I would make it with a regular solid-to-transparent gradient on Photoshop, and save it as PNG, but when superimposed on one another, it still shows some transparency.

I tried to do it inside Photoshop and the same experiment with regular layers that had 50% opacity does not show the solid color (i.e. it does not "kill" the transparency).

What am I missing?

Osadezu

Posted 2011-12-01T04:55:28.080

Reputation: 85

for me using 61.8% made it so both end up being ~100%, .618 + .618*.618 = 0.99994254 – Muhammad Umer – 2017-06-27T18:43:42.357

Can you post an image to show what you're trying to do? – Andrew Vit – 2011-12-01T07:48:58.130

Answers

5

The opacity is a multiplier. Assume:

  • Layer 1 opacity = 50%
  • Layer 2 opacity = 50%
  • Layer 3 opacity = 50%

Net opacity = Layer1 + (Layer2 * Layer1) + (Layer3 * Layer2 * Layer1)

Or, 50% + 25% + 12.5%. You would mathematically never get to 100%.

Andrew Vit

Posted 2011-12-01T04:55:28.080

Reputation: 990

The related function is f(x) = 2^-x. As x approaches infinity, y approaches 0. So, in our case, the transparency would never cancel out (be zero). – iglvzx – 2011-12-01T08:35:38.887

4

The way I look at it, each layer lets 50% of the light through... you don't get 100% with it.

It's like the weatherman saying there's a 50% chance of rain on Saturday and on Sunday, and concluding that it must rain sometime during the weekend. Obviously it doesn't mean that. :-)

user541686

Posted 2011-12-01T04:55:28.080

Reputation: 21 330

3That sounds right. The first layer lets through 50% of the light. The second layer lets through 50% of remaining light. Result: 25% of the light gets through. (I'm not a Photoshop user, but if its layers emulate real-world physics, that's how I'd expect them to behave.) – Keith Thompson – 2011-12-01T05:10:57.363

Hey thanks, I think that's it. "50% of 50% is not 0".

So, any ideas how I might be able to create that gradient that flipped makes the solid color? – Osadezu – 2011-12-01T05:19:28.073

@Ozkar: I think I figured it out: Check out the Subtract "Mode" above the Layers tab. Make the upper layer subtract from the lower layer (which is normal), and you should be able to get something working after playing around with it. – user541686 – 2011-12-01T05:24:58.593

Mmmh... I'm on CS3, I can't find 'Subtract', I tried 'Difference' and 'Exclusion' and none seem to get me near there. :S (I want a pixel-perfect solution, because if I try to make it aprox, by looking at it I will mess it up hehe. – Osadezu – 2011-12-01T05:41:09.440

1Your weather example is misguided. If the two days were independent, the probability of rain for the weekend would be 25%. – iglvzx – 2011-12-01T08:13:11.627

1@iglvzx: Wait, what? I think you misunderstood. I meant that he can't conclude it must rain sometime during the weekend, not the entire weekend. I'll clarify it. – user541686 – 2011-12-01T08:56:20.813