Jump to content

Recommended Posts

Posted

Hi,

Affinity Photo behaves in an unexpected way when using blend mode saturation.

This could be caused by:

  • Missing or unclear specification how Photo handles this mode
  • An bug
  • I got all this wrong, and in reality everything is fine. In this case, sorry for wasting your time ;-) If possible, please provide links to the explanation.

My assumption is that Photo is compatible to:

The core definition and formula according to (2) for this blend mode:

10.2.2. saturation blend mode

Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color. Painting with this mode in an area of the backdrop that is a pure gray (no saturation) produces no change.

B(Cb, Cs) = SetLum(SetSat(Cb, Sat(Cs)), Lum(Cb))
During all my tests, i found the following issues:
  • Affinity impacts the results Lum value, in extreme cases down by 50%
  • The Lum value of the source layer heavily impacts the blend result
  • Photo's results visually and measurably differ from text book examples found in (1) and (2).

 

ente proof saturation issue.afphoto 2021-05-04 18-23-47.mkv

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Posted

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Posted

Hi @NotMyFault,

I believe this is a continuation of the following thread - 

I have been following the above thread and I'm currently awaiting a response from our developers regarding this, so my apologies for not replying sooner.

Once I have confirmation I'll be sure to reply to that thread with the information I am provided - I hope this helps :)

Posted

@NotMyFault,

Your Affinity document provided is using the P3 Colour Profile, not sRGB which is the profile used for the examples you've provided, this is causing the differences you're seeing.

If you create an 8/Bit sRGB document and follow the same steps, you should find the PS and Affinity results are much more closely matched :)

Posted
On 5/7/2021 at 5:35 PM, Dan C said:

@NotMyFault,

Your Affinity document provided is using the P3 Colour Profile, not sRGB which is the profile used for the examples you've provided, this is causing the differences you're seeing.

If you create an 8/Bit sRGB document and follow the same steps, you should find the PS and Affinity results are much more closely matched :)

Can confirm, case can be closed, thank you.

The results match now within reasonable bounds.

 

My only open wishes would be

  1. a more verbose documentation (in help) that explains the (for normal users) unintuitive behavior, e.g. starting from RGB documents, using HSL colors, that blend mode saturation (and luminosity) always depend on both S and L. This means, you cannot use these blend modes to selectively replace  S of the backdrop layer
  2. Is there any easy way to replace the S of a backdrop layer by using blend modes? I’m starting a workaround to do this by procedural texture, but the formulas get monsters based on missing rgb<->hsl conversion functions

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Posted
1 hour ago, NotMyFault said:

Can confirm, case can be closed, thank you.

The results match now within reasonable bounds.

Many thanks for letting me know, I'm very glad to hear this!

1 hour ago, NotMyFault said:

Is there any easy way to replace the S of a backdrop layer by using blend modes?

There's none that immediately jump to mind, but this could be possible - what are you hoping to achieve with the background layer? Are you wanting to only affect the Saturation value for this layer? :)

Posted
5 hours ago, Dan C said:

Many thanks for letting me know, I'm very glad to hear this!

There's none that immediately jump to mind, but this could be possible - what are you hoping to achieve with the background layer? Are you wanting to only affect the Saturation value for this layer? :)

Exactly, and do not impact luminosity. I'm looking for a way to independently impact either S or L, but not both.

Using a top layer where i simply set the desired S (or L)

Quite similar to the HSL adjustment, but this time the actual S (or L) value should not be the same for all pixels, but taken from the blend layer.

 

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Posted
On 5/9/2021 at 6:38 AM, NotMyFault said:

Exactly, and do not impact luminosity. I'm looking for a way to independently impact either S or L, but not both.

Using a top layer where i simply set the desired S (or L)

I've probably lost track of something, but how is that different from what the Saturation and Luminosity blend modes do? (That's certainly what they say they do, in the text (non-math) part of the description.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.5, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.5

Posted
1 hour ago, anon2 said:

[deleted - would just be repeating myself]

But since you asked, NotMyFault quoted some text from an Adobe manual in the other thread, and above in the first post in this one, too:

Quote

10.2.2. saturation blend mode

Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color.

That sounds like exactly what NotMyFault desires. (And the correponding definition for the Luminosity blend mode also sounds like what they want.)

So either everyone is describing those two blend modes incorrectly in words, or I don't understand what NotMyFault wants that is different from what everyone provides.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.5, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.5

Posted
23 minutes ago, walt.farrell said:

But since you asked, NotMyFault quoted some text from an Adobe manual in the other thread, and above in the first post in this one, too:

That's not an Adobe manual. It's a W3C CSS-SVG Effects Task Force publication.

37 minutes ago, walt.farrell said:

That sounds like exactly what NotMyFault desires. (And the correponding definition for the Luminosity blend mode also sounds like what they want.)

