What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Reverse Engineering: Layer 1 + Layer X = Layer 3 ; Find Layer X


The algebra is simple:

Layer3 = Layer1*(1-O) + Layer2*O, where O - opacity of Layer2(in 0 -1 range)

So if you know the Layer2 value, then you can restore Layer2 opacity:
O = (Layer3 - Layer1)/(Layer2 - Layer1)
If you know the Layer2 opacity, then you can restore Layer2 color:
Layer2 = (Layer3 - Layer1*(1-O))/O

Otherwise you are stuck with indefiniteness. For example:
Layer1 - white
Layer2 - black at 50% opacity
Layer3 - 50% gray

at the same time:

Layer1 - white
Layer2 - 50% gray at 100% opacity
Layer3 - 50% gray

and there are lots more of other variants:cheesygrin:

In your case you have four unknowns: O and Layer2 R,G,B. Just make simple equation system and solve it.
 
Last edited:

Back
Top