Bug 459066 - Problems with the vertical mirror mode of the multibrush tool
Summary: Problems with the vertical mirror mode of the multibrush tool
Status: RESOLVED INTENTIONAL
Alias: None
Product: krita
Classification: Applications
Component: * Unknown (other bugs)
Version First Reported In: 5.1.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-13 16:39 UTC by filmfanadam
Modified: 2022-09-27 09:32 UTC (History)
2 users (show)

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


Attachments
Image of problem. (13.10 KB, image/png)
2022-09-13 16:39 UTC, filmfanadam
Details
Multibrush with pixel brushes (571.35 KB, video/mp4)
2022-09-27 02:00 UTC, vanyossi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description filmfanadam 2022-09-13 16:39:49 UTC
Created attachment 152031 [details]
Image of problem.

The vertical mirror option for the multibrush tool is not working properly, the lower half of the painted image does not perfectly reflect the top half when both horizontal and vertical are toggled, but each mode works fine on it's own.
Comment 1 Deif Lou 2022-09-13 21:36:17 UTC
This also happens on the right side. I think it is the bottom right quadrant in general.
Comment 2 vanyossi 2022-09-26 19:29:38 UTC
This is intended. Let me explain

Multibrush mirror, will mirror the brush location to the mirrored location on canvas, this does not rotate the brush tip neither copies the values from the brush, just moves the location of the stroke in canvas, effectively making more than one brush. https://docs.krita.org/en/reference_manual/tools/multibrush.html You can see this effect setting your brush tip dispersion as random brush tip or using another brush engine like spray brush.

If you need pixel by pixel perfect mirror, you have to use the mirroring tools https://docs.krita.org/en/user_manual/mirror_tools.html as they work on the pixels drawn and not the location of the brush stroke.
Comment 3 Deif Lou 2022-09-26 19:46:24 UTC
But the provided sample image suggests that the "brush" on the bottom-right has not the same y coordinate as the brush on the bottom-left nor the same x coordinate as the top-right brush. An I think at least those should match.
Comment 4 vanyossi 2022-09-27 02:00:17 UTC
Created attachment 152453 [details]
Multibrush with pixel brushes

Differences probably come at the subpixel level. To check this I did this: Used a pixel "perfect" brush (Pixel Art Fill) at 1px size the pixel filled is correctly mirrored in all modes. However "Basic-5 Pixel" at 1px gives little variations. To me this is expected as each dab is a different brush. However I will look at the code tomorrow.

Attached video shows coordinates are the same at the pixel coordinate level. Doing the same test without sharpness (using subpixel) will produce little differences.
Comment 5 Deif Lou 2022-09-27 06:16:50 UTC
My intuition tells me that the top-right and bottom-right dabs should have the same x coordinate, so even if the coords are subpixel and the dabs pixels may not be exactly the same, the dabs should align on the left and right. Same with the bottom-left and bottom right dabs but in the y coordinate.

When I checked the code I couldn't see anything wrong with the transformations in the tool to be honest, so I don't know were else to look.
Comment 6 Deif Lou 2022-09-27 09:32:57 UTC
It seems to happen only with brush sizes < 10.