Bug 425124

Summary: On the scratchpad, brush presets utilizing the speed sensor often aren't drawn accurately
Product: [Applications] krita Reporter: tomtomtomreportingin
Component: UsabilityAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: ahab.greybeard
Priority: NOR    
Version: 4.3.0   
Target Milestone: ---   
Platform: Appimage   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: An s-curve on the scratchpad and an s-curve on the canvas

Description tomtomtomreportingin 2020-08-07 20:12:21 UTC
Created attachment 130717 [details]
An s-curve on the scratchpad and an s-curve on the canvas

SUMMARY
Brush presets that use the speed sensor, most noticeably for Size, will often be conveyed inaccurately on the scratchpad compared to the canvas. 

STEPS TO REPRODUCE
1. Select Ink-3_Gpen
2. Open brush settings
3. Select Size
4. Select Speed
5. Disable "Share curve across all settings", enable Speed, select the last curve preset
6. Draw S-curves in scratchpad, observe extremely thin curves
7. Draw S-curves in canvas, observe curves of more sensible thickness

OBSERVED RESULT
Strokes applying the speed sensor in scratchpad produce noticeably different results from canvas. See attachment.

EXPECTED RESULT
The results of the scratchpad should translate more accurately into the canvas.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian sid
(available in About System)
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.12.8 (Appimage)
Comment 1 Ahab Greybeard 2020-08-10 22:26:21 UTC
It does look like the detected speed on the scratchpad is noticably higher than on the canvas.
It's difficult to quantify this because it's difficult to manually draw at any given speed, to repeat a particular speed or even know what the speed is.

In addition, I believe that the detected speed signal is scaled too low and requires inconveniently high speeds to cover the full range of the transfer curve.
This has been noted in:
https://bugs.kde.org/show_bug.cgi?id=421098
Comment 2 tomtomtomreportingin 2020-08-11 00:15:54 UTC
(In reply to Ahab Greybeard from comment #1)
> It does look like the detected speed on the scratchpad is noticably higher
> than on the canvas.
> It's difficult to quantify this because it's difficult to manually draw at
> any given speed, to repeat a particular speed or even know what the speed is.
> 
> In addition, I believe that the detected speed signal is scaled too low and
> requires inconveniently high speeds to cover the full range of the transfer
> curve.
> This has been noted in:
> https://bugs.kde.org/show_bug.cgi?id=421098

Thanks for posting your report, I was unaware of this exact behavior, but it did feel like something was fishy. As you also note in your report, "the Speed is proportional to 'canvases per second'", which I think is likely to be related to this issue.
Comment 3 Dmitry Kazakov 2021-09-16 12:03:07 UTC
Git commit 2a73cb69e7c87bed459cf0dac655e960a4473a98 by Dmitry Kazakov.
Committed on 08/09/2021 at 12:07.
Pushed by dkazakov into branch 'master'.

Fix scaling of the speed sensor in the scratch pad

The speed sensor is calcualted in the "view" pixels, therefore
KisPaintingInformationBuilder should know about that.

M  +22   -1    libs/ui/widgets/kis_scratch_pad.cpp
M  +2    -0    libs/ui/widgets/kis_scratch_pad.h

https://invent.kde.org/graphics/krita/commit/2a73cb69e7c87bed459cf0dac655e960a4473a98
Comment 4 Dmitry Kazakov 2021-09-16 12:03:15 UTC
Git commit ab86de9eae5605ae065c42cd250d480b03b40ec2 by Dmitry Kazakov.
Committed on 08/09/2021 at 12:07.
Pushed by dkazakov into branch 'master'.

Fix artifacts in speed sensor in the Scratch Pad

There is still some scaling issue, the values in the scratchpad are
much higher than on the canvas.

M  +5    -0    libs/ui/tool/kis_painting_information_builder.cpp
M  +2    -0    libs/ui/tool/kis_painting_information_builder.h
M  +1    -0    libs/ui/tool/kis_tool_freehand_helper.cpp

https://invent.kde.org/graphics/krita/commit/ab86de9eae5605ae065c42cd250d480b03b40ec2
Comment 5 Dmitry Kazakov 2021-11-17 14:00:45 UTC
Git commit cbf461ab9de7a7c4d245eda75a2ffbcceee34569 by Dmitry Kazakov.
Committed on 17/11/2021 at 13:47.
Pushed by dkazakov into branch 'krita/5.0'.

Fix scaling of the speed sensor in the scratch pad

The speed sensor is calcualted in the "view" pixels, therefore
KisPaintingInformationBuilder should know about that.

M  +22   -1    libs/ui/widgets/kis_scratch_pad.cpp
M  +2    -0    libs/ui/widgets/kis_scratch_pad.h

https://invent.kde.org/graphics/krita/commit/cbf461ab9de7a7c4d245eda75a2ffbcceee34569
Comment 6 Dmitry Kazakov 2021-11-17 14:00:53 UTC
Git commit d9f33429fc3fa932ff52ef8e575ee2f098c80812 by Dmitry Kazakov.
Committed on 17/11/2021 at 13:47.
Pushed by dkazakov into branch 'krita/5.0'.

Fix artifacts in speed sensor in the Scratch Pad

There is still some scaling issue, the values in the scratchpad are
much higher than on the canvas.

M  +5    -0    libs/ui/tool/kis_painting_information_builder.cpp
M  +2    -0    libs/ui/tool/kis_painting_information_builder.h
M  +1    -0    libs/ui/tool/kis_tool_freehand_helper.cpp

https://invent.kde.org/graphics/krita/commit/d9f33429fc3fa932ff52ef8e575ee2f098c80812