The future of selections and masks in Krita

Boudewijn Rempt boud at valdyas.org
Tue Aug 1 00:31:51 CEST 2006


On Tue, 1 Aug 2006, Casper Boemann wrote:

> On Monday 31 July 2006 22:55, Boudewijn Rempt wrote:
> > Or even nicer to just move the selection to the other layer?
> Well no because that requires a drag and drop on top of a click to select the 
> layer, possible even requiring some precise manouvering of the pointer.

Well, you have to click to select another layer, too. The thing is: a global
selection is a weird thing. It is created (when using fancy tools such as
select similar or foreground extraction) based on the pixels of the current
layer; it acts on the current layer; which associates it to the user (my dad
in this case, not one of the persona's, he's reasonably proficient, but makes
this mistake every time) with a particular set of pixels. And then they change 
layers, but the selection now suddenly applies to this other set of pixels.

The only reason that's not confusing can be because people have been accustomed
to that kind of behaviour, not because there's any innate logic to it.

> 
> > That's basically what Photoshop and the Gimp have -- which they do not have
> > because of any design, but because of the way the history of Photoshop has
> > progressed from Mac Paint type selections, which turned out to be
> > insufficiently powerful when layers where added, but which couldn't be
> > removed (the global selection) to masks -- which are just per-layer
> > selections, nothing else -- to vector based shapes.
> Sorry but what do you base this history lesson on ;) I would like to read 
> that.

Should write a book soon. The history lesson is derived from comparing feature
lists of successive versions of Photoshop.

> > I stand by what I have written in the todo for 2.0 about selections, and
> > what we discussed during the Krita hackathon: one or more masks/selections
> > (there is no difference) per layer that can be copied and moved between
> > layers.
> Selections and masks are _not_ the same. Selections select an area 
> providing "write masking" and a subject for modification while masks affect 
> the viability of a layer. Selections are transient things while masks are 
      ^ visibility?
> part of the document.

I don't see why selections should be transient: they are part of the state
of the document.
 
> And we didn't agree to what you wrote in the todo at the Krita Hackathon. What 
> we did agree on was that the underlying structure, an alpha colorspace, was 
> the same and so conversions could easily occour, perhaps even share a 
> superclass. To be fair I do remember you talking about this at the hackathon, 
> but I also remember me objecting although it didn't turn into a big 
> discussion.

Then I either misremember or misunderstood, which is rather a pity. As far as
I am concerned, the Photoshop implementation, which the Gimp and other apps
copied, is not a design, it is just hack layered on hack, without ever throwing
anything away. I think we can do better. 

There are two issues:

* are selections global -- i.e, is there only one selection instead of a selection
per layer
* what's the difference between selections and masks

Well, as I noted in my answer to Thomas, a mask is just a selection with a filter.
Nothing more, nothing less. In the case of Photoshop, you cannot even choose the
filter. It's just causing bits to be transparent. I'm not sure whether you can
have more than one mask per layer in Photoshop, but it would be logical and useful
to have more than one mask per layer in Krita. And more than one effect, more
than just visibility. (Which is why I originally wanted to have adjustment layers
to be child layers of paint layers, instead of filters inserted in the layer stack.)

And not having a different selections in foreground and background layers will
make Claire's work very difficult. Prevent going back and forth between layers
and doing stuff.

> > I do not think that is complex: not more complex than making an artificial
> > distinction between selections and masks. The case for "unconventional" for
> > Arthur here simply boils down to "cannot use my photoshop manual with
> > Krita".
> Well it also goes against every other applications that never has different 
> selections in different parts of the document.

Unless you count the discontinuous selections of a spreadsheet. But I don't care
about this: other applications don't have layers. And personally, if I were
to create a compound text document, I would be thoroughly displeased if my text
selection would be removed just because I happen to select three text boxes and
drag them to a different place. But it's just not the same thing, a selection in a
a paint app and a selection in an office app.

> > I think that nothing can be simpler than having just one mechanism for
> > selecting pixels; making that visually explicit by showing the selection
> > mask in the layer box and making it possible to manipulate it exactly like
> > a layer (copying, pasting, painting, filling, moving up & down).
> Hmm manipulating a selection like it is a normal layer is nice as long as all 
> you want to do is paint on it, but things like select similar and flood 
> select require a stronger connection to a layer (either as want the layer in 
> question or as I want the current layer). Either way you cannot decouple it 
> fentirely and treat a selection as simply a layer.

That's true, but I still think we can come a lot closer than we do now and
create something better than anything that currently exists.

> Besides it sounds like nonsense to me that something manipulation/view 
> oriented is also part of the document.

That's another step: currently you cannot create different selections in
different views of the same image in Krita. Do you want that, too? If not,
then selections are not view-related. And given the amount of work a good selection
can take, it seems like stupid not to save the selection with the document,
especially if we even save the cursor position in KWord. (We also should save the 
zoom level in Krita documents, now that I think of it. When I'm back from my
holidays, I'll be leaving this Thursday, I'll pick up on the open raster
thing and add that, too.)

Boudewijn



More information about the kimageshop mailing list