Bug 412111 - Brush Editor Rotation parameter has incorrect output scaling displayed
Summary: Brush Editor Rotation parameter has incorrect output scaling displayed
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Usability (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Debian stable Linux
: NOR minor
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-20 09:25 UTC by Ahab Greybeard
Modified: 2020-03-30 21:35 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
The rotation parameter distance input settings (107.53 KB, image/png)
2019-09-20 09:25 UTC, Ahab Greybeard
Details
Demonstration of rotation range vs control input (46.09 KB, image/png)
2019-09-20 09:26 UTC, Ahab Greybeard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ahab Greybeard 2019-09-20 09:25:31 UTC
Created attachment 122754 [details]
The rotation parameter distance input settings

SUMMARY
In the brush editor, the rotation parameter has an output shown on the transfer graph that ranges from -180 degrees to +180 degrees.
This should be shown as 0 degrees to 360 degrees.

I've attached screenshots that show this happening.

STEPS TO REPRODUCE
1. Use the Rotation paramter and expect to get -180 to +180 degrees output as shown on the graph

OBSERVED RESULT
1. Get 0 to 360 degrees output.

EXPECTED RESULT
1. I think that 0 - 360 should be the expectation and that the graph scale should be changed.


SOFTWARE/OS VERSIONS
Krita

 Version: 4.3.0-prealpha (git 02bdc53)
 Languages: en_GB, en
 Hidpi: true

Qt

  Version (compiled): 5.12.5
  Version (loaded): 5.12.5

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 4.19.0-6-amd64
  Pretty Productname: Debian GNU/Linux 10 (buster)
  Product Type: debian
  Product Version: 10
Comment 1 Ahab Greybeard 2019-09-20 09:26:44 UTC
Created attachment 122755 [details]
Demonstration of rotation range vs control input
Comment 2 wolthera 2019-09-21 14:22:56 UTC
Sounds like the maths is wrong?
Comment 3 Ahab Greybeard 2019-09-22 09:42:46 UTC
@Wolthera re. Comment 2

It's a matter of opinion. I think that krita is functioning as it should but is displaying the wrong scale on the graph and so a change should be made to make the graph show 0 - 360 on the vertical scale. It seems 'natural' to me that zero to maximum input should give zero to maximum output (for the default straight line transfer curve) with a parameter that can be observed as a direct physical rotation.

Some people may think that the midway point of the rotation control input should give a zero rotation so that variations of input around that midway point will give a range of -180 to + 180 output variation. In that case the graph scale is correct but the function itself would need to be changed and have a -180 offset added to it.

NOTE: The Hue parameter control also has a vertical scale from -180 to +180 but this function is performed accordingly with midpoint input giving zero hue variation. I think this is correct for this function.
Comment 4 Tiar 2019-09-23 00:30:33 UTC
I would prefer to have changed math so it fits current UI instead of changing the UI to fit the current math. I would like to have 0 in the middle of the graph, instead of the bottom. 

Not only it is more intuitive for me, but in that case also Strength parameter is more reasonable - a default curve will go from -180 to 180 and then Strength of 10% will make it a curve from -18 to 18, while in the other case it would make the rotation go from 0 to 36 degrees, which isn't very useful.
Comment 5 Ahab Greybeard 2019-09-23 08:46:03 UTC
@Tymond re. Comment 4

I'm proposing a change to only the Rotation parameter so I'm confused by your reference to the Strength parameter.
Also, the Strength parameter output ranges from 0% (Weak) to 100% (Strong) and has no angular scaling references.

Additional note: The Masked Brush Rotation parameter has the same characteristic as the main Rotation parameter and so would need the same changes to be made to it.
Comment 6 wolthera 2019-09-23 11:21:26 UTC
What Tiar means is that if you have a full curve, but you only want the brush in question to rotate a little clockwise and counterclockwise per dab, lowering the strength should allow this. If you go from 0 to 360, you can't ask the brush to go a little clockwise and counterclockwise, it will only go into one direction.

So she wants to fix it so the most useful result will be possible.
Comment 7 Ahab Greybeard 2019-09-23 11:58:04 UTC
Ah.  The use of the word 'Strength' confused me because it's the name of a controlled parameter.

Yes, if you want a small deviation from the 'normal' (0 degrees) for rotation on Fuzzy Dab and Fuzzy Stroke then you need a -180 to +180 output range (and a suitably sloped transfer curve/line).
[As is currently performed well, in a similar way, on the Hue parameter characteristic.]

I agree. I have no strong preference and I made the bug report because the current situation and presentation is incorrect.
Comment 8 Dmitry Kazakov 2020-03-13 17:50:45 UTC
The problem is going to be fixed in this MR:
https://invent.kde.org/kde/krita/-/merge_requests/265
Comment 9 Dmitry Kazakov 2020-03-30 21:34:39 UTC
Git commit 25c56ad89e2e3f107ef2cc55541a57cbf4b2fb8c by Dmitry Kazakov.
Committed on 11/03/2020 at 21:00.
Pushed by dkazakov into branch 'master'.

Fix brush rotation option actually work in range -180...180 deg

Previously, all the sensors in Rotation option just added 0...360deg
value to the current brush rotation (even though GUI said the reverse).
This patch fixes the maths to be consistent with the GUI.

WARNING: this patch may change the behavior of exisitng brushes that
connect Rotation or HUE to the pressure level fo the stylus (were
there any?)

M  +5    -1    plugins/paintops/libpaintop/kis_curve_option.h
M  +2    -1    plugins/paintops/libpaintop/kis_pressure_rotation_option.cpp
M  +6    -1    plugins/paintops/libpaintop/sensors/kis_dynamic_sensors.h

https://invent.kde.org/kde/krita/commit/25c56ad89e2e3f107ef2cc55541a57cbf4b2fb8c
Comment 10 Dmitry Kazakov 2020-03-30 21:35:31 UTC
The fix had been merged into master