Created attachment 111250 [details] [^ screenshot of a discution on the #krita Facebook group] Hi, In Krita 2.x, 3.x serie, a bug allowed the Color-Smudge Engine in 8bit RGB mode to get extra mixing of orange/red in the resulting color on the canvas. It was a glitch and was fixed in Krita 4.x making the Color-Smudge engine ten time more predictable now in this colorspace. While this was a very welcome fix, the bug affecting the previous version was also used as a feature; it was a way to add a bit of color variation in the resulting stroke. That's why I'm opening here a long term wish list feature for a brave soul who want to experiment re-adding color sensors to the code of the Color-Smudge Engine :-) How it could work: ================== Maybe a way could be to add HSV sliders to the brush settings for this engine; so it would be possible to offset the color saturation, lightness and hue in time/pressure/fuzziness. The color affected could be the whole stroke and not only input color (the color selected by the user, as the one used by Color-Rate slider). Because HSV sliders would need to work even for "Blender" presets; the one where there is no Color-rate. New practical possibilities: ============================ - Create a blender preset that mix colors and make them more "greish/muddy" in time. - Create a wet brush with variation of hue in the final mixing, as if a previous color was loaded on the brush and still leak colors in the final mixing. - Create a wet brush that diluate the color to white (high lightness) while moving the hue in the process to simulate painting with bleach on ink (marker/watercolor/fabric). - Convert the Impressionism brush to Color-Smudge engine if the performance allows it.
Created attachment 111258 [details] Diff with attempt. So, I attempted this, but the problem is that for some reason the transform doesn't get deleted properly, leading to crashes. Someone with more knowledge of the brush engines might pick this up, I guess.
Created attachment 111259 [details] Correct patch. Whoops, that one was the old one for the regular pixel brush. >_>
When you say crashes, have you found more than one way to get a crash? I get one immediately when I select a smudge brush. Is that the one you mean? [KCrash Handler] #6 0x00007fe6e8c32b66 in KisColorSmudgeOp::~KisColorSmudgeOp (this=0x7fe64c003890, __in_chrg=<optimized out>) at /home/boud/dev/krita/plugins/paintops/colorsmudge/kis_colorsmudgeop.cpp:117 #7 0x00007fe6e8c32d89 in KisColorSmudgeOp::~KisColorSmudgeOp (this=0x7fe64c003890, __in_chrg=<optimized out>) at /home/boud/dev/krita/plugins/paintops/colorsmudge/kis_colorsmudgeop.cpp:118 #8 0x00007fe711a8e40d in KisPainter::~KisPainter (this=0xdcf6940, __in_chrg=<optimized out>) at /home/boud/dev/krita/libs/image/kis_painter.cc:127 #9 0x00007fe711a8e579 in KisPainter::~KisPainter (this=0xdcf6940, __in_chrg=<optimized out>) at /home/boud/dev/krita/libs/image/kis_painter.cc:131 #10 0x00007fe712f1aad3 in KisFreehandStrokeInfo::~KisFreehandStrokeInfo (this=0xdd268c0, __in_chrg=<optimized out>) at /home/boud/dev/krita/libs/ui/tool/strokes/KisFreehandStrokeInfo.cpp:55 #11 0x00007fe712f180a0 in KisPainterBasedStrokeStrategy::deletePainters (this=this@entry=0xdd2f980) at /home/boud/dev/krita/libs/ui/tool/strokes/kis_painter_based_stroke_strategy.cpp:210 #12 0x00007fe712f1872a in KisPainterBasedStrokeStrategy::finishStrokeCallback (this=0xdd2f980) at /home/boud/dev/krita/libs/ui/tool/strokes/kis_painter_based_stroke_strategy.cpp:341 #13 0x00007fe711c8c6b4 in KisUpdateJobItem::run (this=0x927a3a0) at /home/boud/dev/b-krita/libs/image/../../../krita/libs/image/kis_update_job_item.h:90 #14 0x00007fe708b30172 in QThreadPoolThread::run (this=0xdd2fdc0) at thread/qthreadpool.cpp:101 #15 0x00007fe708b32e0f in QThreadPrivate::start (arg=0xdd2fdc0) at thread/qthread_unix.cpp:376 #16 0x00007fe706f34724 in start_thread () from /lib64/libpthread.so.0 #17 0x00007fe707f24c1d in clone () from /lib64/libc.so.6
Created attachment 111275 [details] Updated diff This is an updated diff that correctly initializes the transform to 0 so there's no crash when selecting a smudge brush. I'm not sure how to test the patch further, though.
Pushed results here: https://phabricator.kde.org/R37:c97a387a4f7ab40d9fbd85a16d75717263eeb1d4
Wolthera, if you need something tested, please come to the Facebook Krita Group and ask there. I am sure you would get a lot of people willing to help you out with testing, especially since this request started there (on at least was talked about there, by David Revoy.) I do mean anything tested not just this patch. Douglas E Knapp