Bug 325423

Summary: speed dynamic doesn't work
Product: [Applications] krita Reporter: Bollebib <kwadraatnope>
Component: Brush enginesAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: griffinvalley, halla
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Bollebib 2013-09-29 14:23:56 UTC
I'm trying to use the dynamic "speed" in some brushes but it doesn't seem to be doing anything,
the curve doesn't seem to be affecting it


speed is mainly used for pen-like brushes,I think
quick stroke ->thinner line (size)
slow stroke ->thicker line (size)



but it doesn't work.
Comment 1 Halla Rempt 2014-01-04 10:33:36 UTC
Yes, this definitely seems to be broken.
Comment 2 Halla Rempt 2014-01-28 11:27:58 UTC
Right, for 2.8 we'll have to disable it.
Comment 3 wolthera 2014-05-03 15:16:48 UTC
This bug is even worse now that the add-up of sensors actually works! Any brush that has speed ticked, now will barely input anything for that sensor.

I expect a lot of brushes to be broken with 2.9.
Comment 4 wolthera 2014-05-03 15:20:39 UTC
Oh, forgot to add, but this should be useful to know. The speed sensor does work on the calligraphy tool(accessed with the 'thinning' parameter), and the hairy-brush engine(where it's used in 'mouse-pressure').

So there's bits of Krita where the speed-sensor code does work, it just doesn't work in the most important part.
Comment 5 Dmitry Kazakov 2015-06-22 13:27:52 UTC
Git commit f3d76c6c37eb3be3a618eaf890a75586b4f2b9b4 by Dmitry Kazakov.
Committed on 22/06/2015 at 13:26.
Pushed by dkazakov into branch 'calligra/2.9'.

[FEATURE] Make brush 'speed' sensor work

Implemented a complex smoothing algorithm for speed sensor,
which makes Speed work almost perfectly.

The smoothing is two-stage:
1) Calculate the distance of the path connecting last 10 points
   (but not longer than 300px).
2) Divide the distance by time value and smooth the result further
   with 10 previous values
Fixes:T426
CC:kimageshop@kde.org

M  +90   -37   krita/image/brushengine/kis_paint_information.cc
M  +19   -9    krita/image/brushengine/kis_paint_information.h
M  +1    -1    krita/image/tests/kis_paint_information_test.cpp
M  +1    -1    krita/libbrush/kis_auto_brush.cpp
M  +1    -1    krita/libbrush/tests/kis_auto_brush_test.cpp
M  +8    -8    krita/libbrush/tests/kis_brush_test.cpp
M  +3    -3    krita/libbrush/tests/kis_imagepipe_brush_test.cpp
M  +8    -8    krita/plugins/paintops/libpaintop/tests/kis_sensors_test.cpp
M  +1    -0    krita/ui/CMakeLists.txt
M  +28   -2    krita/ui/tool/kis_painting_information_builder.cpp
M  +6    -1    krita/ui/tool/kis_painting_information_builder.h
A  +120  -0    krita/ui/tool/kis_speed_smoother.cpp     [License: GPL (v2+)]
A  +40   -0    krita/ui/tool/kis_speed_smoother.h     [License: GPL (v2+)]
M  +1    -1    krita/ui/tool/kis_tool_freehand.cc

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