PDA

View Full Version : Transparency in a multi-layer context


PulkownikSwiatlo
December 6th, 2006, 02:53 AM
Hi,
I have a question: if we have three normal layers: top, middle and bottom, and the top and middle layers have their opacities set to 50%, then is the following statement true:
- the top 50% opacity is applied to the combined layer of middle layer with the bottom layer, so in the final image the contribution of the top layer is 50%, while the contributions of middle and bottom are 25% each?

TonyW
December 6th, 2006, 06:28 AM
I think that would true. If you make 3 layers - pure red, pure green and pure blue, set the green and blue layers to 50% opacity and then sample the top blue layer you get B 128 G 63 R 64 . So the contribution is 50%, 25%, 25%.

Interesting question :)

Tony

Byron Gale
December 6th, 2006, 11:44 AM
Tony,

Good thinking as to how to test this!!

I tried it, and added a 4th layer filled with black to the top of the stack. Set this to 50% opacity and the RGB values go to 31, 32, 64.

I concur with your results.

Byron

PulkownikSwiatlo
December 6th, 2006, 04:33 PM
Tony,

Good thinking as to how to test this!!

I tried it, and added a 4th layer filled with black to the top of the stack. Set this to 50% opacity and the RGB values go to 31, 32, 64.

I concur with your results.

Byron

This thinking can applied to n-layers. If we stack up n-layers and want equal contribution of each, then their opacities should be as follows (going up from the bottom):
1st: the bottom opacity = 100%
2nd: the next up = 50%
3rd: the next up = 33%
...
n-th: opacity = 100/n