Jump to content
You must now use your email address to sign in [click for more info] ×

dmstraker

Members
  • Posts

    825
  • Joined

  • Last visited

Posts posted by dmstraker

  1. I'm slightly confused. Sorry, normal state. Nevertheless hugely enjoying the exploration and learning.

    So blend modes use Hue, Chroma, Luma, as per https://en.wikipedia.org/wiki/Blend_modes#Hue,_saturation_and_luminosity

    I'm guessing other HSL controls are done as Hue, Saturation and Luminosity/lightness using https://en.wikipedia.org/wiki/HSL_and_HSV#Color_conversion_formulae

    So is the question about confusion when one meets the other?

     

     

     

  2. 7 hours ago, NotMyFault said:

    Yes and no.

    When you use a fill layer where you can adjust all HSL parameters individually, the blend result is influenced by the top layers

    H: no (expected)

    S: yes (expect)

    L: yes (unexpected!)

    The remaining open detail: how is the L (which should only depend on values from below layers !) influenced by the top layer.

    I'm not quite with you. Could you give a little more detail/example?

  3. 5 hours ago, anon2 said:

     

    It makes sense when you consider that saturation and chroma are not the same thing, and that lightness and luma are not the same thing. There are plenty of resources for learning about various colour models.

    I've found that indeed this is true and there's no 'one right way' to calculate sat/chr and lum/lig/bri, though in certain situations one may be more helpful than another. It does help to understand what is being used where. Without giving away IP, it would be helpful to have a manual for all this, though I do appreciate that (a) this would be a bunch of work, and (b) there aren't too many of us technically curious folk out there.  Until then I'm very grateful for the learning I glean from this fascinating forum.

    So Thanks.

     

  4. ...the Wiki HSL/HSV page quotes luma calc as:

    {\displaystyle Y'_{\text{601}}=0.2989\cdot R+0.5870\cdot G+0.1140\cdot B} (SDTV)
    Y240′=0.212⋅R+0.701⋅G+0.087⋅B{\displaystyle Y'_{\text{240}}=0.212\cdot R+0.701\cdot G+0.087\cdot B}{\displaystyle Y'_{\text{240}}=0.212\cdot R+0.701\cdot G+0.087\cdot B} (Adobe)
    Y709′=0.2126⋅R+0.7152⋅G+0.0722⋅B{\displaystyle Y'_{\text{709}}=0.2126\cdot R+0.7152\cdot G+0.0722\cdot B}{\displaystyle Y'_{\text{709}}=0.2126\cdot R+0.7152\cdot G+0.0722\cdot B} (HDTV)
    Y2020′=0.2627⋅R+0.6780⋅G+0.0593⋅B{\displaystyle Y'_{\text{2020}}=0.2627\cdot R+0.6780\cdot G+0.0593\cdot B}{\displaystyle Y'_{\text{2020}}=0.2627\cdot R+0.6780\cdot G+0.0593\cdot B} (UHDTV, HDR)
     
    I'm guessing APh uses 601.
  5. Code-wise, I think this is how it works:

    If you go to https://www.easyrgb.com/en/math.php and RGB->HSL, there's code to convert RGB from each pixel to HSL. Apply this to both the top (Blend) layer and the bottom (Base) layer. Then reconstitute RGB using the HSL->RGB code, using the S from the top Blend layer and H and L from the bottom Base layer.

    The same principle applies to the Hue and Luminosity blend modes. For the Colour blend mode, the H and S are taken from the Blend layer and just the L from the Base layer.

    Summary for colour blend modes:

                Hue = Hue(Blend) + Saturation(Base) + Luminance(Base)
     Saturation = Hue(Base) + Saturation(Blend) + Luminance(Base)
           Colour = Hue(Blend) + Saturation(Blend) + Luminance(Base)
    Luminosity = Hue(Base) + Saturation(Base) + Luminance(Blend)

    Aside: Related to the easyrgb.com code, I did a video on how Hue is calculated.

  6. @h_d: Thanks, though I think @Komatös has answered the 'can't edit' question.

    @walt.farrell: Thanks, I tried it again on another computer. Working ok. Hmm.

    Possible analysis: The macros (Light Leaks) are pretty slow. Maybe the draft effect appeared before the panel. Ctrl-Z still worked so stepped back past previous action. Sometimes I also get panels appearing below the fold - maybe something happening here. Still doesn't explain how macro panel got cancelled.

    Anyway. Looks like not-a-bug.

     

  7. When applying a macro from a set I'd acquired, it doesn't turn up in the History stream, with the result that doing an Undo steps you backwards too far. It looks like this happens to macros which have protected (ie. you can't edit them to see how they work).

    Just out of curiosity, I don't know how macros are protected this way and would be grateful to learn this tweak.

  8. 31 minutes ago, loukash said:

    Perhaps it's just me, but I'm still waiting for someone to actually point me to the Schmotofopp documentation where the math of the "magical eight" is disclosed and explained.
    In other words, I still consider this a "bug that turned into a feature throughout the years".

    I've been chasing through the webiverse trying to find the algorithms or anything vaguely technical about fill and the special/magical 8 blend modes. Not found the end of the rainbow yet. No gold. Not even rainbow, if truth be told.

  9. 12 hours ago, R C-R said:

    So what does that have to do with the Vibrance adjustment?

    While the exact algorithm is not known, it seems obvious that it applies a non-linear (possibly exponential?) curve that reduces or eliminates the chances of over saturating the brightest colors, even with the sliders at their maximums.

    Apologies for the confusion. If it will help, more detail is below that hopefully answers your questions and explains my motivations.

    1. Monochrome conversion

    In a colour image, Red, Green and Blue have different values in each pixel. When Red, Green and Blue values in a pixel are equal, the result is white, grey or black (in other words, monochrome). The puzzle in converting to monochrome is how to shift the Red, Green and Blue in each pixel so they are equal. Examples of this include:

    • Take the average. So if R=100%, G=0 and B=0 (in other words bright, saturated red), the monochrome pixel value is R=33%, G=33%, B=33%
    • Go half-way between the maximum and the minimum.  So if R=100%, G=0% and B=0%, the maximum is 100% and the minimum is 0% the monochrome pixel value is R=50%, G=50%, B=50% (which will make the pixel a mid-grey, which is brighter than the first method).
    • Use the gap between the maximum and the minimum. So if R=100%, G=0% and B=0%, the maximum is 100% and the minimum is 0% the monochrome pixel value is R=100%, G=100%, B=100% (which will make the pixel even brighter - in fact it will be white).

    So the question is 'What method will you use to convert the colour image into monochrome (ie black and white)?'

    A further problem is that when we look at different colours, we perceive them to be of different brightness. Just taking the primary and secondary colours (red, yellow, green, cyan, blue ad magenta), Yellow is seen as bright, while Blue is seen as dark, with the other colours in between. If you use any of the calculations above to create monochrome, a yellow and a blue pixel will both have the same brightness. This can make an image look poor (a good example is a bunch of different coloured flowers which all come out in similar shades of grey).

    So someone found that when converting to monochrome, it worked well to take different amounts of Red, Green and Blue. Because of the eye's sensitivity to different colours, within each pixel in the coloured image, you take about 30% of the Red, 59% of the Green and 11% of the Blue and then create the monochrome pixel by setting Red, Green and Blue all to the same value from this calculation. As a formula, this is R*0.30+G*0.59+B*0.11. The result is a monochrome image that looks more realistic.

    • So if R=100%, G=0% and B=0%, the 30/59/11% calculation is 0.3*100%+0.59*0%+0.11*0% = 30%. So pure red appears as a darkish grey.
    • if R=0%, G=100% and B=0%, the 30/59/11% calculation is 0.3*100%+0.59*100%+0.11*0% = 59%. So pure green appears as a lighter grey.

    In this way, different colours, even when they have the same pixel value are converted to appear as different shades of grey.

    2. The Vibrance question

    A way in Affinity Photo to create a monochrome image is to turn down the saturation. A question is whether this takes account of the 30/59/11% tweak above.

    When you turn down the Saturation in the HSL adjustment, it uses a formula that means a similarly saturated Yellow and Blue will appear as the same shade of grey. In some situations this is just fine, but if you want 30/59/11% conversion, so the human eye makes more natural sense of the colours, you need a different method.

    The Vibrance adjustment also has a Saturation control, but turning this down has a different effect to the Saturation control in HSL. I had thought the result was just from using the 30/59/11% calculation, but it seems to be slightly different.

    A way to get a perfect 30/59/11% calculation is to use Levels and simply change the RGB drop-down control to Grey.

    3. My motivation

    I am both a curious old techie and the author of the InAffinity YouTube channel where I explore and explain Affinity Photo. In this, I talk about such things as the 30/59/11% thing and the difference between HSL and Vibrance Saturation controls. Hence my original question. This helps me learn as well as giving the buzz of helping others. And hopefully also helping Serif, a great British company, to sell more product. With nearly 10,000 subscribers and lots of nice comments, I'm guessing I'm nudging the needle a little.

    Slightly perplexingly, Patrick seems to think I am trying to get hold of company secrets and distracting the developers from their important work. Some people would be insulted by this rebuke, but I am not. I was both a developer and then a QA engineer and, if I'm honest, was a pretty prickly geek who sometimes got irritated by perceived challenges. But then I studied psychology, looked in the mirror and hope I'm a bit cooler now. In particular I don't assume I know the thoughts and intent of others. In fact I've found that thinking kindly about them is better for me as well as for my relationships.

    So all's good.

  10. 22 hours ago, NotMyFault said:

    A bit Sherlock Holmes:

    • my forensic tool: PT filter with A=gr/x
    • delivered smooth gradient. x=2 info panel shows A=206.
    • Ok, next try A=gr-z/255 using input z of type Z.
    • starting with z=412, and poking around i find gr-413/255 euqals 0.
    • so gr=413/255 = 1.6196
    • Google finds this is the golden ratio
    • Similar you can find pi=801/255.
    • I rember seeing this long time ago (maybe video turorial), but you cannot find any hints in the helpfile.

    Elementary. Of course. gr=golden ratio. Take a bow, NMF.

  11. On 3/24/2021 at 10:53 AM, Patrick Connor said:

    I do not think that we are in a position to discuss the algorithms and I am not about to ask the devs to justify every line of code. The developers need to get on with...developing. Sorry, but this is not what these forums are generally for.

    Are you suggesting there is a bug at the slider extremity?

    No suggestion, no pressure, not asking for devs to take their noses off the grindwheel. Just trying to understand. I'm an old techie and endlessly curious.

  12. On 3/20/2021 at 11:55 AM, walt.farrell said:

    One would need to ask @dmstraker about that since what he shows is not the way that Photo works.

    On the other hand, in the comments on that YouTube video he mentions using Photo 1.7 Beta on Windows for that one. Perhaps there was a bug at that time and it failed to replace the Stroke and Fill.

    Disclaimer 1: The video was done a while ago. I don't have previous versions of APh so tricky to check.

    Disclaimer 2: I'm more of a photo guy so make little use of text (so claim limited expertise here).

    Disclaimer 3: My brain hurts! (any brain surgeons out there?)

    Otherwise I get both the original question and the explanation. It is a bit of a confuser if you don't know what's happening. Like what happens with the Artistic Text tool at shape boundaries (nice new feature, btw).

  13. Saturation in the Vibrance adjustment layer isn't the same as HSL saturation, but it also doesn't seem to be basic 30/59/11 perceptual values either. Turning it right down and doing a Difference with a PT layer with an assortment of formulae I can't quite pin its calculation down.

    Can anyone tell me how this is calculated, especially in slider fully left (desaturation)?

    Thanks!

  14. On 3/9/2021 at 8:27 PM, spiderpod7d said:

    Hi Dave (dmstraker)

    Are your Procedural Texture  macros cross platform compatible. I run on MAC and have had trouble with your macros in 1.9.1

    I don't code but am really interested in getting your macros to work especially the Luminosity ones

    I have attached a screen capture of what they look like. (missing sliders)

    Thanks for any info

     

    screenshot_01.png

    Looks like you can scroll down to other sliders -- see the scroll bar to the right of sliders visible.

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.