Action to create Luminance Masks
-
bkh
- Beta Tester
- Beiträge: 3687
- Registriert: Do 26 Nov 2009 22:59
Action to create Luminance Masks
Here's an action to create a series of luminance masks (as described in http://www.goodlight.us/writing/luminos ... sks-5.html) for a given image layer. To use this action, unzip the action archive, then open the Actions panel in PL, choose "Merge …" from the context menu and open the .actions file.
The action creates a group of greyscale layers, each containing one of the masks. The easiest way to use one of these masks is to shift-click on the layer preview icon in the Layer panel. This mask will also be used if you subsequently create an adjustment layer.
Note that the action is not a literal translation of the quoted article – instead of intersecting (multiplying) a mask by itself, I'm applying a gamma correction, and instead of subtracting from white, I use "invert", but the results are the same.
Comments and suggestions are very welcome.
Cheers
Burkhard.
EDIT: added new version of action file (just very subtle differences in the midtone masks, but probably closer to the PS original)
The action creates a group of greyscale layers, each containing one of the masks. The easiest way to use one of these masks is to shift-click on the layer preview icon in the Layer panel. This mask will also be used if you subsequently create an adjustment layer.
Note that the action is not a literal translation of the quoted article – instead of intersecting (multiplying) a mask by itself, I'm applying a gamma correction, and instead of subtracting from white, I use "invert", but the results are the same.
Comments and suggestions are very welcome.
Cheers
Burkhard.
EDIT: added new version of action file (just very subtle differences in the midtone masks, but probably closer to the PS original)
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Zuletzt geändert von bkh am Do 19 Sep 2013 23:33, insgesamt 2-mal geändert.
-
Pjotr
- Mitglied
- Beiträge: 140
- Registriert: Sa 23 Mai 2009 22:17
Re: Action to create Luminance Masks
Nice Burkhard. But wheres the file? 
-
bkh
- Beta Tester
- Beiträge: 3687
- Registriert: Do 26 Nov 2009 22:59
Re: Action to create Luminance Masks
Oops. It's there now …Pjotr hat geschrieben:Nice Burkhard. But wheres the file?
-
J i m
- Mitglied
- Beiträge: 13
- Registriert: Fr 06 Jul 2012 13:38
Re: Action to create Luminance Masks
Many thanks Burkhard this is just what I have been trying to do in Photoline.
I have have just been working on a portrait of my Grandson and your script worked great.
Jim
I have have just been working on a portrait of my Grandson and your script worked great.
Jim
-
Dainis
- Mitglied
- Beiträge: 7
- Registriert: Mo 12 Aug 2013 10:20
Re: Action to create Luminance Masks
Thanks a lot, Burkhard for the explanation and actions!
Could you explain a little bit more, how exactly midtones masks are created? I tried to do this on my own using 'substract' blending mode, but failed to create symmetric mask.
Could you explain a little bit more, how exactly midtones masks are created? I tried to do this on my own using 'substract' blending mode, but failed to create symmetric mask.
In theory, practice does not deviate from theory, but in practice, it does.
-
bkh
- Beta Tester
- Beiträge: 3687
- Registriert: Do 26 Nov 2009 22:59
Re: Action to create Luminance Masks
The description says "start with the whole picture" and subtract the two masks. Translating this into layers, this means "white layer" in normal mode with the two masks on top in "subtract" mode. Since subtracting a layer from a white layer is the same as inverting the layer, you can also invert one of the masks, set it to normal mode, and put the other on top in "subtract" mode.Dainis hat geschrieben:Thanks a lot, Burkhard for the explanation and actions!
Could you explain a little bit more, how exactly midtones masks are created? I tried to do this on my own using 'substract' blending mode, but failed to create symmetric mask.
Probably, there is a slight mistake in the Luminance Masks tutorial – if you do this with the "Lights" and "Darks" masks, then you'll get a black "Basic Midtones" mask (this is clear if you note that the "Darks" mask is just the inverse of the "Lights" mask). My guess is that the author just intersected the two masks (or, in terms of layers, put one on top of the other in "multiply" mode) – I tried with his sample image and the result looks just like his mask.
Cheers
Burkhard.
-
Dainis
- Mitglied
- Beiträge: 7
- Registriert: Mo 12 Aug 2013 10:20
Re: Action to create Luminance Masks
Your method looks logical to me. However, it looks also that something else is going on under the hood in PS.
I have got a video tutorial set from Sean Bagshaw (not worth if you use luminosity masks in a daily work, but for beginner like me it is) and he demonstrates creation of "Basic Midtones" exactly in described way: select all -> subtract Lights mask -> subtract Darks mask. Knowing that he didn't get black mask I assume that PS does some additional stuff that isn't obvious...
Anyway, your actions work wonderful and now I have a plenty of things to experiment with
I have got a video tutorial set from Sean Bagshaw (not worth if you use luminosity masks in a daily work, but for beginner like me it is) and he demonstrates creation of "Basic Midtones" exactly in described way: select all -> subtract Lights mask -> subtract Darks mask. Knowing that he didn't get black mask I assume that PS does some additional stuff that isn't obvious...
Anyway, your actions work wonderful and now I have a plenty of things to experiment with
In theory, practice does not deviate from theory, but in practice, it does.
-
bkh
- Beta Tester
- Beiträge: 3687
- Registriert: Do 26 Nov 2009 22:59
Re: Action to create Luminance Masks
Thanks for your feedback – if "Basic Midtones" works like that in PS, then my guess is that "subtract" in PS does "multiply with inverse mask" insteaad of subtraction in the mathematical sense. In that case, the result is the same as in the PL macro.Dainis hat geschrieben:Your method looks logical to me. However, it looks also that something else is going on under the hood in PS.
I have got a video tutorial set from Sean Bagshaw (not worth if you use luminosity masks in a daily work, but for beginner like me it is) and he demonstrates creation of "Basic Midtones" exactly in described way: select all -> subtract Lights mask -> subtract Darks mask. Knowing that he didn't get black mask I assume that PS does some additional stuff that isn't obvious...
There'll be a slight difference in the other "Midtones" masks because I used the PL "subtract" for them. I'll see if I can modify the action to do exactly what PS seems to do.
EDIT: you'll find the modified action above. The midtone masks except "Basic" have changed, but the changes are very minor.
Cheers
Burkhard.
-
Martin Huber
- Entwickler

- Beiträge: 4298
- Registriert: Di 19 Nov 2002 15:49
Re: Action to create Luminance Masks
Every documentation I found says, that "subtract" simply performs a subtraction in the mathematical sense.bkh hat geschrieben:if "Basic Midtones" works like that in PS, then my guess is that "subtract" in PS does "multiply with inverse mask" insteaad of subtraction in the mathematical sense.
Martin
-
bkh
- Beta Tester
- Beiträge: 3687
- Registriert: Do 26 Nov 2009 22:59
Re: Action to create Luminance Masks
Maybe everybody just writes what seems obvious? There will be no difference between the two definitions at a given pixel if one of the masks is 0 or 1 at that pixel, so under normal circumstances, one wouldn't easily notice the difference.Martin Huber hat geschrieben: Every documentation I found says, that "subtract" simply performs a subtraction in the mathematical sense.
Perhaps somebody with access to PS can do a little experiment? Draw a greyscale gradient (horizontal or vertical) from black to white and create Darks, Lights and Basic Midtone masks as described in the tutorial above. Then just post the Darks, Lights and Basic Midtone masks here. If PS does "subtract", then "Basic Midtone" should be just black, if it's "multiply by inverse", then the result should look like this: If you get anything else, I'd be especially curious to see the mask layers.
Cheers
Burkhard.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
-
Martin Huber
- Entwickler

- Beiträge: 4298
- Registriert: Di 19 Nov 2002 15:49
Re: Action to create Luminance Masks
Well, the official documentation explicitly says, that it performs a subtraction and - with 8 and 16 bit - resulting values smaller than 0 will be clipped to 0. There's no need for clipping with a multiplication.bkh hat geschrieben:Maybe everybody just writes what seems obvious? There will be no difference between the two definitions at a given pixel if one of the masks is 0 or 1 at that pixel, so under normal circumstances, one wouldn't easily notice the difference.
Examples are always helpfulbkh hat geschrieben:Perhaps somebody with access to PS can do a little experiment? (…)
Martin
-
dlp0918
- Mitglied
- Beiträge: 2
- Registriert: Fr 17 Mai 2013 06:31
Re: Action to create Luminance Masks
Please be gentle, I'm a newb
Once the set of luminance masks has been created by the actions, how do you use one of the newly created mask layers to create selections on the actual image itself?
Explanation of need: I want create a selection containing an over-bright area in an image so that I can treat that area differently from the rest of the image when I invoke the ColorPerfect tool.
Thanks in advance.
- David P
Once the set of luminance masks has been created by the actions, how do you use one of the newly created mask layers to create selections on the actual image itself?
Explanation of need: I want create a selection containing an over-bright area in an image so that I can treat that area differently from the rest of the image when I invoke the ColorPerfect tool.
Thanks in advance.
- David P
-
bkh
- Beta Tester
- Beiträge: 3687
- Registriert: Do 26 Nov 2009 22:59
Re: Action to create Luminance Masks
Open the Layer Panel, then shift-click on the preview icon of the required mask layer.dlp0918 hat geschrieben:Once the set of luminance masks has been created by the actions, how do you use one of the newly created mask layers to create selections on the actual image itself?
Cheers
Burkhard.
-
dlp0918
- Mitglied
- Beiträge: 2
- Registriert: Fr 17 Mai 2013 06:31
Re: Action to create Luminance Masks
Thank you, Burkhard.
- David P
- David P
-
mk3media
- Mitglied
- Beiträge: 7
- Registriert: Mo 17 Sep 2012 16:35
Re: Action to create Luminance Masks
Works like a charm! Thanx Burkhard!!