Bug 334538 - (Color Smudge Brush) Smudging behaves inconsistently in different drawing angles
Summary: (Color Smudge Brush) Smudging behaves inconsistently in different drawing angles
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: unspecified
Platform: unspecified Unspecified
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-09 00:36 UTC by hokkeiv
Modified: 2014-07-24 15:41 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hokkeiv 2014-05-09 00:36:46 UTC
Hi Devs,

I found that when smudging with Color Smudge Brush, the fading length of result stroke varied at different drawing angles while the "Smudge Length" value remained constant. This results in inconsistent smudging effect at certain drawing angle during painting.

Both "Smearing" and "Dulling" Smudge mode seemed to have the same issue, although it was less obvious in "Dulling" mode.

The issue became more obvious when larger "Smudge Length" value was set.

- Test with Smudge mode = Smearing, Smudge Length = 0.8, Color Rate =off, all brush dynamics = off:
http://i.imgur.com/ZqDrHk7.png

- Test with Smudge mode = Dulling, Smudge Length = 0.5, Color Rate =off, all brush dynamics = off:
http://i.imgur.com/n6TW5ld.png

- Same test performed with Smudge Tool in GIMP with Rate = 80, all brush dynamics = off:
http://i.imgur.com/3XNW3Wc.png


Reproducible: Always

Steps to Reproduce:
1. Configure Color Smudge Brush with the following settings:
- All brush dynamics disabled
- "Color Rate" disabled
- "Smudge Length" enabled, value = 0.80
- "Smearing" Smudge mode selected
2. Draw a small solid circle in the middle of canvas
3. Smudge outward from the circle's center.
4. Repeat at different directions
Actual Results:  
The result strokes got inconsistent fading lengths which appeared to be relating to the drawing angles.

http://i.imgur.com/ZqDrHk7.png

http://i.imgur.com/n6TW5ld.png


Expected Results:  
Same smudging effect in any drawing angle is expected.

http://i.imgur.com/3XNW3Wc.png
Comment 1 Dmitry Kazakov 2014-05-13 08:16:19 UTC
Hi, hokkiev!

Actually, the term "Smudge Length" is not chosen too correctly. It dosn't do anything with the real distance covered by the brush, it selects how much color information we pick from the previous position of the brush.

If you want to imitate the "Ink depletion" feature, please use "Distance" sensor and connect it to Size and Opacity brush option. In the result you will get the effect you need (at least for the thing you showed in screenshots).
Comment 2 animtim 2014-05-13 12:11:38 UTC
Hi, here I can't reproduce the bug, activating smudge length only with no dynamics at all anywhere, I get same smudge fading result at all angles. I tested on current git master version.

I'm wondering, did you also disable all sensors on Opacity or another parameter ?
Comment 3 hokkeiv 2014-05-17 00:17:37 UTC
Thank you Dmitry and animtim! :)

@Dmitry:

I have tried to followed the instructions to imitate ink depletion and I can get the desired result in the situation stated at my original post. However, the ink depletion settings do not give expected results in more complicated situations. Am I missing something?

When the "Distance" sensors of Opacity and/or Size are enabled, not only the smudging property but the whole stroke is affected. The stroke length and size is then limited by the Distance sensor settings. When the "repeat" options in "Distance" sensors are disabled, drawing a continuous stroke beacomes impossible; drawing continuous stroke is possible when "repeat" options are enabled, but smudging effect now fluctuates at constant intervals. Moreover, when "Color Rate" is also enabled, the color applied to the stroke is also affected by the limited stroke length and/or size.

Thus, Distance sensors in Opacity and/or Size have to be disabled to get more reasonable strokes when setting up smudge or color blending brush (like the Mix_dull or Mix_smear presets), but then the problem of smudging effect stated in the original post returns.

The problem stated in the original post sometimes causes obvious undesired results. The existing content is always moved towards bottom right regardless of stroking direction during smudging. As a result, the content at the left hand side tends to be squeezed, but that at right hand side tends to be spread when smudged. I would expect the movement of color during smudging should be similar to that done by Deform Brush in "Move" mode, that is, color being moved in the same manner all the time.

@animtim

I have tried different stable releases of version 2.8 on Windows 7 Pro x64 and openSUSE 13.1 x64, and the same results obtained.

However, I now understand the "Smudge Length" parameter of Krita's Color Smudge Brush is not equal to the "Rate" of Gimp's Smudge Tool. The actual problem may be that the smudge brush in Krita does not work in the way I expected, rather than there is a specific bug.



Followings are some more tests I performed on the smudge brushes of different software:

Base content to be smudged:
http://i.imgur.com/VxZUWze.png

Test stroke 1:
http://i.imgur.com/QYh2ZEW.png

Test stroke 2:
http://i.imgur.com/blkjVS9.png

Krita's Color Smudge Brush, "Smearing" smudge mode, fixed size, "Distance" controlled opacity with "repeat" option on, "Color Rate" off, test stroke 1
http://i.imgur.com/0Gu2VHE.png

