Bug 312437 - Add a switch to activate "finish stroke" with weighted smoothing
Summary: Add a switch to activate "finish stroke" with weighted smoothing
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: release_blocker
Depends on:
Blocks:
 
Reported: 2012-12-31 16:27 UTC by animtim
Modified: 2013-06-23 17:23 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
'Dynamic-Drawing' Tool bug (96.88 KB, image/jpeg)
2013-02-08 08:59 UTC, David REVOY
Details
preset showing curve related issue (109.25 KB, application/octet-stream)
2013-02-08 13:03 UTC, animtim
Details
another similar preset showing the issue, just wider. (112.86 KB, application/octet-stream)
2013-02-08 13:04 UTC, animtim
Details
screenshot showing the issue (83.50 KB, image/png)
2013-02-08 13:04 UTC, animtim
Details

Note You need to log in before you can comment on or make changes to this bug.
Description animtim 2012-12-31 16:27:27 UTC
With weighted smothing, the line is always delayed, depending on the amount of weight, and so when you release the stylus, the line stops before the last point of the stroke.
With this switch on, when stylus is released, it would finish the stroke from last interpolated position to the last position of the stylus.

Reproducible: Always
Comment 1 Halla Rempt 2012-12-31 16:40:42 UTC
Ack, I can reproduce.
Comment 2 Halla Rempt 2013-01-05 15:48:18 UTC
Git commit 6174471a8c44004aee238795c10e14ab14adef6d by Boudewijn Rempt.
Committed on 05/01/2013 at 16:48.
Pushed by rempt into branch 'master'.

Draw the line to the last cursor position when using weighted smoothing

However, the last bit isn't drawns with weighted smoothing.

M  +6    -1    krita/ui/tool/kis_tool_freehand.cc
M  +1    -3    krita/ui/tool/kis_tool_freehand_helper.cpp

http://commits.kde.org/calligra/6174471a8c44004aee238795c10e14ab14adef6d
Comment 3 David REVOY 2013-02-08 08:59:47 UTC
Created attachment 77006 [details]
'Dynamic-Drawing' Tool bug

A possible side effect from this feature "finish stroke" with weighted smoothing is it affecting the "paint with brushes using dynamic mouvement" tool.  This bug , making a hook at the end of the line, affect dramatically user who paint with mouse and use this tool for smoothing their line. 

>> [09:44] <valerievk> deevad: anyway, I hope it stops affecting this tool. It's my #1 trick for smooth lineart. xD

To reproduce, follow the instruction in the picture. 

Note: I also think it's the 'continuous drawing following the cursor " bug on recent Windows build. From what I see on screenshot of user , the line follow cursor at the end of the stroke with reducing in pressure sensor.
Comment 4 animtim 2013-02-08 13:01:01 UTC
I've found another issue with the weighted smoothing stroke finish:
-When using a preset with size pressure curve starting above 0 (see attached preset; I found this necessary to get some better ink preset with cleaner stroke end, specially for high res.), the line is "finished" with a linear width that seem equal to this minimum curve point (see screenshot).
This makes very bad looking results, it would need to be extrapolated.

Also about deevad's comment above, yes that's the reason why I asked for a switch to activate or not line finish, as in some case it's desired, and in some other case it's not.
Comment 5 animtim 2013-02-08 13:03:13 UTC
Created attachment 77011 [details]
preset showing curve related issue
Comment 6 animtim 2013-02-08 13:04:11 UTC
Created attachment 77012 [details]
another similar preset showing the issue, just wider.
Comment 7 animtim 2013-02-08 13:04:46 UTC
Created attachment 77013 [details]
screenshot showing the issue
Comment 8 animtim 2013-02-08 13:07:56 UTC
Another suggestion:
It would be good to can choose either:
-no stroke finish at all
-finish stroke without thinning (keep width of the stroke end along line finish)
-finish stroke with thinning
Comment 9 Eiko Yumi 2013-02-17 09:59:40 UTC
A better solution would be to make stroke smoothing temporal (like in MyPaint or popular commercial painting programs like Paint Tool SAI. If the pointer stops, the stroke will eventually reach it) instead of running average/sample-based (works only as long as the pointer moves)
Comment 10 Halla Rempt 2013-06-18 08:50:55 UTC
Well, that would mean a fourth option for smoothing, since the current smoothing system has its own advantages.
Comment 11 Dmitry Kazakov 2013-06-23 17:23:53 UTC
Fixed by commit

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