Gimp-Forum.net
ofn-luminosity-masks - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP)
+--- Thread: ofn-luminosity-masks (/Thread-ofn-luminosity-masks)

Pages: 1 2 3


RE: ofn-luminosity-masks - Ofnuts - 11-16-2019

(11-16-2019, 11:09 PM)Krikor Wrote:
(11-16-2019, 06:14 PM)Ofnuts Wrote: Uploaded a new version. Added feature; define your own mask(s) in a side file. Enjoy.

Ofnuts,
But what if the curve also has points on other RGB channels?

The image shows the configuration of my curve. If I only use the values from line # 9 after Points 34, would it be enough for the mask to represent the curve?

The curve applies to a channel, so normally to a grayscale image with a single channel.

A possible technique
  • Create the "L" selection
  • In the channels list:
    • Add a channel, tick the "initialize from selection" (this works arounf the current bug on channels)
    • Select the channel and make it visible
    • Make sure the original L channel is not visible and not selected
  • In the image Window, start the Curves tool, it applies to the channel
  • Adjust the curve so that the parts you are interested in remain visible (the rest turns white)
  • Apply the curve and make a test



RE: ofn-luminosity-masks - Blighty - 11-17-2019

Thanks Ofnuts
I made a DDDD, useful for lifting shadows.
Very quick and easy (once I had read the docs on how to refresh the ini).


RE: ofn-luminosity-masks - Krikor - 11-17-2019

(11-16-2019, 11:59 PM)Ofnuts Wrote: The curve applies to a channel, so normally to a grayscale image with a single channel.

A possible technique
  • Create the "L" selection
  • In the channels list:
    • Add a channel, tick the "initialize from selection" (this works arounf the current bug on channels)
    • Select the channel and make it visible
    • Make sure the original L channel is not visible and not selected
  • In the image Window, start the Curves tool, it applies to the channel
  • Adjust the curve so that the parts you are interested in remain visible (the rest turns white)
  • Apply the curve and make a test

I followed the steps above, and ok, but give the same result I had already displayed at https://www.gimp-forum.net/Thread-ofn-luminosity-masks?pid=15576#pid15576

I was trying something impossible a priori.
I should know that masks and channels only work with the Value channel.  Blush
It took me a while to understand why my curve generates a mask that is virtually identical to the L-mask (PatDavid-Lights-L).

BTW I learned a lot of new things by following the steps above, Thx Ofnuts.


RE: ofn-luminosity-masks - Ofnuts - 11-19-2019

Small update, mostly to the documentation. Added a "Raw luminosity" mask (identical to L, but L could change later).

The doc explains how to create your mask and curve from the quickmask.


RE: ofn-luminosity-masks - Krikor - 11-19-2019

The script lets you use curves to create our own masks.
But ... would it be possible to create my own masks using the channels I created?
Is there a way to create curves of the desired channels?

Channels Created


RE: ofn-luminosity-masks - Ofnuts - 11-19-2019

Yes, but it's going to be a bit manual:

- Copy the channel to a layer, scale to 1000px wide
- Take out the pointer dialog, set one coilumn to RGB(%)
- Move your mouse across the layer see where the change points are (with the pointer dialog you can easily tell where/when you hit 0% or 100%.
- Divide x by 1000 to get the X coordinate, and by 100 any of the RGB value to get the Y coordinate, and add to the curve.


RE: ofn-luminosity-masks - Krikor - 11-19-2019

(11-19-2019, 05:40 PM)Ofnuts Wrote: Yes, but it's going to be a bit manual:

- Copy the channel to a layer, scale to 1000px wide
- Take out the pointer dialog, set one coilumn to RGB(%)
- Move your mouse across the layer see where the change points are (with the pointer dialog you can easily tell where/when you hit 0% or 100%.
- Divide x by 1000 to get the X coordinate, and by 100 any of the RGB value to get the Y coordinate, and add to the curve.

In Portuguese, we say "this is not my beach" when we are dealing with something that is unfamiliar to us. A bit like "A fish out of water".

But voilà my doubt.
To try to understand better, I used the coordinates of the existing DD and L masks.
DD = 0.00 1.00 0.50 0.00 1.00 0.00
L = 0.00 0.00 1.00 1.00

For the DD copy I found:
X = 0 at 0% at the extreme left point;
X = 500 at 0%;
X = 1000 by 100%
What I would create generating points 0.00 0.00 0.50 00 1.00 1.00 (but as seen above in bold is not the case)

For copy L I found:
x = 0 at 100% first point left;
x = 1000 at 0%.
I would then have: 0.00 1.00 1.00 0.00 (equally different from the expected 0.00 0.00 1.00 1.00).

What am I failing to understand?  Huh

Thx.


RE: ofn-luminosity-masks - Ofnuts - 11-19-2019

I think you are looking at them in the wrong direction.

  • The input is dark to light from left to right (like in Curves or Levels)
  • The output "whiteness" indicates selection: black is no selection, white is full selection.
So the dark masks are white on the left, and the light masks are white on the right.


RE: ofn-luminosity-masks - Krikor - 11-20-2019

(11-19-2019, 05:40 PM)Ofnuts Wrote: - Move your mouse across the layer see where the change points are (with the pointer dialog you can easily tell where/when you hit 0% or 100%.
- Divide x by 1000 to get the X coordinate, and by 100 any of the RGB value to get the Y coordinate, and add to the curve.

By following these steps, I was able to reproduce the points for the MMM channel.
But for L and DD channels (possibly for others too) it doesn't work.
The 1000x scaled image from the L channel to the points where X changes.

https://imgur.com/a/Kf5nTxv


RE: ofn-luminosity-masks - Ofnuts - 11-20-2019

What you are showing is not the L mask but the D mask. The L mask has the white on the right. See my previous answer.