And it's exactly something that Affinity and Photoshop and various other apps deliberately do not do.

38 minutes ago, walt.farrell said:

So either everyone is describing those two blend modes incorrectly in words, or I don't understand what NotMyFault wants that is different from what everyone provides.

Everyone is not describing the same thing and everyone is not providing the same thing.

 

 

 

 

 

Posted
19 hours ago, anon2 said:

That's not an Adobe manual. It's a W3C CSS-SVG Effects Task Force publication.

Good point. So go back to the original topic, and Table 7.2 at https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/pdf_reference_archives/blend_modes.pdf

That says the same thing:
 

Quote

Saturation: Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color.

Luminosity: Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color.

And, yes, that is describing blend modes for PDF files. So is the distinction that PDF does it differently from what Photo and Photoshop do? Or is everyone describing it incorrectly?

 

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.5, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.5

Posted
On 5/9/2021 at 11:38 AM, NotMyFault said:

Exactly, and do not impact luminosity. I'm looking for a way to independently impact either S or L, but not both.

Using a top layer where i simply set the desired S (or L)

Apologies I just want to inform you that I'm awaiting a response from our Photo expert regarding this, as I am certain there may be a way to achieve this using equations perhaps - but this isn't a workflow I'm personally familiar with and I would not wish to provide incorrect suggestions.

I'll be sure to chase up our expert now and reply here as soon as I have more info :)

Posted
6 hours ago, walt.farrell said:

Good point. So go back to the original topic, and Table 7.2 at https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/pdf_reference_archives/blend_modes.pdf

That says the same thing:
 

And, yes, that is describing blend modes for PDF files. So is the distinction that PDF does it differently from what Photo and Photoshop do? Or is everyone describing it incorrectly?

 

I don't know about PDF, but CSS does the same Saturation blending and Luminosity blending as Affinity, Photoshop and various others, which is not HSL-based.

To me, the word saturation in the blend mode's name is not intended imply the saturation component of the HSL colour model. After all, the saturation of HSV and HSL models are not equivalent, so there's not one universal definition for saturation although definitions are concerned with the concept of colourfulness. 

Furthermore, notice that the word luminosity in the blend mode's name does not even match lightness, the L of HSL.

Posted
On 5/9/2021 at 11:38 AM, NotMyFault said:

Exactly, and do not impact luminosity. I'm looking for a way to independently impact either S or L, but not both.

Using a top layer where i simply set the desired S (or L)

Quite similar to the HSL adjustment, but this time the actual S (or L) value should not be the same for all pixels, but taken from the blend layer.

Many thanks for your patience here!

We've been testing a few different methods here, however we've yet been unable to isolate only the saturation value with adjustments, procedural textures & equations.

I wouldn't want to say it's not possible without being 100% certain, and our expert has requested if you have any 'real world' examples of what you're hoping to achieve so that we can better understand this request and continue testing? :)

Posted
3 hours ago, Dan C said:

if you have any 'real world' examples of what you're hoping to achieve

Hi Dan,

wouldn't it be possible to provide a procedural texture function

rgbtohsl (vec3) -> vec3

input: vec3, R,G,B

output: vec3, H, S, L

hsltorgb (vec3) -> vec3

input: vec3, H, S, L

output: vec3, R,G,B

These functions should use the same conversion text-book formulas as the info panel.

I could calculate all these "manually" with PT equation. Having these helper functions would dramatically reduce the effort.

For a PT based solution, i would need to convert RGB->HSL, modify S or L based on my needs, and convert back HSL->RGB.

I did not try this yet, it is definitely possible. Why re-invent the wheel when these conversion funtcions are ready in every standard library already used internally)?

hue:

image.thumb.png.d77010b5ef32a0564b1423fc0f25bce0.png

 

sat: var mi=min(R,G,B); var ma=max(R,G,B);var dd=ma-mi; var ll=(ma+mi)/2; dd/(1-abs(2*ll-1))

lum: rgbtoi (R,G,B)

and RGB from HSL by

image.png.30237945ce39ba3fb64a3d6f8d81cfb3.png

 

 

Pure sat request.afphoto

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Posted

Thanks for the further information and file provided, unfortunately our Photo expert has been unable to create a workflow which isolates only the Saturation, without affecting other values such as luminosity, my sincerest apologies!

Should we have a 'eureka' moment, we'll be sure to update this thread :)

Regarding your Procedural Texture code, we in the Tech Support team have some basic knowledge but we don’t generally offer support trying to create specific functions as it can be a mind field with so many variables at play. Obviously, if you find a genuine bug using PT then we will investigate it further but it seems like this issue could just be down to a limitation of the app.

  • 7 months later...
Posted

Finally figured it out on my own. 

 

 

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • 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.