Bug 458593 - When scaling brush tipsdown , the average value of the tip is not kept
Summary: When scaling brush tipsdown , the average value of the tip is not kept
Status: CONFIRMED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: 5.1.0-RC1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-01 07:38 UTC by rebuilderster
Modified: 2024-08-22 16:38 UTC (History)
3 users (show)

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


Attachments
Example brushstrokes (16.83 KB, image/png)
2022-09-01 07:38 UTC, rebuilderster
Details
screenshot of my attempt at reproduction (194.63 KB, image/png)
2022-09-05 09:22 UTC, Halla Rempt
Details
Demonstration brush (347.75 KB, application/x-krita)
2022-09-13 10:35 UTC, rebuilderster
Details
Screenshot of the rectangle Auto brush tip test with 3.0 auto spacing and 7% flow (7.73 KB, image/png)
2023-04-19 20:48 UTC, Tiar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rebuilderster 2022-09-01 07:38:14 UTC
Created attachment 151753 [details]
Example brushstrokes

SUMMARY
When using a "grungy" brush tip with a lot of texture detail, it is apparent is that the brush behaves very differently at different sizes. Strokes drawn at small brush sizes are fainter than those drawn at large sizes. Using auto brush spacing doesn't seem to help.

My guess would be that the algorithm used to scale brush tips doesn't maintain the average value of the brush tips, and instead ends up lightening the tip when scaling down.

STEPS TO REPRODUCE
1. Create a brush with no opacity, flow etc. dynamics on.
2. Choose a highly textured brush tip, such as "DA_Oil stamp 02"
3. Set flow of the brush to 10%
4: Draw a stroke with a 5 pixel brush and another with a 15 pixel brush

OBSERVED RESULT
The lines are perceivably different in value


EXPECTED RESULT
The lines should be roughly similar in value

ADDITIONAL INFORMATION
I have included a screenshot with examples of the results I get and an example of what I would hope to get, created by scaling a 15-pixel brushstroke down to match a 5 pixel stroke.
Comment 1 Halla Rempt 2022-09-05 09:22:16 UTC
Created attachment 151823 [details]
screenshot of my attempt at reproduction

I cannot reproduce this: this looks like the small line was painting with flow 10%, and the bigger line with flow 100% -- and then the difference is expected. If I paint with flow 10%, both lines are equally grey, with 100%, equally black
Comment 2 Halla Rempt 2022-09-05 09:22:34 UTC
Setting to needsinfo
Comment 3 rebuilderster 2022-09-13 10:35:58 UTC
Created attachment 152019 [details]
Demonstration brush
Comment 4 rebuilderster 2022-09-13 10:36:39 UTC
(In reply to rebuilderster from comment #3)
> Created attachment 152019 [details]
> Demonstration brush

I've added a demonstration brush, this should reproduce the issue if you compare 5 vs 15 px strokes made with this brush.
Comment 5 Halla Rempt 2022-09-13 11:06:29 UTC
Thanks, that's very helpful! I will test this later on.
Comment 6 wolthera 2023-01-19 12:47:20 UTC
I can confirm with the Krita Version: 5.2.0-prealpha (git 5c98a72) Appimage with Qt 5.15.7 and the attached brush bundle. Thanks!
Comment 7 Tiar 2023-04-19 20:48:40 UTC
Created attachment 158219 [details]
Screenshot of the rectangle Auto brush tip test with 3.0 auto spacing and 7% flow

The brush tip's average value is actually correct.

The brush tip's values variance is not - it gets progressively lower (meaning that all pixels are getting closer and closer to the average, meaning some medium grey/half-transparent). However, the fix for the variance doesn't fix this issue (I checked).

The specific issue with this brush is just caused by Auto spacing + very low Flow. If you follow those steps:
1. take the demo brush
2. change the brush tip from "Predefined" to "Auto", then change to black square
3. Paint with it on 5px and 15px.
Result: the same bug, despite no brush tip image being scaled.
4. Change the Spacing from 0.02 to 3. You'll see that in case of 15px, the brush tips overlap, but in case of 5px, there are spaces between them. The objective value of the spacing does get smaller, but not small enough.
Comment 8 Dmitry Kazakov 2024-08-22 16:38:49 UTC
Remove triaged keyword from CONFIRMED bugs