Paint like color mixing (Kubelka-Munk)

Awesome news, @rvanwijnen! I totally forgot there was a thread for your product. I’m currently using it in my color mixing plugin: Palette Tin so I’m looking forward to the update, thanks for your efforts on this!

This could also look awesome in a watercolor propagator shader!

1 Like

No licensing issues, I build spectral.js myself and released it under the MIT license.
I don’t have the knowledge of Krita to implement it myself, the build that is floating around was just a proof of concept.

3 Likes

I’m looking forward to realistic pigment mixing being incorporated into Krita as standard across all brushes and tools. Is this being worked on at the moment?

2 Likes

Spectral.js 3 has been released.

13 Likes

@rvanwijnen thank you so much for developing spectral. It means soo much to have this feature coming to Krita especially for some of us who don’t have access to apps that charge for features like this. I downloaded the testing build yesterday and been enjoying experimenting with it. Spectral works really and didn’t encounter any major problems except for one thing.
The build crashes when I try to paint on an “opacity locked layer” with the “Brush blend mode” set to spectral.

I hope you can look into it. Thank you once again.

3 Likes

Hi, Unfortunately I’m not familiar enough with the Krita codebase to implement this in the right way.
The version I created was hacky and should only be used for testing.

The code in spectral.js is straight forward and somebody with enough knowledge of Krita could implement a good version.

Sorry I’m away from the project because I’m working at my College final paper, I do trying to implement C#, sorry my terrible english, I know C# and I’m leaning C++ to make this project, I was a advertisement that was made by a beginner so was clunk and bad done.

As a traditional illustrator and a passionate Krita user, I find mind-boggling that after so much discussion and the availability and interest shown by its creator @rvanwijnen, spectral mixing has not yet been implemented in Krita.

That said, I would like to recommend a little known plugin that makes spectral mixing (using the spectral.js library by Ronald van Wijnen) readily available within Krita – Colorplus by @seguso

1 Like

I haven’t followed much what is going on with Krita in the last years. I stumbled over this because I’m also developing some standalone art helper tools also around building and mixing color palettes, so spectral is known to be a good alternative to something like mixbox which is not free.

While I prefer linear rgb mixing when painting as it’s more natural for me and because I’m used to it. There’s no right or wrong, just preference and having more options. Especially for artists working traditional this could be great. Tho all the algorithms for pigment mixing aren’t perfect, it’s always a aproximation.

But as I see it, something like this would be a good “selling point” for Krita for sure. So I’m also surprized it’s not something that’s already in Krita by now.

I would do it myself if I could code c++. Or I would gladly spend some money on the project if someone else would give it a go.

5 Likes

I have good news for you :slight_smile: I implemented realistic color mixing (mixbox clone)

1 Like

@rvanwijnen Mr. van Wijnen, Thank you for your work on implementing spectral mixing to Krita!

The way I understand it, to use your spectral color mixing and spectral.js, do I need to download an alternative version of Krita? (Forgive me, I’m not a programmer, I just draw stuff).
May I ask, why is the windows executable hosted on a Russian site? (Your name appears Dutch?). I must admit I am somewhat hesitant to run a .exe from Russia at the moment :sweat_smile:

I also would like to ask why is this not a part of the official version of Krita at the moment? I don’t know how Git (and Merge request) works, do we know if developers are likely to incorporate your work in Krita anytime soon? (I really hope they do).

Regarding the MyPaint solution (Weighted Geometric Mean); Would it be possible to add this to Krita while developers are figuring out and implementing the Spectral color mixing? (if they are working on that).
In your example picture, you are mixing Blue and Yellow, which (to be fair) is not ideal to get green in real life. You should get a cleaner green color by mixing Cyan and Yellow (though the discussion of true primaries is hotly debated in art communities).

In any case, the MyPaint pigment mixing would be way better than the opacity-based blending currently available. (also, as you mentioned it appears to be less computationally heavy).

I’ve been trying to make a smudge brush with the MyPaint brush engine, by using the field “Change Color Hue”, which is able to simply shift the hue in a clockwise or anti-clockwise direction (on the color wheel).

But I am at a loss because I have to pre-determine if I want it to go clockwise or counterclockwise on the color wheel and more importantly it is very fidgety in terms of smudge length/strength etc. (in relation to surface area and resolution). Also, the hue continues to shift past the background hue, so this really isn’t ideal for mixing colors.
It would be so helpful if this was simply a blending mode that respected the color I’m blending into.