Right now, alpha inheritance breaks when opening a PSD. When Krita opens a PSD file, it should check for clipping layer groups and treat them as alpha inheritance groups in order to preserve compatibility with other programs. (See below.)
ORIGINAL: Hi! I use Krita (version 5.3.1); I hired an artist who uses ProCreate and Clip Studio Paint to deliver me a layered PSD file. However, when I open the file in Krita, it does not recognize alp[ha inheritance on any of the layers. I emailed him and he downloaded Krita, manually turned on alpha inheritance on the appropriate layers, then re-saved it as a PSD…but upon opening that new file in Krita, it still doesn’t recognize any of the alpha inheritance on the file’s layers. Is this a known compatibility issue?
I would assume the problem is because you are not using layer groups. Turning on inheritance/“clipping” does not do much without the specified layers being together in a group first. Basically, instead of this:
Yes, this is an incompatibility. The programs in question and the PSD file format do not support alpha inheritance, they only support clipping groups. Krita is the exact other way round.
You may be able to open the PSD file in Drawpile and then save it again as an ORA file to open in Krita. It will transform the clipping groups into layer groups with alpha inheritance specifically for the sake of compatibility. It also works the other way round as long as you keep the funny names of the layers and don’t construct stuff that clipping groups can’t represent. Depending on what the file contains, you may lose other information though, so your mileage may vary.
Got it, thank you. Is there any reason why the solution you mentioned–“transform[ing] the clipping groups into layer groups with alpha inheritance specifically for the sake of compatibility”–isn’t a default behavior in Krita? Since Krita has no support for clipping groups, detecting them and treating them as alpha inheritance groups when loading a PSD strikes me as kind of a no-brainer for compatibility with other programs.
I guess it’s just because nobody before me thought of it. It’s not really a feature meant for PSD compatibility, I added clipping groups to Drawpile because artists struggled comprehending alpha inheritance and then came up with that hack to make round-tripping ORA files through Krita possible. That it happens to let you “convert” PSD files is a curious side-effect.
It may be something you could contract though. This seems like a good candidate for that kind of thing.
I don’t have the money to hire a private company to add a feature to Krita, if that’s what you’re suggesting–but I’ve edited this post’s tags to change it to a feature request.
Yes, that was the suggestion, since it’d be a good fit for it. Doing it as a public feature request is valid too of course, but you’ll probably want to edit the top post a bit if you want people to actually vote in favor of it and/or get someone interested in contributing the feature, it currently just looks like a question. You yourself can also vote for it, it’s next to the title at the top.
you don’t need hire a company, but you can help us and test my attempts for giving krita a basic clipping capabilities. When it will be fine i want to clean up the code and make a merge request.
latest build is here
psd import/export were added including fix for missing of group opacity export in vanilla Krita.
Nice job–and fast! I just quickly tested it out and it looks like it works beautifully.
Truth be told, I’m not entirely clear on what the difference between alpha inheritance and clipping layer behavior is–I would still expect alpha inheritance in a .kra to be represented as a clipping layer in a .psd–but if I simply use clipping layers in place of alpha inheritance, it makes the program behave as I would expect it to in this build.
Layers with IA use opacity of combined result of all underlying layers inside group as mask.
It doesn’t work for layers outside of group (on the root branch of project)
Filter layers with IA aslo use them as mask and change projection of all layers under it.
group
IA layer
IA layer
layer //this too
layer //this and next layer work as alpha mask for -IA layers above inside this group
layer
layer
background
Usual clipping:
Clipped layers use single (base) layer as mask.
Clipped FILTER layers change only base + clipped layer combined porjection result.
clipped layer
layer //this is base as mask for next clipped layer
clipped layer
clipped layer
layer //this layer is opacity mask for two clipped layers above
layer
background
If you will try to use IA in root branch of project - IA layers just will use projection of whole root layers from background. And this just means it use opacity mask (alpha channel) of background layer.
That’s why you will see nothing changed if you just enable IA in root level - it just use background image and other layers as mask for “clipping”
So:
in PS/SAI/CS/mdiapps/etc:
clipped layer
base layer
in Krita:
group
IA layer
base layer
You just need wrap clipped+base layer stacks in groups.
Simpliest workaround with vanila Krita and PS - mark layers clipped in name and when load in Krita - use Quick Group command for clipped layers + base layer to make fast groups and enable IA on layers which should be clipped to base layers.
Or try to use KPConvert or any other tool/user addons for this.
If they already have krita and use it to convert the file then you can ask them to just give you Krita file. No need to bring psd in between.
Having said that yes better psd compatibility for clipping mask is good.
There was already a merge request for making kra ↔ psd clipping mask compatibility and there was also Merge request for implementing PS style clipping mask.
Yeah; the artist didn’t have Krita to start, and he had been using clipping layers, so that wasn’t an option at first. We did eventually settle on him delivering the art as a .kra once he redid all of the clipping layers via alpha inheritance in Krita, but it would be a lot easier and less confusing for folks using different programs to collaborate if Krita had clipping layer support.
It’s a bit wild to see that someone actually already implemented this more than 3 years ago and it’s just been sitting there unmerged this whole time. Is Krita short on code reviewers?
Wrong interpretation. It was started 3 years ago, but only recently @uvhat took over. He is now trying to resolve all possible problems which comes from adding that clipping mask, as it was never intended to be used , because there is alpha inheritance, which works exactly the same (IMHO). So every filter, mask and effects, which are currently used have to be checked and fixed and that is no easy task.
To make clipping mask work properly there needs to be huge amount changes . The layer styles is also linked to this feature and then there comes the need for backward compatibility so it is not easy task. This is the reason it is taking time. Hopefully it will reach the finish line.