Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
mutually exclusive layer masks
#5
(06-11-2021, 12:09 PM)Ofnuts Wrote: The opacity of layers is not additive. If you want the result to be fully opaque at least one of the layers has to be fully opaque too. So if you make an opaque layer non-opaque, which one of the other layers has to become opaque?

Thanks Ofnuts

I guess an implementation of what I want would first create a "Result layer".

I then create say 5 layers - in my case of the same image but with different artistic effects ( or different settings of the same artistic effect ).


Each pixel in the Result layer might start off initially being 100% of the corresponding pixel in layer 1 - we have to start somewhere so I choose layer 1. 

I then paint strokes on the mask for (say) layer 2 at a strength value of 0.2 for each stroke then instead of changing the layer that the mask belongs to the action instead would be to change pixels in the Result layer with a weighted calculation for instance for the pixel at X = 1, Y = 1, if the stroke passes over it then....

RGB Result pixel ( 1,1 ) = RGB Existing Result Layer pixel ( 1,1 ) * 0.8 + RGB Layer 2 pixel( 1,1 ) * 0.2

The result pixel has to be recalculated every stroke so that the effects are accumulative in the Result layer.
 
So every time I stroke on the mask for layer 2 the Result layer in that area progresses increasingly towards being the same as layer 2 in that area.

If I now change my mind and turn to layer 3 then I can use repeated strokes on layer 3 to now make the same area in the Result layer move increasingly towards layer 3.

This way I don't have to go back and repair masks when I change my mind in a particular area, I just proceed to overwrite that area with a weighted contribution from the layer I have selected instead.

In way there is no real requirement for mask functionality if a way could be found to allow a paint tool to pass over a layer and without altering that layer record which pixels were passed over and to calculate the effect of their weighted average on the Result layer

In a sense I want to paint but with brushes that correspond to the whole image modified by various filters and to incrementally blend those different versions of the same image by the act of painting operations - repeating strokes to get a stronger effect.

I think this could be a very useful capability - there are some very useful filters which work on the whole image and do not work directly as brushes so my way of thinking is to make up as many layers as I have filter variations in mind and then to bleed through contributions progressively. The chief advantage is that I do not have to work out which mask it is that I need to repair to change something I did earlier that I regret - I can move forwards all the time simply overwriting areas I am not happy with until it turns out right.

If anyone has pointers in terms of the best way to implement this I would be grateful- I am an experienced coder but no real experience in writing plugins or scriptfu for gimp.
Reply


Messages In This Thread
mutually exclusive layer masks - by jonnie45 - 06-10-2021, 11:37 AM
RE: mutually exclusive layer masks - by Ofnuts - 06-10-2021, 12:52 PM
RE: mutually exclusive layer masks - by jonnie45 - 06-11-2021, 09:12 AM
RE: mutually exclusive layer masks - by Ofnuts - 06-11-2021, 12:09 PM
RE: mutually exclusive layer masks - by jonnie45 - 06-11-2021, 05:55 PM

Forum Jump: