It is currently Thu Apr 18, 2024 11:19 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 57 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Luminosity Masks script
PostPosted: Wed Jun 04, 2014 1:49 am  (#1) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
Following this Luminosity Masks tutorial
This script will create a desaturated layer(luminosity), create all the 9 channels talked about L,LL,LLL,D,DD,DDD,M,MM,MMM (in tutorial)
and make 9 copies of your active layer and add above channels as layer masks and set the appropriate layer names to represent above channels. Then deletes the desaturated layer all 9 created channels once layers are created.

You're left with extra 9 layers to play with (defaulted to invisible, you'll have to play with them to manipulate your photo also move the layers around too depending on which layers you want to see)

here's the script (tested on GIMP 2.8.10 and GIMP 2.6.12) (will be available under Script-Fu -> Create New -> Luminosity Masks)

Download From GIMP Scripts


afterwards you'll have 9 layers on top of your original like below
Image

It wasn't mentioned in the tutorial, because if you intersect LL and DD or intersect LLL and DDD you get nothing.
But according to saulgoode's script (to generate channels)
MM is created by inverting LL channel then subtracting DD
MMM is created by inverting LLL channel then subtracting DDD.
So now this script does that.

_________________
TinT


Last edited by trandoductin on Wed Jun 04, 2014 11:53 am, edited 2 times in total.

Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Luminosity Masks script
PostPosted: Wed Jun 04, 2014 3:59 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 1389
Location: FInland
Saulgoode´s does not produce black masks.

http://chiselapp.com/user/saulgoode/rep ... 99c37cda66


Top
 Post subject: Re: Luminosity Masks script
