6

OK, so here's what I am trying to achieve, I want to use the new non-destructive layer effects in GIMP 3.0 (it's a new feature) to add an adjustment to a layer, such as Colorize, or a Curves adjustment, etc. However, I also want to mask that adjustment so that it only affects one part of the image like the sky for example.

Now, in Photoshop, this would be pretty simple. I could just add a layer mask to the layer effect/adjustment layer. But in GIMP the layer effect is attached to the image layer itself, not as a separate layer which can be masked.

See example below. Here's what it looks like in GIMP when you add a curves adjustment. It shows up as fx beside the layer, and you can click the fx, and then double click on the Curves, and it brings the Curves adjustment back up so you can edit the curve. This is a great improvement to GIMP, but there doesn't seem to be an option to add a mask to the effect here.

enter image description hereclick to see larger

I can add a mask to the layer, but this doesn't limit the effect, it only adds the mask to the image on the layer itself.

I am aware I could duplicate the layer, and add the adjustment to the new layer above, and just use a normal layer mask on it since the layer effect doesn't apply to the layer below, but I feel this kind of defeats the purpose of having non-destructive layer effects. I'd really rather not have two copies of the image like this. Does anyone know how to do this? Am I missing something obvious, or is there a hack or other method to mask the layer effect?

2 Answers 2

5

As far as I can tell, the selection that was active when the filter is applied becomes a mask for the layer. Demonstration:

  • Create a plasma (and merge it...)
  • Make a selection
  • Apply (unmerged) Brightness-Contrast

Initial

  • Remove the selection (Select > None)
  • Click the fx icon and tweak the B-C filter
  • Only the part in the original selection is affected by the changes

Tweaked

If instead of "no selection" you make a new selection, you get a strange display (bug?) but in the end the only part that is changed is the original selection.

So the selection appears to be embedded as a mask in the filter. Now of course if you want to edit that mask, you may have to wait a couple of releases.

6
  • Shit! That works!! Thanks so much. However, now I am going to ask the obvious follow up question, where is the mask located, and can it be edited? Oops - I see you edited while I was commenting. Commented Apr 22 at 23:55
  • See my augmented answer (must have been reading your mind because I did my edit before seeing your message)..) Commented Apr 22 at 23:56
  • Yeah I see it now LOL. Commented Apr 22 at 23:57
  • I found another way to do this, that allows for an editable mask. I've added it as an answer to my own question! Commented Apr 23 at 7:24
  • Now I don't know which answer to accept. Yours seems to be the canonical way to do it, but lacks the layer mask editability and the one I found on youbue is more like a hack. Also I don't really want to accept my own answer. Commented Apr 25 at 12:01
5

I have found another way to do this after googling a bit more. I eventually came across a youtube tutorial by PIX Cores. Worst thing is I had actually seen this video before but didn't pay full attention to it at the time. I thought it was just about the new layer effects feature.

Anyway, this is certainly NOT an obvious process, more of a hack than a built-in feature. This is an alternative to @xenoids excellent answer, but here the mask is fully editable.

  1. Create a group with a single transparent layer within it, and set the group blending mode to "Pass through"

  2. Add an effect to the group, this can be a GEGL filter or an image adjustment. Not all of them work non-destructively, but most of the important ones do

  3. Add a layer mask to the group

  4. Edit the mask by selecting it in the layers panel, and paint on it, or make a selection and fill it

  5. It's possible to go back into the fx and tweak the adjustment as required

Like in Photoshop, an adjustment layer set up like this affects all of the layers below it, which is also a nice bonus. I also note you can add more than just one adjustment to the layer, which I also kind of like. Nice!

Here's an example screenshot showing the arrangement of the layers, and a mask applied to the group to target only the sky in this photo.

Screenshot of GIMPclick to see larger

2
  • Very clever!!!! Commented Apr 23 at 7:43
  • @xenoid - it is indeed. Too clever for me to come up with, that's for sure! Commented Apr 23 at 7:47

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.