Bug 440742

Summary: Pixel brush engine rotation stuck
Product: [Applications] krita Reporter: Zaryuta <zaryuta>
Component: Brush enginesAssignee: Krita Bugs <krita-bugs-null>
Status: REPORTED ---    
Severity: normal CC: ahab.greybeard, dimula73, wstephenson
Priority: NOR Keywords: triaged
Version First Reported In: 4.4.7   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Image showing draw rate for rotation with/without stylus XY movement

Description Zaryuta 2021-08-08 12:40:35 UTC
SUMMARY
Pixel brush engine rotation stuck

STEPS TO REPRODUCE
1. Create Pixel Brush Engine brush. 
2. Assign stylus rotation to rotation. Tip shape should be not round. Quit to canvas.
3. Rotate the stylus in hands and watch cursor.

OBSERVED RESULT
Brush Cursor rotation stucks in certain positions.

EXPECTED RESULT
Smooth continuous rotation

SOFTWARE/OS VERSIONS
Windows: 4.4.7


ADDITIONAL INFORMATION
Comment 1 Ahab Greybeard 2021-08-10 21:20:27 UTC
It may be that your stylus is not producing a continous and smooth rotation output.

If you have Size controlled by sylus rotation and move the stylus steadily across the tablet while rotating it at a steady rate, what sort of line do you get?
Comment 2 Dmitry Kazakov 2021-08-11 07:55:08 UTC
Ha, Zaryuta!

Could you check two things:

1) Make sure that "Precision" of your brush is set to 5 and "auto precision" option is disabled.
2) What is the model of your tablet? Are you sure you use Rotation, but not "Tilt Angle"? Afaik, real rotation sensor is only available in ArtPen stylises of hi-end Wacom tablets (perhaps my info is outdates). And "Tilt Rotation" in Huion/XP-PEN tablets has problems with non-smooth rotation near vertical and horizontal positions (last tested in 2019, perhaps something has changed since then).
Comment 3 Zaryuta 2021-08-11 08:46:11 UTC
I had found out what setting fixes this behavior! If I uncheck "Share curve across all settings" in the rotation tab, pen rotation behaves normally. I don't know if it's bug or not, but this setting shouldn't be On by default for sure.
Comment 4 Ahab Greybeard 2021-08-11 10:35:20 UTC
Did you have another input enabled for controlling tip rotation in addition to the stylus rotation input?

If you didn't, then this may be a bug.
If you did, it's not a bug, it's a user settings error/misunderstanding.
Comment 5 Zaryuta 2021-08-11 13:31:15 UTC
In the rotation section only "rotation" is checked. All other inputs unchecked
Comment 6 Will Stephenson 2021-12-16 09:25:22 UTC
I can sort of reproduce this with 5.0.0beta5 (0e4b844)
Windows 10
Wacom PTK-440 + Art Pen (with rotation sensor)
"Share curve across all settings" made no difference. 
Only Pen Rotation is assigned to Brush rotation

Comment: When the pen tip is almost not moved at all while rotating the pen, very few draw events are generated. The brush (a 10:1 aspect ratio square edged brush, like a very broad calligraphy marker without fading) therefore generates a many-pointed 'star' or 'asterisk' shape rather than a circle.

Could the cause of this phenomenon and the original report be that the brush only draws when a move event is received. If the stylus only rotates without moving, nothing is drawn, so the brush only draws when a tiny movement is registered? See attached file.
Comment 7 Will Stephenson 2021-12-16 09:26:14 UTC
Created attachment 144594 [details]
Image showing draw rate for rotation with/without stylus XY movement