Krita with clipping (test build)

Many people asked for layer clipping function in krita and I tried to add it. And I did it, kinda.
It’s a temporal build, made rather for testing than for actual work but yeah it mostly works. Current version replace alpha inherit with clipping but I plan to make both functions work independently.

At the moment development is paused, but maybe if there will be some critical bug I’ll fix it. Can’t say for sure it’ll be added in official krita.
Also I disabled undo\redo for layer visibility, just because I can.

What works:
-clipping of single or multiple layers to layer below
-clipping to a group
-different blending modes for clipped layers
-opacity, visibility, masks
-merging one layer or group (but merging multiple have issues)
-saving\loading in kra and psd

Problems:
-no alpha inheritance, obviously
-merging more that one layer can also merge all clipped layers (like if you merge 2 of 3 clipped layers to base layer)
-sometimes there can be visual glitches
-layer styles doesn’t get clipped
-you can’t put clipped layers in pass through group and expect it to work on outside layer

Big warning - this build is based on krita nightly so it crashes more often that stable version. There also can be other problems.
Small warning - I don’t recommend to try it on your important files (without backup). It should work fine but just in case…

Bla Bla, so this is the build for windows:

I can’t make it for other OS but if you can build krita you can use this patch:

Also, wish from me - say in comments what you thing about the feature (not this build).
Do you want it?
Are you totally fine with alpha inherit?
Don’t need it but interested?

23 Likes

Do you want it? Are you totally fine with alpha inherit? Don’t need it but interested?

  • alpha inherit is useful and fine. In fact i moved away from Affinity Photo where something similar was needed - and the only possibility was some hacks around “erase” mode.
  • “Don’t need it but interested?” - this. compatibility with PSD is a real booster though, better have it. even partially better than nothing, imho
3 Likes

yes, please.

The more options we have the better, plus the alpha inherit is useful for many things, which I think is great, it just makes Krita more accessible and powerful.

5 Likes

Not really. However I also didn’t want a smartphone circa 2010’s, but after getting one it was a pleasant and convenient surprise.

Yes, although my workflow rarely uses it.

Kinda. I can see the convenience of it and might use it more often than alpha inheritance.
However for me, the possible compatibility with other programs and .psd files might be more ‘exciting’.


Sincerely I expect more fan fare and testers in this post, seeing how the users asking for clipping mask and more PS compatibility were vocal about it.

Alas, thanks for the work and hope it rolls out nicely from now out.

P.S.: I will wait for a Linux test package as I not in the mood to build Krita from scratch.

Do I want it?
Yes, absolutely, because this makes Krita more accessible for some users. It was a much requested feature in the past, with huge topics and interesting discussions.
Do I need it?
May be. Time will tell, but I can not say it for now, because I try to achieve as much as possible by using brushes, not technical gimmicks. Thus, also Alpha Inheritance is seldom used by me.
Am I fine with Alpha Inheritance?
Yes, I am, and I will be with clipping as an additional option too.

Michelist

2 Likes

Great work. I’ve been wanting this feature for quite sometime now. Glad to see it being worked on.

Do you want it?
Are you fine with alpha inherit?
Don’t need it but interested?

  • Hell yeah
  • I personally find it cumbersome to work with at times since it forces a layer structure on you which might not always correspond with the way you organize your layers. But it’s still useful and I’m not suggesting to get rid of it (but if I had to choose only one, I’d go with clipping)
  • Even if people don’t need it directly it can help them share their work as .psd which is (sadly) the most popular format. I see added compatibility with psd as a big plus.

I’ve ran some test, and so far it’s working great. I especially like how I can now clip to layers inside a group without having to add sub-groups.

However, trying to clip a group (even in normal mode) to the group below doesn’t work. In this picture, I expect the red lines and yellow lines inside Group 6 to clip to the Boxes group (it works in CSP and PS) but it’s not working.

Also, if I have a group (like the one containing the blue lines here) above clipped layers (like red and yellow lines here), and if I then try to clip the group, Krita immediately crashes.

These are expected bugs from such an early build, hopefully they get ironed out.

3 Likes

Oh, there is still a way to crash :smiley: Thanks for test.
Yeah, you can’t clip groups now (it was one of the things caused crashes). I just tested and it’s not possible in PS as well.

Also no need to answer all questions at the end) I planned to make a poll with answers like these but seems like there is no poll option.
Just say your opinion.

My opinion - I definitely need it because I have to deal with psd files for work. Also it might make layer structure slightly simpler in some artworks. There is situations when alpha inherit is better but ironically it’s also situations where I can’t use it because it’ll be exported to psd.

1 Like

Yeah, sorry. I tested in CSP and it works. And since I sometimes save as .psd in CSP, I assumed it was compatible with the format.

1 Like

Yes! :heart_eyes_cat:

I never was fine with “inherit alpha”, too many clicks and actions to just paint inside a shape. Eg. here is the number of steps to paint within a layer for both:

Inherit alpha:

  1. Paint a shape on a paint layer named “dress”
  2. Group the layer “dress” and create a new layer on the top with inherit alpha ( quick, thanks to the clipping group feature: Ctrl+Shift+G)
  3. Paint a pattern (so far, same number of click as Clipping Mask, just more mess in the layer stack).
  4. To accept change and merge all in ‘dress’: (no shortcuts), select manually the parent group
  5. Right click and convert the group to a paint layer
  6. Rename the auto generated “Clipping Group 8 Merged” group name into “dress” and type…
    … … very long… … :yawning_face:

Clipping Mask:

  1. Paint a shape on a paint layer named “dress”
  2. Press the shortcut for a new clipping mask
  3. Paint a pattern
  4. To bake back, Ctrl+E (merge down)
    Shorter layer stack, faster action :+1: (and in the process ‘dress’ name of the original layer is preserved).
7 Likes

You’ll find it clicking the gear-icon in the editor, it is one of the options offered in the opening drop-down-menu.

Michelist

2 Likes

There is a poll in Discourse.

@Radian-art In the initial thread when we compared various clipping mask features, we found that a group can also be clipped to a layer or a group below it in CSP so having the ability to clip both group and layer to the layer or group below would be welcome. Since this can be done with alpha inheritance so it would be good to have this ability. We found that photoshop’s clipping mask were the least flexibile one where only layers could be clipped. CSP allows to clip group too.

4 Likes

@raghukamath I only have hide :frowning:

Also I agree it should be possible to clip group but I had some problems with it. Like, problems with how to code it so I disabled it for now to avoid more crashes.

Aah because your trust level is 0, As you participate more your trust level will increase it along with many other discourse features will be available to you.

I tested a PSD saved from clip studio with group layer clipped to a layer beneath and Photoshop just ignores the clipping mask. Photoshop doesn’t have this capability. So PSD saved from clip studio with group layer clipped will also break in PS.

5 Likes

Anything that gives compatibility/similarities to Photoshop would be more than welcome for me. For many years I’ve used Photoshop’s layer masks to hide or apply gradient fades to sections of an image, to have something similar in Krita would make such tasks so much easier and quicker (i.e. for me with my hard to change Photoshop habits).

:slight_smile: Hello @Kev_Bell and welcome to the forum!

If you want it, you can download the test-build for Windows, but if you changed from Windows to macOS or Linux, you can build it yourself with the patch offered in the opening post. There it is easier to build Krita than on Windows.

Michelist

1 Like

was trying this out and it seems that the order I activate the alphas give different results. Also this is is just replacing the alpha inheretance with clipping or there is some other option to test ?

The idea is that both options are available so that users choose which one to use depending on the situation.

2 Likes

and where is the other option ?

As mentioned here this was just a quick test:

1 Like