GNOME Bugzilla – Bug 767177
Many Paintbrush modes can't paint over an erased area if the layer has an alpha channel.
Last modified: 2017-02-15 13:08:20 UTC
Many Paintbrush modes can't paint over an erased area if the layer has an alpha channel. Here's how to produce the problem: 1. Make a new image with a solid white background. The Background layer doesn't have an alpha channel (if it does have an alpha channel, remove it). 2. Make a New Layer and make sure the New Layer *does* have an alpha channel. 3. Set the FG color to black, click on the Paintbrush, and select a parametric round brush. 4. Set the Paintbrush mode to Multiply. 5. Paint a solid black vertical swath through the middle of the new layer, leaving white on either side. 6. Change to the Eraser and erase the center of the black vertical swath painted in step 5. 7. Change back to the Paintbrush and try to paint horizontal black stripes across the vertical black swath with the erased center. In Step 7, when using Multiply and many other Paintbrush modes, the brush can't paint across the portion of the layer that was erased in Step 6 . Normal and a few other modes do allow to paint across the erased area. Removing the alpha channel allows all of the Paintbrush modes to paint across the erased area. Possibly related bugs (problems with painting on layers with alpha channels): 764552, 764619, 766116.
(In reply to Elle Stone from comment #0) > 2. Make a New Layer and make sure the New Layer *does* have an alpha channel. I forgot to say fill the New Layer with white, sorry!
If you write bug 764552, bug 764619, bug 766116 then they will be linked automatically.
Where is the bug? If you e.g. multiply nothing the result is nothing...
(In reply to Michael Natterer from comment #3) > Where is the bug? If you e.g. multiply nothing the result is nothing... Well, I wasn't trying to multiply the zeroed out alpha channel by the painted color. I was trying to multiply the layer below the layer I was painting on by the painted color. In Krita you can make a transparent paint layer and then paint on the transparent layer using Multiply. This provides a lot of flexibility. Can the net result of the math of "alpha channel plus color painted on a transparent (portion or all of) layer" be modified such that one can paint on transparent areas using Paintbrush modes that involve multiplication?
Hm... sample merged compositing, so to speak...
Um, are you sure you don't just want to set the layer mode to multiply?
(In reply to Michael Natterer from comment #6) > Um, are you sure you don't just want to set the layer mode to multiply? Quite sure. I've been painting at varying opacities with the brush in Multiply mode for radiometrically correct blending of the painted colors (requires using linear precision in default GIMP, and using a linear gamma RGB working space in my patched GIMP and in Krita). Using Normal blend mode for the brush just replaces the old color with the new color, which is mathematically and visually quite different from multiplying the old color by the new color, even if the layer itself is set to Multiply blend mode. And of course setting the layer itself to Multiply blend mode does also affect the resulting color, making it darker than leaving a transparent layer at Normal blend mode and painting on the transparent layer using Multiply.
I've been asked to comment on this bug and not being a digital painter, I dare to say: I think this is not related to the bugs linked above. IIUC, as Michael Schumacher said, it is a sample merged painting, put on the active transparent layer the result of painting on the projection with the paint mode choosen. As if the layer contained the projection. But in my understanding this would be alternative to the current way of painting on a layer with alpha channel, unless it can be proved that it would affect only cases that today result in painting transparency.
I agree with Massimo, this is simply a missing feature, and probably quite easy to add.
That said, I think it's a some-liner when the "Use GimpApplicator" toggle is active. I'm not familiar enough with the default code path to quickly judge the effort.
This bug report/enhancement request is actually about painting using various blend modes including Multiply on transparent layers. I had planned to file such an enhancement request and totally overlooked the fact that painting over an erased area was the same as painting on a transparent layers. Sorry for the confusion! The ability to paint in various blend modes on a transparent layer is pretty important for many painting workflows. Krita does allow to do this.
Created attachment 343500 [details] Comparison from GIMP to Krita > Painting with blend modes on transparent layers The spreedsheet was made using the same blend modes between GIMP and Krita.
Some months ago I have made a comparison about this topic with Krita and Photoshop... only to question 'painting on transparent layers'. The spreedsheet was made using the same blend modes between GIMP and Krita. Is possible to verify this case in the current works around the blend modes to GIMP 2.9.6?
In case it might be useful, here's an older summary by a Krita dev regarding the difference between Krita GIMP, PhotoShop alpha handling: https://krita.org/en/item/krita-april-update/ This also might be relevant: https://docs.krita.org/Special:MyLanguage/Clipping_Masks_and_Alpha_Inheritance
This got fixed recently, forgot the bug: commit e1e41b86d0986ade760ae25d0e6378bd2c4763ae Author: Michael Natterer <mitch@gimp.org> Date: Sun Feb 5 23:08:16 2017 +0100 app: allow painting on transparent layers with modes != normal by using GIMP_LAYER_COMPOSITE_SRC_OVER. Please test. app/paint/gimppaintcore-loops.c | 2 +- app/paint/gimppaintcore.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)