I realized the spectral mixing of mypaint in krita


I added two new blending modes, over spectral and copy spectral. When krita’s smear brush uses the new algorithm, it can use spectral blending, and mypaint brush is also modified to use spectral blending.

This is the modified part of the code, based on krita5 beta 5:
https://invent.kde.org/killy/krita/-/archive/master/krita-master.zip

23 Likes

Hi

Moving topic to #develop category, better place than #lounge

Can’t access to google link without google account.
Also, for sharing modifications made on Krita’s code, sharing a link to a gitlab or github fork of repository might be better, no? :slight_smile:

Grum999

2 Likes

Sorry, I’m a Chinese, so I don’t have other foreign online disks. I’m not a developer, so I don’t have github or gitlab. I’m uploading the compiled version. There are about 10 minutes left. The network speed is very slow, sorry

This is from the translator

1 Like

Compiled link :
https://drive.google.com/file/d/1xWrhwjtf8FXXF8NuuIGDpFAEVOuiXhCW/view?usp=sharing

2 Likes

Creating an account is fast :wink:
Doing a fork is fast too :slight_smile:

After, using git is another thing :sweat_smile:

But if you want to contribute to Krita’s code, I think you won’t have the choice.
Pinging @tiar and @halla, maybe they can help you better than me about this.

But from china you should be able to access github and gitlab (I think @tysontan is Chinese and use gitlab to contribute to Krita)

Grum999

1 Like

Well, I’ll try

Also I would request @tysontan or @TheTwo to see this thread, they might be able to guide you with a way to contribute from china.

3 Likes

OK, thank you. I’ll ask them for help, too. Thank you

I am familiar with him in private and have discussed this issue many times. However, I don’t know how to use gitlab.
Another problem that hinders us is that certain places are “replacement.” (Replace the original code in some places instead of preparing an interface for switching) This will change the brush effects of other users.
Finally, we are not professional programmers. There are areas worthy of optimization in code structure and performance. Therefore, some professional help is needed.

2 Likes

Krita’s development happens here:

It’s using Gitlab, but it’s probably an individual instance.

How to participate (as my understanding):

  1. Register your account on invent.kde.org
  2. Log in
  3. Go to Graphics / Krita · GitLab
  4. Click “Fork”
  5. Now you can see your fork of Krita under your profile page, which you can commit.
  6. You can create a unique branch for your project, that’s easier to identify.
  7. Make the necessary changes. You can use the WebIDE to edit source code in your web browser.
  8. When you are done, file a Merge Request.

I’m not a developer, I only have limited experience with gitlab to improve i18n stuff (that’s not actual programming). I think in your case, you should contact Krita’s core developers for more info and better cooperation:

5 Likes

If it’s possible, I think it should be a option to do spectral mixing or no spectral mixing in the mypaint brushes. In MyPaint, the option for how much spectral mixing is used is controlled by “Pigment”.

Thank you for this!!!

2 Likes


I try the spectral mixing version and found that color mixed very nicely!!
And there’s a problem that it’s a bit lag ,hope there’s an optimize version later,thanks all guys!!

8 Likes

Thank you for your suggestion, but as the @TheTwo said, we are not professional programmers, so this suggestion may only be implemented with official help

1 Like

OK, thank you. The code has now been submitted by another krita Chinese user

1 Like

Thank you for publishing the code. For the curious, the merge request thread !1249 is here.

6 Likes

You’re welcome. I’ve already submitted it for you, I’ve taught you how to use GIT

3 Likes

I built the branch and tested (disclaimer: built on Kubuntu 20.04LTS, not super fresh for libraries or Qt…).

Unfortunately on my side, all native smudge engine brushes for Krita returned pure black color here (after the activation of the check box). Same for the blending modes.

But it was fine with the Mypaint engine. I tested mainly Mypaint Wet Knife, and the resulting vivid green appearing in the mix was the proof something new was going on. However, it affects the performances very noticeably.

I made a mini screen-recording under:

spectral-mypaint

8 Likes

Thanks for the feedback. I probably know what the problem is, but I still need some tests

3 Likes

Hello, I have fixed the blending mode error and compiled and verified it. You can download the repaired version of the code in the link given at the top

2 Likes

Damn that looks amazing.
Even if it comes down to it I don’t mind isolating sections or something to go faster if it is needed. Like zbrush does to sculpt even tighter meshes.

1 Like