Bug 362445 - Lags while drawing circular shapes (bended lines on Windows!)
Summary: Lags while drawing circular shapes (bended lines on Windows!)
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: 3.0 Beta
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2016-04-28 21:37 UTC by eliotJ
Modified: 2016-06-16 23:00 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Lags while drawing circular shapes.png (199.00 KB, image/png)
2016-04-28 21:39 UTC, eliotJ
Details
test lines with wacom (146.74 KB, image/png)
2016-05-13 11:32 UTC, Raghavendra kamath
Details
attachement showing the jagged lines in krita under arch linux (215.57 KB, image/png)
2016-06-16 18:09 UTC, Raghavendra kamath
Details

Note You need to log in before you can comment on or make changes to this bug.
Description eliotJ 2016-04-28 21:37:48 UTC
I attach screenshot with details.

I used laptop with Windows 7 64bit, NVidia GPU, 4 GB Ram, 2,2 Ghz Dual Core CPU.

I very often use Freehand Brush Tool with Stabilizer and this bug is very annoying for me...

Reproducible: Always
Comment 1 eliotJ 2016-04-28 21:39:13 UTC
Created attachment 98672 [details]
Lags while drawing circular shapes.png
Comment 2 eliotJ 2016-04-30 10:50:02 UTC
In Krita v2.9.10.2ae beta 64bit this bug not appears... It looks like some bad regression... I have remember some very similar artifacts was appear in early versions of Krita 3.0, but it was even without Stabilizer.

This bug makes I need to stay at Krita v2.9.10.2ae beta 64bit.
Comment 3 eliotJ 2016-04-30 13:44:53 UTC
From IRC disscusion about this bug:
"<Floatharr_> eliotJ: yup I get the corners too, not in 2.9 though".
Comment 4 Dmitry Kazakov 2016-05-03 12:20:39 UTC
Hi,
Comment 5 Dmitry Kazakov 2016-05-03 12:21:33 UTC
https://phabricator.kde.org/T2414
Comment 6 eliotJ 2016-05-03 21:22:20 UTC
Upsss... I forgot to mention. I using Wacom Intuos Pro Medium.
Comment 7 Raghavendra kamath 2016-05-13 11:31:59 UTC
I don't get the jagged edges while using the dynamic brush but I get them when using the freehand brush tool. I used exact same settings given by you.

I am also attaching the output

I am using wacom intuos4 medium on windows 10,
I am using the latest builds from kickstarter announcement -> http://files.kde.org/krita/3/windows/devbuilds/krita-3.0-Beta-master-d330a4a-x64.zip

I have nvidia 750ti graphic card
Comment 8 Raghavendra kamath 2016-05-13 11:32:29 UTC
Created attachment 98946 [details]
test lines with wacom
Comment 9 eliotJ 2016-05-15 21:56:04 UTC
Raghavendra kamath <- Thank you for test.

I believe you have more powerful PC than mine and this can explain why yours lines are less bended...
Comment 10 Halla Rempt 2016-05-25 13:06:23 UTC
Is this still the case after 

commit bd46e0aa30c5fded9da44566fcd35f1335a550d1
Author: Dmitry Kazakov <dimula73@gmail.com>
Date:   Tue May 24 13:18:36 2016 +0300

    Remove amortizing from the amortizeExactBounds()
    
?

http://files.kde.org/krita/3/windows/devbuilds/krita-3.0-RC-1-master-76608ad-x64.zip has the fix
Comment 11 eliotJ 2016-05-26 12:58:53 UTC
I have sad news... I tested krita-3.0-RC-1-master-76608ad-x64.zip and I still have bended lines while using Dynamic Brush Tool and Freehand Brush Tool with Stabilizer enabled... :(
Comment 12 eliotJ 2016-05-27 09:30:30 UTC
I noticed that after turning off OpenGL these bended lines are far, far less noticeable ! It looks like it's related to this bug: https://bugs.kde.org/show_bug.cgi?id=360588

I have hope this will be fixed before 3.0 stable release... :)
Comment 13 Dmitry Kazakov 2016-05-27 09:43:51 UTC
Reopened
Comment 14 Dmitry Kazakov 2016-05-30 17:10:12 UTC
Git commit 23cbbf8b73cdd6c24a82ab70c8269df2b69a4ef7 by Dmitry Kazakov.
Committed on 30/05/2016 at 17:09.
Pushed by dkazakov into branch 'master'.

Fix "bended lines" stabilizer problem on Windows

The problem is that on Windows the tablet events are coming in bunches,
not uniformly. Therefore any timing-based smoothing system will not work
out of box.