Krita's Color Smudge Brush, "Smearing" smudge mode, fixed size, "Distance" controlled opacity with "repeat" option on, "Color Rate" off, test stroke 2
http://i.imgur.com/lHZM1aI.png

Krita's Color Smudge Brush, "Dulling" smudge mode, fixed size, "Distance" controlled opacity with "repeat" option on, "Color Rate" off, test stroke 1
http://i.imgur.com/JR8imUS.png

Krita's Color Smudge Brush, "Dulling" smudge mode, fixed size, "Distance" controlled opacity with "repeat" option on, "Color Rate" off, test stroke 2
http://i.imgur.com/jwYEvhC.png

Krita's Color Smudge Brush, "Smearing" smudge mode, fixed size, "Distance" controlled opacity with "repeat" option on, "Color Rate" on, test stroke 1
http://i.imgur.com/qNeHjQZ.png

Krita's Color Smudge Brush, "Smearing" smudge mode, fixed size, "Distance" controlled opacity with "repeat" option on, "Color Rate" on, test stroke 2
http://i.imgur.com/5oMtujW.png

Krita's Color Smudge Brush, "Dulling" smudge mode, fixed size, "Distance" controlled opacity with "repeat" option on, "Color Rate" on, test stroke 1
http://i.imgur.com/wNokw7T.png

Krita's Color Smudge Brush, "Dulling" smudge mode, fixed size, "Distance" controlled opacity with "repeat" option on, "Color Rate" on, test stroke 2
http://i.imgur.com/72zBWUf.png

Content is always pushed towards right with smudging in Krita
http://i.imgur.com/6BAbRSv.png

Gimp Painter's Smudge Tool (smearing), fixed size, "Color Blending" off, test stroke 1
http://i.imgur.com/oKO5awk.png

Gimp Painter's Smudge Tool (smearing), fixed size, "Color Blending" off, test stroke 2
http://i.imgur.com/4X6is2P.png

Gimp Painter's Smudge Tool (smearing), fixed size, "Color Blending" on, test stroke 1
http://i.imgur.com/Mrzyaqi.png

Gimp Painter's Smudge Tool (smearing), fixed size, "Color Blending" on, test stroke 2
http://i.imgur.com/2Cqw4lX.png

Clip Studio Paint's Brush Tool with "Mixing ground color" in "Blend" mode (dulling), fixed size, "Amount of Paint" & "Density of Paint" = 0, test stroke 1
http://i.imgur.com/ZjmEzxb.png

Clip Studio Paint's Brush Tool with "Mixing ground color" in "Blend" mode (dulling), fixed size, "Amount of Paint" & "Density of Paint" = 0, test stroke 2
http://i.imgur.com/1uhmNNz.png

Clip Studio Paint's Brush Tool with "Mixing ground color" in "Blend" mode (dulling), fixed size, "Amount of Paint" & "Density of Paint" = 25, test stroke 1
http://i.imgur.com/9oKNEer.png

Clip Studio Paint's Brush Tool with "Mixing ground color" in "Blend" mode (dulling), fixed size, "Amount of Paint" & "Density of Paint" = 25, test stroke 2
http://i.imgur.com/NZumraE.png
Comment 4 Dmitry Kazakov 2014-05-17 15:43:41 UTC
Hi, hokkiev!

Thank you for such extensive report! We have managed to reproduce the bug now. And will try to solve it soon!
Comment 6 Alexey 2014-06-20 06:15:35 UTC
* https://yadi.sk/d/1iwmgY_rUBiNH
Brush 'X1DE' and 'X1DL' in ModularBrushSet — http://vascobasque.wordpress.com/2014/02/03/modular-brushset-v4/

And with default preset without 'ColorRate' — https://yadi.sk/d/inc8YZlxUByAU
Comment 7 Dmitry Kazakov 2014-06-20 10:00:21 UTC
This bug happens on low Spacing values only. So as a workaround you can set spacing to 0.1 for now.
Comment 8 Dmitry Kazakov 2014-06-20 10:18:08 UTC
Git commit f8f4415636f5387daca314fa6d70aaeaf3464f51 by Dmitry Kazakov.
Committed on 20/06/2014 at 10:17.
Pushed by dkazakov into branch 'master'.

Fix anisotropy in Color Smudge brush engine

The offset must be calculated correctly

M  +3    -1    krita/plugins/paintops/colorsmudge/kis_colorsmudgeop.cpp

http://commits.kde.org/calligra/f8f4415636f5387daca314fa6d70aaeaf3464f51
Comment 9 Halla Rempt 2014-07-24 15:41:28 UTC
Git commit cf134320335325e4db93b6f4e215296636e7e233 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 20/06/2014 at 10:17.
Pushed by rempt into branch 'calligra/2.8'.

Fix anisotropy in Color Smudge brush engine

The offset must be calculated correctly

M  +3    -1    krita/plugins/paintops/colorsmudge/kis_colorsmudgeop.cpp

http://commits.kde.org/calligra/cf134320335325e4db93b6f4e215296636e7e233