I have layer with a Ferrari placed on top of a layer with a tree.
Is there a way to let pixels of the tree pass through the corresponding pixels of the Ferrari, depending on the tree's pixels luminosity?
For example, if pixels of the tree are very close to black (as shown in the GIF), delete the corresponding pixels on the Ferrari layer, so that the pixels from the tree will be visible in the final picture.
Animated GIF showing the effect:
Note that I'm not looking for Multiply or Overlay, etc. The effect I'm trying to achieve is to set the transparency of the pixels of a layer (the Ferrari), according to the luminosity of the corresponding pixels on the layers below (the Tree).
To be clear enough I repeat: "layers below". I'm not interested in adding the tree image layer to the layer mask of the Ferrari layer, because the transparency should be based on the total luminosity of all layers below the Ferrari layer and there are several of them.
This is pretty much like Layer style's blending options with "underlying layer", but that only works with on/off pixels. Instead, transparency of a pixel might be partial, as shown in the GIF.
Thank you in advance.