This patch adds a special class KisStabilizedEventsSampler, that makes
the events uniform. It collects a set of events on a 50ms timeframe and
then distributes it uniformly.

The timeframe size should correlate with the maximum size of the delays
created by the events system. On Windows it is 50ms, on Linux 15-20ms.

The timeframe can be configured with "stabilizerSampleSize" config option.
Ref T2414
CC:kimageshop@kde.org

M  +1    -0    libs/ui/CMakeLists.txt
M  +18   -1    libs/ui/kis_config.cc
M  +4    -0    libs/ui/kis_config.h
M  +6    -0    libs/ui/tests/CMakeLists.txt
A  +64   -0    libs/ui/tests/kis_stabilized_events_sampler_test.cpp     [License: GPL (v2+)]
A  +31   -0    libs/ui/tests/kis_stabilized_events_sampler_test.h     [License: GPL (v2+)]
A  +103  -0    libs/ui/tool/kis_stabilized_events_sampler.cpp     [License: GPL (v2+)]
A  +90   -0    libs/ui/tool/kis_stabilized_events_sampler.h     [License: GPL (v2+)]
M  +42   -28   libs/ui/tool/kis_tool_freehand_helper.cpp

http://commits.kde.org/krita/23cbbf8b73cdd6c24a82ab70c8269df2b69a4ef7
Comment 15 Halla Rempt 2016-05-31 07:35:53 UTC
Git commit da5496d843237daefd214a7849d2cad0f818b43b by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 31/05/2016 at 07:35.
Pushed by rempt into branch 'krita/3.0'.

Fix "bended lines" stabilizer problem on Windows

The problem is that on Windows the tablet events are coming in bunches,
not uniformly. Therefore any timing-based smoothing system will not work
out of box.

This patch adds a special class KisStabilizedEventsSampler, that makes
the events uniform. It collects a set of events on a 50ms timeframe and
then distributes it uniformly.

The timeframe size should correlate with the maximum size of the delays
created by the events system. On Windows it is 50ms, on Linux 15-20ms.

The timeframe can be configured with "stabilizerSampleSize" config option.
Ref T2414
CC:kimageshop@kde.org

M  +1    -0    libs/ui/CMakeLists.txt
M  +18   -1    libs/ui/kis_config.cc
M  +4    -0    libs/ui/kis_config.h
M  +6    -0    libs/ui/tests/CMakeLists.txt
A  +64   -0    libs/ui/tests/kis_stabilized_events_sampler_test.cpp     [License: GPL (v2+)]
A  +31   -0    libs/ui/tests/kis_stabilized_events_sampler_test.h     [License: GPL (v2+)]
A  +103  -0    libs/ui/tool/kis_stabilized_events_sampler.cpp     [License: GPL (v2+)]
A  +90   -0    libs/ui/tool/kis_stabilized_events_sampler.h     [License: GPL (v2+)]
M  +42   -28   libs/ui/tool/kis_tool_freehand_helper.cpp

http://commits.kde.org/krita/da5496d843237daefd214a7849d2cad0f818b43b
Comment 16 eliotJ 2016-06-10 14:21:32 UTC
It looks like fixing this bug generating another: https://bugs.kde.org/show_bug.cgi?id=364183
Comment 17 Raghavendra kamath 2016-06-16 17:50:57 UTC
i tried eliotj's tweaks such as turning of texture buffer in display section of settings and adding "stabilizerSampleSize=20" in kritarc and I don't get the jagged bended lines as for now.

i will test this config in general inking scenarios too.
Comment 18 Raghavendra kamath 2016-06-16 18:09:20 UTC
Created attachment 99537 [details]
attachement showing the jagged lines in krita under arch linux
Comment 19 eliotJ 2016-06-16 23:00:53 UTC
I disscused on the IRC with Raghavendra kamath.

Hmmm... It looks like this bug is more complicated than just Stabilizer... For me this Stabilizer fix + "stabilizerSampleSize=20" in kritarc eliminating these bended lines...

Raghavendra kamath needs also turning off 'Use texture buffer' (like he described above)... For me these texture buffer dosen't do bended lines, but  slow down Canvas navigation, which I reported here https://bugs.kde.org/show_bug.cgi?id=364184

1. Raghavendra kamath using Linux, I using Windows 7 - this bug doesn't be Windows only. Boud said it's true...

2. Imho: Maybe these "stabilizerSampleSize=20" should be default settings...

3. Imho: On the download page of the Krita should be some kind of warning: "If you notice some slow down in performance try turning off 'Display >> Use texture buffer".