Bug 439188 - Pixel brush and 45 degree lines with line tool creates weird bumps
Summary: Pixel brush and 45 degree lines with line tool creates weird bumps
Status: CONFIRMED
Alias: None
Product: krita
Classification: Applications
Component: Tools (show other bugs)
Version: git master (please specify the git hash!)
Platform: unspecified Unspecified
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-26 15:29 UTC by Alvin Wong
Modified: 2024-08-22 16:39 UTC (History)
2 users (show)

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


Attachments
example of lines with bumps (115.43 KB, image/png)
2021-06-26 15:29 UTC, Alvin Wong
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alvin Wong 2021-06-26 15:29:30 UTC
Created attachment 139674 [details]
example of lines with bumps

SUMMARY

When drawing 45 degree lines with the line tool and the "u) Pixel Art" brush, some lines have weird bumps on them.


STEPS TO REPRODUCE
1. Create a 400 x 400 px image
2. Select line tool and the "u) Pixel Art" brush, set brush size to 4 px
3. Draw 45 degree diagonal lines by holding shift


OBSERVED RESULT

Some lines have weird bumps.


EXPECTED RESULT

These weird bumps shouldn't appear.


ADDITIONAL INFORMATION

Filed for commit c75e336c15
Comment 1 Ralek Kolemios 2021-06-26 17:22:40 UTC
Can confirm this happens on Windows 10 4.4.4-alpha (git cc5d52c)

This bug isn't specific to the line tool, it's rather a quirk of how the brush engine works under the hood. You can try to lower the 'spacing' in the brush tools, but so long as the brush 'updates' are delegated by distance rather than at the pixel level, I believe pixel brushes will always suffer from this unless a pixel-art-specific brush engine is created.
Comment 2 wolthera 2021-09-09 13:25:34 UTC
No idea how we'd solve this though.
Comment 3 Ralek Kolemios 2021-09-11 19:08:58 UTC
(In reply to wolthera from comment #2)

The only solution I can come up with is a new pixel art brush engine.

Each brush position update, calculate if affected pixel's 'center' points are within the circle of the brush, if so, color it in. If not, don't.

I'd image the extremely simplified calculations would allow the spacing to be not only extremely small, but possibly even interpolated even further between updates ensuring there's no gaps like what show up currently.
Comment 4 Dmitry Kazakov 2024-08-22 16:39:38 UTC
Remove triaged keyword from CONFIRMED bugs