Despite being quite capable of losing to five-year olds at art competitions, I know, even in my painfully limited knowledge about painting that Smudging is a pretty essential tool that all artists use. Krita has an excellent Color-smudge brush module which is again at the core of the brush module.
Now, there are mainly three properties that are usually associated with Smudging :
- Smudge Length : This decides that how long ( in terms of pixels relative to brush size ) do you want the smudging to have effect
- Color Rate : How much the brush’s selected color should affect the whole smudging and how much the background color should affect the smudging
- Smudge Radius : How much radius around the brush ( relative to brush size ) should be considered while calculating the color of the smudging
Now while Krita had the former two properties implemented and well used, the third property “Smudge Radius” was not implemented till now. So after going through this wish
and boud directing me to it, I thought it should be simple enough and started working on it. Initially Bollebib and Wolthera helped me understand what exactly was expected. Also, MyPaint already had a nice implementation of it. Using a code similar to the ColorPicker code currently being used, I was able to formulate a base of the code. So, I was able to start off well.
How ever, the issue was that for ColorPicker, the sample radius being used was upto 9px and here the requirement was much larger. The space requirement for the ColorPicker code was explicitly specified, so I had to work around that so that the code is scalable and the space requirement is not dependent on the radius chosen.
So, after several “Core Dumps” and “Null Pointer Errors” I got a code that worked in minimum space requirement – worked similar to the Color Picker code and was scalable.
Here are the results of that. As you can see, an obvious error that is there is that the colors being smudged are way darker than the expected result. Especially between Purple and Green on the right.
As I have been struggling to maintain my grades at college and my end term examinations were breathing down my neck, I wasn’t able to analyze this rather bizarre error. Now, I am back to tackle this issue with little skill and loads of help from people like DmitryK and David Revoy.
I believe that the issue is that the algorithm that I am using is considering many of the pixels in the area twice. Also, DmitryK pointed out that it probably may be that I am accessing old data on the canvas and should try something else. David also made a 15-minute video explaining exactly what is going wrong with the feature. To check it out, please go to the link listed above.
I guess that’s all for now. As it is, the coding period for GSoC is starting tomorrow. So I am trying to get ready for the project. I started out by clearing out all the unwanted books and empty packets of crisps from my table. Suddenly — my room has a new look !