RSS/Atom feed Twitter
Site is read-only, email is disabled

Behavior change in paint modes between 2.8 and 2.10

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

Behavior change in paint modes between 2.8 and 2.10 Ofnuts 07 Dec 11:16
  Behavior change in paint modes between 2.8 and 2.10 Ell via gimp-developer-list 09 Dec 14:56
   Behavior change in paint modes between 2.8 and 2.10 Ell via gimp-developer-list 09 Dec 15:06
   Behavior change in paint modes between 2.8 and 2.10 Ofnuts 09 Dec 22:31
Ofnuts
2018-12-07 11:16:42 UTC (over 5 years ago)

Behavior change in paint modes between 2.8 and 2.10

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?

Ell via gimp-developer-list
2018-12-09 14:56:33 UTC (over 5 years ago)

Behavior change in paint modes between 2.8 and 2.10

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:

https://docs.gimp.org/2.10/en/gimp-layer-new.html

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.

-- Ell

Ell via gimp-developer-list
2018-12-09 15:06:02 UTC (over 5 years ago)

Behavior change in paint modes between 2.8 and 2.10

On 12/9/18 9:56 AM, Ell via gimp-developer-list wrote: < [...] 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.

Actually, it's worse than that: In general, with non-Normal modes, the result when using alpha-lock is wrong whenever the existing pixel is semi-transparent, even if the new pixel is fully opaque.

-- Ell

Ofnuts
2018-12-09 22:31:25 UTC (over 5 years ago)

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:

https://docs.gimp.org/2.10/en/gimp-layer-new.html

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...