Hi guys.
I had an idea I’m thinking of for a long time. I feel like it’s big.
It’s a concept for a brush engine.
I’m not a developer, and all I have is a rough idea in pseudo-code.
In real life, when you draw with a pencil, if you use light pressure, the result will be light grey. No matter how much time you will draw over the same area. It will never turn black.
I think a lot of brush developers know that, and that’s the reason a lot of brushes are set by default to make the pressure influence the opacity, instead of the flow.
Its works as long as you draw the whole drawing in one line. When you are done with this line, the next line will be on a new ‘layer’. And where the new line will overlap with the previous line, it will be darker.
Krita tried to solve this problem with the ‘greater’ blend mode. It works if you use one color. When you try something more complicated things start to fall apart.
That’s what’s I tried to solve.
And this is how it goes:
We have two colors. The color the user chose to draw with(AKA target color), and the color of the pixel the user trying to draw on(AKA canvas color). Each one of the colors is made of 4 parameters. RGBA. red, green, blue, alpha.
and we have the input from the tablet (AKA pressure value.
Also, we have the input from the tablet (AKA pressure value). For convenience, let say that it goes from 0.0 where there is no pressure, to 1.0 when there is full pressure.
So when the user draws, the software goes through each one of the RGBA components separately and checks:
If the target red is equal to canvas red =
Do nothing.
If the target red is greater than the canvas red =
If pressure value * target red greater than canvas red =
Apply pressure value * target red to the canvas red.
If pressure value * target red lower than target red =
Do nothing.
If the target red is lower than the canvas red =
If pressure value * (255 - target red) greater than (255 - canvas red) =
Apply 255 - (pressure value * (255 - target red)) to canvas red.
If pressure value * (255 - target red) lower than (255 - canvas red) =
Do nothing.
And repeat this process for the green, blue, and alpha.
Maybe it’s a lot of calculation to ask for every pixel, but maybe not. I’m not a developer.
but if we can optimize the process and make it fast, it can change the digital drawing experience.
I don’t know if its suits Krita developers’ vision. I just want to share my thoughts. and if it will not be implemented in Krita, maybe another developer will want to build some prototype of it. I just really want to use this kind of brush.





