Gradient area mask, little issue

Issue #176 closed
Paul Matthijsse created an issue

Hello, I tried the new gradient tool in the area masks and it works very well, so thank you Hombre!

I noticed a little thing though. Open a photo, activate the gradient tool in the area mask, set Highlights/Gain to the lowest value 0.010, then the upper part of the photo gets 100% black. Perhaps this is normal behavior. But when I set The Feather slider in the Area shapes box to 0, I see some artefacts around the black line, see screenshot.

Comments (7)

  1. Hombre

    Hi @Paul Matthijsse ,

    Are you referring to the Gradient shape’s feather slider or the Mask’s feather one ?

    I’ll try to reproduce when back home, but I don’t see how the gradient could produce this artefact : it creates the gradient you can see in yellow when showing the mask, nothing more.

  2. Paul Matthijsse reporter

    Hello @Hombre , I referred to the gradient’s feather slider on bottom of the Area shapes box. When I say Show mask, those artefacts are still visible.

    (But as I said, this is a very minor problem with some ‘extreme’ slider positions, they disappear when the feather slider is at 0.3 and higher).

  3. Hombre

    @Paul Matthijsse About the black area on the top (which is not entirely black here, it depend on the image, see below), if you disable the Shape mask entirely, then the whole image turns black because of Highlight/Gain = 0.01. We might argue that the transition in the shaded part is not linear, but this has probably to do with the Highlight/Gain algorithm which might not be linear (at least the mask is).

    Then the artifact if you set the gradient to zero, you are suppressing the gradient to create a sharp transition, so what did you expect ? 🙂 The rounding error of the float values is probably creating the dotted line. Rectangle and shapes are better suited for that, gradient are used to create gradient. I didn’t wanted arbitrarily limit the lower bound to something above zero, but using zero doesn’t make sense for this tool, so the error is due to a misuse.

    What I don’t get is why the black effect disappear if you set the Gradient’s Feather to 0 and a Mask Blurring to 1.2 (1.1 is working!). Mask’s feather doesn’t work well too. I’ll have a look into this tomorrow. This might be because the scale of those effect depends on the size of the object. But in this case, what size should be considered ? Any idea @agriggio ?

  4. Paul Matthijsse reporter

    Salut Hombre,

    “Then the artifact if you set the gradient to zero, you are suppressing the gradient to create a sharp transition, so what did you expect ? 🙂

    That’s why I wrote in my first post “Perhaps this is normal behavior.” 😉

    “I didn’t wanted arbitrarily limit the lower bound to something above zero, but using zero doesn’t make sense for this tool, so the error is due to a misuse.”

    Okay. But seen from an end user’s perspective, how can s/he know that a value of 0 is ‘misuse’? Otherwise said: users are dragging sliders to see what happens to a photo, even if they don’t understand exactly what all those sliders are doing (like me 🙂 ).

    About the black part disappearing: on the photo I use, setting Feather to 0 and the mask blur to 0.6 the black part disappears, at 0.5 and lower it’s there. Can’t help you with the why-part…

  5. agriggio repo owner

    what you see are rounding errors. The blur/feathering is done with a guided filter, which uses an integer radius. If it gets too small, it can be rounded to zero (when scaled to take into account the size of the preview)

  6. Hombre

    @Paul Matthijsse Creating a gradient with a feather value of 0 is more non sense than misuse, and it’s a WONTFIX for me because there’s no problem IMO.

    I’ll fix the missing min_feather and global_min_feather parameter problem this evening. I already had a look yesterday, but it crashed the application instead, not sure which function is the culprit.

  7. Log in to comment