PostPosted: Wed Jun 04, 2014 4:10 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
thanks, Tin
not only because you are a very productive script-writer, but also because you moved from text to photo enhancement
here in gimpchat we have thousands of posts related to text and text creating/manipulating scripts, but very few concerning photo manipulation (in this comment I don't consider gmic, which has a lot of filter for photo manipulation)
just a little note
i tried your script with one of my (dark) photos, but it seems to me that -to get the effect- I have not only to click on the eye (set visible), but also to change the mode to screen
if this is true also for you, maybe this mode can be set as default for all created layers
but maybe I'm doing something wrong/incomplete

_________________
"Where am I ?"


Top
 Post subject: Re: Luminosity Masks script
PostPosted: Wed Jun 04, 2014 5:14 am  (#4) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
I had written a luminosity mask script based upon Mr Kuyper's tutorial (as described by teaking on the Meet The Gimp forums) and it produces a different result for the midtone masks. Note: the command for my script appears as "Filters->Generic->Luminosity Masks (saulgoode)" and the masks that are created will be found in the Channels dialog.

:ninja by Nidhogg


Attachments:
luminosity-masks.jpg
luminosity-masks.jpg [ 51.81 KiB | Viewed 6086 times ]

_________________
Any sufficiently primitive technology is indistinguishable from a rock.
Top
 Post subject: Re: Luminosity Masks script
PostPosted: Wed Jun 04, 2014 12:04 pm  (#5) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
Saulgoode,
Thank you!
It didn't mentioned exactly how to produce MM and MMM in the tutorial i followed. So I assume it was intersection of LL and DD and intersection of LLL and DDD.
After trying your script and happy with the channels created. I read the script and found that you got MM by inverting LL and subtracting DD and similarly for MMM.
So i have changed my script to do the same to get results for MM and MMM layers.
Thank you again.


Dinasset,
in the tutorial i didn't see anything about screen mode, it just said to play around with layers and it suggested things like try unsharp mask on one of the D layers (this was awesome it seemed to bring definition in the Dark areas). Thanks for trying my script. You might want to try the latest version since it does create MM MMM like Saulgoode's script.

Nidhogg,
Thank you for bring the script to my attention, the latest version has MM and MMM like Saulgoode's script's channels.

Gimp chat members,
I'd love to see some photo manipulation showing original and manipulated versions.

_________________
TinT


Top
 Post subject: Re: Luminosity Masks script
PostPosted: Wed Jun 04, 2014 12:43 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Tin,
downloaded the new version. My comment is still valid.
To let you understand what I meant, I attach here my test image (xcf zipped)
Load it and do the following:
1 - choose one of the created layer and set to "visible"; what do you see different? me nothing
2 - on the same "visible" layer set the mode to "screen"; what do you see different? it depends from the chosen layer, but you certainly will see some difference, as I do.
Let me know....

Attachment:
my-test-image.7z [3.51 MiB]
Downloaded 234 times

_________________
"Where am I ?"


Top
 Post subject: Re: Luminosity Masks script
PostPosted: Wed Jun 04, 2014 12:52 pm  (#7) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
dinasset wrote:
Tin,
downloaded the new version. My comment is still valid.
To let you understand what I meant, I attach here my test image (xcf zipped)
Load it and do the following:
1 - choose one of the created layer and set to "visible"; what do you see different? me nothing
2 - on the same "visible" layer set the mode to "screen"; what do you see different? it depends from the chosen layer, but you certainly will see some difference, as I do.
Let me know....

Attachment:
my-test-image.7z

I guess that's part of the manipulation/play process. As you might want to do something else like colorize or bump up contrast instead of screen mode. I don't want to surprise the user with a default screen mode since someone else might want to do something else with their masked layers. I searched for screen on the tutorial and it said nothing about screen it just suggests that you play. I only wanted to automate the manual process of getting these layers in place and not interfere with the user's play process.

_________________
TinT


Top
 Post subject: Re: Luminosity Masks script
PostPosted: Wed Jun 04, 2014 1:16 pm  (#8) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Tin,
try with the saulgoode script, there if you set visible a mask (it's not a layer, I know), you see the result immediately.
What I was trying to tell you is that by simply put visibility on, you SHOULD get something, in my opinion. Then you can proceed with other manipulations at your choice...
It is something similar to preparing a script that -with the default parameters- does nothing; there are some, I don't like those; either I remove them or I change them by myself, if I'm interested in.
That's my opinion.
Obviously is up to you ...

_________________
"Where am I ?"


Top
 Post subject: Re: Luminosity Masks script
PostPosted: Wed Jun 04, 2014 1:27 pm  (#9) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
dinasset wrote:
Tin,
try with the saulgoode script, there if you set visible a mask (it's not a layer, I know), you see the result immediately.
What I was trying to tell you is that by simply put visibility on, you SHOULD get something, in my opinion. Then you can proceed with other manipulations at your choice...
It is something similar to preparing a script that -with the default parameters- does nothing; there are some, I don't like those; either I remove them or I change them by myself, if I'm interested in.
That's my opinion.
Obviously is up to you ...


You can change it to your liking if you like or just delete it. With the channels, if you set channel visible it alters the image yes, but they're meant to be used as masks according to the tutorial.
If i set it screen mode, it will make you happy but it'll surprise those who followed the tutorial.

I guess my main point is why default to screen mode? there are tons of other modes to choose from. That's why I want to leave it up to the user to manipulated the layers. The script only removes the manually labor of creating these layers with masks.

_________________
TinT


Top
 Post subject: Re: Luminosity Masks script
PostPosted: Wed Jun 04, 2014 3:13 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: Jan 10, 2013
Posts: 863
trandoductin wrote:
Gimp chat members, I'd love to see some photo manipulation showing original and manipulated versions.

Image
Image
Tim & saulgoode :tyspin

_________________
bbbbbbbbbbbImage
bbbbbbbbbbb Be patient, English is not my language.


Top
 Post subject: Re: Luminosity Masks script
PostPosted: Wed Jun 04, 2014 5:11 pm  (#11) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
Akros wrote:
trandoductin wrote:
Gimp chat members, I'd love to see some photo manipulation showing original and manipulated versions.

Image
Image
Tim & saulgoode :tyspin

I like it, changed lighting on a looks more like mid day but with shadows that are later in the day. Nice

_________________
TinT


Top
 Post subject: Re: Luminosity Masks script
PostPosted: Thu Jun 05, 2014 4:58 am  (#12) 
Offline
GimpChat Member
User avatar

Joined: Jan 10, 2013
Posts: 863
Tim , I really liked this tool , and this was my first experiment with it .
To work with the tones of images separately is one of my old desires .
In this example i sent, the contrast was focused differently to the light tones (LLL), medium (MMM) and dark (DDD).
So I could get something close to what you try to achieve with HDR without having to manually select areas for touch ups . The masks did it for me.

I'll be testing and learn to make better use of this filter , and I think it will be one of the most used in my picture edits .

As for the suggestion of Dinasset , I have not used the mode screen . Although depending on the desired result may be an option. But I prefer the script as is , and would rather go editing and adjusting as the need is required for each image and sought result.

Another breakthrough is the script indicated by Odin:
("Zone System Separator might be worth a look. This script creates layer masks based on the Zone system (eleven tonal ranges) photography technique by Ansel Adams and Fred R. Archer.") in #21
But the use of this script is less intuitive , and might get you scripters a new version with more features .
Thanks a lot

_________________
bbbbbbbbbbbImage
bbbbbbbbbbb Be patient, English is not my language.


Top
 Post subject: Re: Luminosity Masks script
PostPosted: Thu Jun 05, 2014 12:08 pm  (#13) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
Thanks for mentioning Zone System Separator.
I decided to have a play with it.

original
Image

after playing by colorizing each of the 11 zones
Image

The Zone System Separator is cool but it's a little different it does hard selections and is not self feathering. Must be useful for black and white manipulation.

here's playing by colorizing luminosity masks
Image

_________________
TinT


Top
 Post subject: Re: Luminosity Masks script
PostPosted: Thu Jun 05, 2014 6:14 pm  (#14) 
Offline
Global Moderator
User avatar

Joined: Nov 16, 2011
Posts: 5128
Location: Metro Vancouver, BC
trandoductin wrote:
Thanks for mentioning Zone System Separator.
I decided to have a play with it.
...The Zone System Separator is cool but it's a little different it does hard selections and is not self feathering. Must be useful for black and white manipulation.
From the author's comments at the Registry they are open to improvements.
Any hints to make this script better are highly appreciated.
Maybe you can adapt the code? :bigthup
...and for a feathered edge there is always, Mask to Selection | Feather Selection.

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: Luminosity Masks script
PostPosted: Thu Jun 05, 2014 7:55 pm  (#15) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
I have an altered the code of the original "Zone System Separator"
and called it "Incremental Zone System Separator" available under Script-Fu -> Create New
It uses levels instead of threshold, creates a much smoother mask.
But it is called incremental because Zone 10 actually includes Zone 0 incrementally upto Zone 9 but because of the layer ordering, smaller zones block themselves out so the true Zone 10 is actually revealed (look at the masks and you'll see what i mean)

So here's the script if someone wants to try it
found here --> http://gimpchat.com/viewtopic.php?f=9&t=10470&start=20#p138358

Here's a sample of agressive colorizations to show that it's has much smoother masks (see the clouds, no harsh transitions)
Attachment:
incremental_zone_separator.jpg
incremental_zone_separator.jpg [ 579.09 KiB | Viewed 1699 times ]

_________________
TinT


Last edited by trandoductin on Fri Jun 06, 2014 4:43 pm, edited 2 times in total.

Top
 Post subject: Re: Luminosity Masks script
PostPosted: Thu Jun 05, 2014 11:52 pm  (#16) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
another play with luminosity masks
original
Image
play
Image

_________________
TinT


Top
 Post subject: Re: Luminosity Masks script
PostPosted: Fri Jun 06, 2014 12:29 am  (#17) 
Offline
Global Moderator
User avatar

Joined: Nov 16, 2011
Posts: 5128
Location: Metro Vancouver, BC
I like your second go.
Thanks for the script I'll try it tomorrow.
I'm watching the good news from Moncton, N.B. :bigthup

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: Luminosity Masks script
PostPosted: Fri Jun 06, 2014 8:49 am  (#18) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 12643
Location: Spain, Aragón
Firstly, thank you to you all for making this subject so interesting. Thanks for your scripts. But to honest. I want to learn from the very start. step by step. Where do you think I should start to learn about layers and mask to improve photos?
Thanks in advance. :tyspin

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.


Top
 Post subject: Re: Luminosity Masks script
PostPosted: Fri Jun 06, 2014 11:38 am  (#19) 
Offline
Global Moderator
User avatar

Joined: Nov 16, 2011
Posts: 5128
Location: Metro Vancouver, BC
These two should help.
Getting Around in GIMP - Luminosity Masks
Getting Around in GIMP - Luminosity Masks Revisited

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: Luminosity Masks script
PostPosted: Fri Jun 06, 2014 12:12 pm  (#20) 
Offline
GimpChat Member

Joined: Aug 30, 2013
Posts: 63
Thanks for the incremental zone script. It installed smoothly and it runs fast. :yes Here's a quick play with curves and saturation, mostly on the midtone layers. I think it will be interesting to try various tone-mapping and local contrast adjustments. Original:
Image
And edited:
Image


Top
Post new topic Reply to topic  [ 57 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) My latest Luminosity Masks script

1

No new posts Attachment(s) ofn-luminosity-masks

8

No new posts Attachment(s) New Luminosity Masks Scripts

6

No new posts Attachment(s) Alternative Luminosity Mask Script

6

No new posts Attachment(s) Yet another luminosity mask plug-in!

3



* Login  



Powered by phpBB3 © phpBB Group