Re: [Gimp-developer] Behavior change in paint modes between 2.8 and 2.10

On 12/9/18 3:56 PM, Ell via gimp-developer-list wrote:

On 12/7/18 6:16 AM, Ofnuts wrote:
In 2.8, on a transparent layer, paint something blue, set the FG color
to red, set the paint tool to "Hue" mode, paint over: the blue parts
turns to red, the transparent parts remains unchanged.

In 2.10, if you do the same thing with the non-legacy modes, the
transparent parts are painted. The legacy modes behave as in 2.8, and it
seems that setting the alpha-lock also provides the 2.8 behavior.

It used to be that painting a layer with the paint tool in mode XXX
would give the same result as adding a transparent layer in mode XXX and
painting on it in "Normal" mode.

Is it a bug/regression or is it a deliberate change, and if the latter,
what is the rationale?
Tl;dr: it's deliberate, but it needs to be improved.

In 2.10, layers have a new property called the "composite mode", which
is available when using the new layer modes.  It controls which parts of
the combined layers remains visible: the opaque parts of either layer
(Union), the opaque parts of the bottom layer (Clip to Backdrop), the
opaque parts of the top layer (Clip to Layer), or the opaque parts of
both (Intersection).  There are a few examples in the "Composite Mode"
section of:

The default composite mode of a layer currently depends on its layer
mode, in a way that mimics the legacy modes: Union for Normal and
Normal-like modes, and Clip to Backdrop for the rest.  By changing the
composite mode of a non-Normal layer to Union, you can get the same
result as for painting.

Unfortunately, the other way around is currently not true: there is no
UI for controlling the composite mode of paint tools.  The composite
mode used for painting is currently determined according to the paint
mode: Union for everything, except for the "subtractive" modes: Erase,
Split, and Color Erase, which use Clip to Backdrop.

"Why?" is a good question.  There is no great answer, but this sort of
behavior for the paint tools is what a lot of people seem to expect, and
what most other software provide.  Ultimately, I hope to revamp the
layer-mode UI, and expose all the relevant options for both layers and
paint tools, so that you could paint using either composite mode.

In the meantime, there is no great way to restrict painting to opaque
regions.  Like you said, you can use the alpha lock, but this works only
superficially: it produces correct results when either the existing
pixel or the new pixel are fully opaque, but if both are
semi-transparent, the result is wrong.  Likewise, the result of
combining semi-transparent pixels using the non-Normal legacy modes,
while painting *or* using layers, is also wrong (that's part of the
motivation for the new modes; we're keeping the broken behavior of the
legacy modes for backward compatibility -- they really shouldn't be used
in new images.)  The only fully-correct way to do this right now is
using layers, using the new modes with Clip to Backdrop.


OK, that makes sense...

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]