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

potential bug with fill layer alpha blending


Recommended Posts

Hi,

i created a test file to compare how alpha blends in different situations, especially "color opacity vs layer opacity".

The file

  • contains 16 tiles
  • 4 "large" tiles showing
    • top: vector shapes,
    • bottom: fill layers,
    • left: raw,
    • right: copy of left rasterized & tim
  • 4 "small" tiles, showing left:
    • red left color opacity   / layer opacity : 50 / 100,
    • right 100 / 50
    • blue top 50 / 100,
    • bottom 100 / 50

As visible, the fill layer blend result differs from vector blend result, and rasterized layers blend results (bottom left corner)

I strongly assume a bug with fill layers alpha blending - except someone from Affinity can provide a good explanation in layman's terms (or exact math formula)

 

image.png

color vs layer opacity vector vs fill bug.afphoto

image.png

Edited by NotMyFault

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

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.

 

Link to comment
Share on other sites

To give this another direction: It would be really really great if Affinity (James?) would provide some tutorials how all this combines:

  • Color opacity
  • Layer opacity
  • Fill opacity (from Layer FX)
  • Blend differences wrt alpha /opacity of Fill layers vs. all other types of layers

And other areas or arcane secrets like

  • Brush Opacity
  • Brush Flow
  • Brush Accumulation
  • Fun explosion: In combination with all these alpha blend options mentioned above

And more arcane secrets of layer blending

  • layers following normal alpha compositing blend rules (pixel, curves, ...)
  • layers able to overwrite blend rules (PT Filter, alpha-impacting adjustments levels , curves, channel mixer: just set/define new alpha value)

How all this integrates

  • layers flat atop each other
  • layers nested to description of ordinary layers
  • layers nested to thumbnail of ordinary layers (masking / clipping position)
  • layers nested to description of group layers
  • layers nested to thumbnail of group layers
  • layers nested to stacking groups (alpha reduced to 0 / 1)
Edited by NotMyFault

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

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.

 

Link to comment
Share on other sites

Maybe i found a probable cause:

When reducing layer opacity of fill layer to 50%, it becomes much lighter vs. all other methods.

You can spot this by disabling all red layers.

maybe related to (missing / double) gamma correction in blend formula.

0.7^2.2 roughly equals 0.5

if i change opacity to .7 it gives expected color

A5A58375-A533-4250-9338-EA270E26AA05.png

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

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.

 

Link to comment
Share on other sites

Only a Fill Layer opacity will transform the alpha channel with a gamma of 2.0 which seems to be wrong.

As far as i know, alpha channels does not apply gamma correction, see comments by Gabe

image.png.eec49486399a29f03698ca82430c20de.png

and:

https://en.wikipedia.org/wiki/Alpha_compositing

Note that only the color components undergo gamma-correction; the alpha channel is always linear.

 

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

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.

 

Link to comment
Share on other sites

2 hours ago, IPv6 said:

Still, they are applied - in RGB32 mode // its an unfortunate decision made by Serif 

Maybe we are talking about completely different topics. I strongly assume Affinity don't use Gamma correction on Alpha channel for layer blending in any color mode - except the (faulty) case of fill layers. Specifically what is explained in the wikipedia link about Alpha Composting.

I did not relate to other situations, e.g. converting between 8/16 and 32 bit modes, or channels panels / channels mixer etc. I've read your post in the linked thread, but couldn't follow your argumentation. I will try to make some artificial test documents on my own, this helps me to understand.

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

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.

 

Link to comment
Share on other sites

  • 1 year later...

Bump. still unfixed in V2.1 

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

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.

 

Link to comment
Share on other sites

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.