The future of selections and masks in Krita

Boudewijn Rempt boud at valdyas.org
Mon Jul 31 23:53:31 CEST 2006


On Monday 31 July 2006 23:15, Thomas Zander wrote:
> Hi boud!
>
> First of all; do you agree on the use cases?  Did we miss anything?
> We _concluded_ a solution from them, but if another solution satisfies the
> usescases and even other usecases, the ideas can change.
> Another theory is just fine, as long as the usecases are satisfied.

No, not quite. I saw one use case, for one user; and that one did not seem 
applicable to the situation. If anything, trying to combine the best parts of 
three images seems to need three selections, and no global selection. I did 
not see much in the way of convincing reasoning from that use-case to the 
conclusions. 

The use-case itself, combining different exposures in one image, btw, is 
something that's most often done through an automated algorithm, like 
Photoshop's merge-to-hdr: 
http://www.luminous-landscape.com/tutorials/hdr.shtml, not by manual 
blending.

> Ok, I'll ask the guys to explain that to me tomorrow.

I'll give it a try now because I notice the writeup in the todo is kind of 
very summarized. Although there should be plenty about it in the mail 
archives -- but that's hard to search nowadays.

The basic thing is that I don't see the difference between a selection and a 
mask; a mask is an adjustmentlayer with an selection associated. (Remember 
that I want adjustmentlayers not just to be filters in between layer stacks, 
but also one level lower, i.e, adjustmentlayers that work on just one layer. 

Even more basic is that I really want to obliterate the absolute distinction 
between a selection and a layer: a selection is just a sub-layer to a paint 
layer that has a certain meaning to the paint and fill operations applied to 
that layer. I want to show selections in the hierarchy of the layerbox as 
independent rows.

You should be able to move & copy selections from layer to another: to move 
the selection in the x,y direction using the move tool if the selection is 
highlighted in the layer box, and move the pixels that are selected in the 
x,y direction, if the layer is current in the layer box. Same with painting 
and everything.

I have this gut feeling that handling selections this way will be way clearer 
to users than anything that exists right now. I may be wrong, of course, but 
I want to at least have given it a try.

> > 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".
> >
> > 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).
>
> So, you are suggesting that a selection has an effect on the transparancy
> of the layer?

If you use the selection to fill the alpha channel of the associated layer 
with a certain opacity, yes, of course. Or if you use the selection to create 
an adjustment layer (we should have a filter that changes just the alpha 
channel, which we don't yet), an adjustment layer that does not act as a 
filter in between layers, but which is associated with a single layer just 
like the wet "mask" is associated with a single layer, then yes, the layer 
selection will have an influence on the transparency (or redness etc) of that 
layer.

Btw, I was working before I broke down a bit on a widget that made it possible 
to select the channels on which any operation would work, so you could fill 
just transparency, or composite just one or two channels.

> Or how will the user see the difference between a selection and a mask?

Essentially -- and I don't think I've been able to formulate it this clear 
before -- a mask is a selection with an associated filter. That's all. Any 
filter that is suitable for dynamic application.

> I kind of had the impression the idea you and I had were kind of the same,
> but the presentation to the user was slightly different.
> Ok, I'll ask the guys to explain the design you referenced above to me
> tomorrow :)
>
> > I have not seen a usecase for a global selection: I certainly have not
> > seen one where it is less complex to add functionaly to convert between
> > masks and a global selection.
>
> There actually was one :)

Didn't notice it in Casper's mail...

> Here is another one;
> Extending the usecase already given; we have a user with 3 layers.  He
> creates a selection around an item in the document. Like a trafficlight.
> He then uses that over the 3 different layers to paint in the alpha layer
> with a low density brush and get just the right balance of the different
> items from the different exposures.
>
> And one from personal experience;
> Take a photo with an elk; then create a mask around an animal so thats the
> only thing you see on that layer.
> Besides using that elk itself ones or twice 

You mean copying the selected elk to other places in the image (other 
locations in the same layer, or in other layers) or "linking" the cut-out elk 
like Pipping does in one of his xcf2 demo's?

The way I used to try to do that with the Gimp was select the elk, invert,  
fill the layer with the elk on it with transparency (which was impossible, 
for Krita 1.6 I did an experimental paintop that let you fill a layer with 
just the selected opacity) and then select the rectangle around elk itself 
and copy & paste. Probably not the cleverest way to do this, but this was how 
I tried to do it before I started working on Krita and learned about how 
selections are implemented.

> I want to do a theme and I 
> want to have that same outline recurring in the picture itself but then
> all black.  So I create a selection based on the transparancy of the
> layer that holds my elk.
> I create a new layer and use the selection to fill one or two elks in
> different places.

If you've got the elk already selected, you already got the selection based on 
the transparency ready for you. If not, well, it's not easy to create an 
explicit way of selecting all non-transparent bits of a layer. So that means 
you get the selection done, and then, with my design, you simply copy the 
selection over to your new layer, where you can use it to fill elks to your 
hearts content -- even moving the selection to place it differently in the 
x,y coordinate. 

And if, in-between, you want to brush up the background, you can simply select 
that layer, create a selection there, mess with the colors and go back to 
your multiple elk-layer and discover that your precious elk selection is not 
gone: no need to recreate it.

-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20060731/a394e721/attachment.pgp 


More information about the kimageshop mailing list