I realized the spectral mixing of mypaint in krita

Hi @Deevad, I’ve compared the results of the new spectral mix and the new spectral mix seems to keep the hue more intact when mixed with white and the red looks just a purer red without leaning towards magenta


In the middle is the new spectral blend, below is the 8-bit rgb blend

5 Likes

Hello, this looks very interesting! Is it possible to find a test build of Krita with your work, but for windows users, or is it too early to think about it? If “not”, no worries or distractions, I just wanted to be curious.

3 Likes

Of course, I will provide a compiled windows package in a moment

1 Like

Hi all, this is the windows package, the blur brush may not work properly at the moment, but the normal smudge brush should be sufficient, I think the best way to keep the current blending effect is probably to use XSIMD for code optimisation, which may require the help of the official developers to do this; the pixel brush engine brushes need to select the spectral blending mode, the smudge brush needs to be turned on in the brush settings to use the new version of the smudge brush engine, and the spectral blending needs to be under the linear profile to blend the correct colours: Krita


9 Likes

Hey there @urzeye

WOW, what an amazing addition to Krita you are making! THanks a lot for this!
Quick questions as I’m not the most knowledgeable in the coding of stuff, I was wondering if you absolutely have to use a 16 bit profile for the blending to work this way? I think It would be great to have it implemented for 8 bit as well, but I don’t want to push more work on you, it’s already sooo great that you are doing this!
Another thing, I was able to test out your settings thanks for the build you just posted and I was wondering why the colors are not reacting the way your first image shows:
image
From my point of view, this version is the closest to what traditional pigment would look like :smiley: so I was wondering if there was a way to keep it like that? O.o

Thanks again for everything, you are really doing something great!

3 Likes

Thank you for your testing. The first image shows the pigment mixing effect in Artstudio Pro, which I feel is similar to Mixbox. Mixbox uses spectral data of pigments, while the version I built uses spectral data of RGB, which is the effect in the middle of the image. Therefore, it does not shift the color phase when mixed with white. Spectral mixing can work in 8 bits, but the most important thing now is to optimize performance, because there is a performance loss between converting from linear to nonlinear, I have basically done what I can because I am not a professional developer, and subsequent optimizations may require the official developers of krita to complete

3 Likes

However, the principle of Mixbox and SpectralMix is the same. As long as there is corresponding data, corresponding effects can be mixed. In the future, people can even choose the desired mixing effect from various mixtures, such as pigment mixing, spectral mixing, or other artificially made mixtures

4 Likes

Now there is corresponding research that can specify the color mixing effect and calculate the required spectral data: KM finder

3 Likes

Wow, awesome, thanks for your reply :smiley:
Looking forward to the future of your implementation :D!

3 Likes

This is amazing! Finally I can paint with 50% transparency and the inbetweens don’t look like cr%p:

A real life-changer. :face_holding_back_tears:

I only need the pixel engine, so it’s ok as it is for me. :slight_smile:

Thank you :pray:

6 Likes

And it’s even better than mixbox:


(The color on the brush is the same in all three samples above)

4 Likes

To be honest you can not really compare my spectral rendering library with Mixbox.
On this perticular color it may look better.

3 Likes

I think you’re being too modest man. Your system is better. First, it has no hue distortion:
immagine

and the transparent intermediates seem more saturated. And it creates better edges:
immagine

7 Likes

Good demo @urzeye :+1: It looks good.

@Wavenwater : the first version (top in the fig.) is more dramatic, sure, and probably appealing to the eye at a first glance, but also a caricature. Look closer how the orange has a value that’s … ‘glowing’. It’s even more dramatic on a color-calibrated display. No pigment I know (gouache/acrylic/oil) reacts this way. And we are speaking of pigment here flowing within a neutral mixture, not about how some random inks/watercolor or wash of oil that might have sometimes large hue variations with chemical reactions depending on the acidity of the paper/canvas, and chemical reaction due to mixing of water/spirits/petrol/bleach/oils/etc…

3 Likes

Yes, I also prefer SpectralMix to Mixbox

1 Like

Currently if you need to use it in 8-bit you can set it up like this, although it may not work very well some of the time

2 Likes

Woah! This is dope, can’t wait to test this out! :kikiexcited:

2 Likes

Hello, if you are a Windows user, you can download the test package using the link I provided in the reply above

2 Likes

It’s amazing!

13 Likes

Thanks for the inspiration, I used KM finder to simulate the new spectral curve which contains K and S. If I find a way to convert K and S to spectra, I might be able to use them

Here are the training results, I feel great:

3 Likes