Bug 247363 - fading of generated brush tips is not soft enough and looks less good than in other apps
Summary: fading of generated brush tips is not soft enough and looks less good than in...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-11 12:53 UTC by enkithan
Modified: 2011-10-18 21:19 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
comparison of fading at 0% in different apps (109.12 KB, image/png)
2010-08-11 12:53 UTC, enkithan
Details
comparison with new gaussian mask (140.03 KB, image/png)
2011-10-17 23:33 UTC, Sven Langkamp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description enkithan 2010-08-11 12:53:49 UTC
Created attachment 50005 [details]
comparison of fading at 0% in different apps

Version:           svn trunk (using KDE 4.4.5) 
OS:                Linux

The softness of generated brush tips looks wrong when compared to brush with similar settings in photoshop and gimp. Krita's brush mask seems non-linear and too opaque when the hardness is set to 0%. 
I think gimp's fading is the one that is the best as it has a bigger range of softness. At 50% of fading, it looks like photoshop's 0% fading. That could be useful for importing ABR brushes.

Reproducible: Always
Comment 1 Halla Rempt 2011-05-26 22:19:55 UTC
Can you check whether this is still the case? We had lots of changes there.
Comment 2 LukasT 2011-05-27 11:35:27 UTC
I think we still need to implement besides WASH/BUILD UP new GIMP-compatibile mode. I remember that also Deevad requested this. Nothing was changed in this area.

Also we need to implement PS's flow, but that is probably different bug report.
Comment 3 Halla Rempt 2011-05-27 11:42:25 UTC
We have a different bug for flow already.
Comment 4 Halla Rempt 2011-10-09 11:45:25 UTC

*** This bug has been marked as a duplicate of bug 281364 ***
Comment 5 Geoffry Song 2011-10-16 16:45:50 UTC
I've been working on a new pair of autobrushes that use Gaussian fading functions. They are somewhat slower than the default autobrushes (about 25% to 70% the speed for valueAt) but are much softer and nicer looking, in my opinion. The patch adds a third type of autobrush after "default" and "soft brush" so it is fairly noninvasive. I'll push it when I get home in a few hours.
Comment 6 Adam C 2011-10-16 20:26:30 UTC
do you use a precalculated lookup table for the values of the gaussian curve or a formula?
Comment 7 Geoffry Song 2011-10-16 20:34:52 UTC
Git commit ce6ff0b1c61a5929aea5b545b32c15df96ce45c4 by Geoffry Song.
Committed on 16/10/2011 at 22:32.
Pushed by geoffrysong into branch 'master'.

New autobrush type: Gaussian

The Gaussian autobrushes use a Gaussian blur for their fade, rather than
the linear function used by the default autobrushes. The result is that
the brushes look softer and have less of an edge, as well as having
fewer aliasing issues.

CCBUG:247363

M  +2    -0    krita/image/CMakeLists.txt
M  +17   -7    krita/image/kis_base_mask_generator.cpp
M  +1    -0    krita/image/kis_base_mask_generator.h
A  +84   -0    krita/image/kis_gauss_circle_mask_generator.cpp     [License: GPL (v2+)]
A  +56   -0    krita/image/kis_gauss_circle_mask_generator.h     [License: GPL (v2+)]
A  +83   -0    krita/image/kis_gauss_rect_mask_generator.cpp     [License: GPL (v2+)]
A  +56   -0    krita/image/kis_gauss_rect_mask_generator.h     [License: GPL (v2+)]
M  +3    -0    krita/image/kis_mask_generator.h
M  +2    -2    krita/plugins/paintops/libbrush/kis_auto_brush.cpp
M  +22   -6    krita/plugins/paintops/libpaintop/kis_auto_brush_widget.cpp
M  +1    -0    krita/plugins/paintops/libpaintop/kis_auto_brush_widget.h

http://commits.kde.org/calligra/ce6ff0b1c61a5929aea5b545b32c15df96ce45c4
Comment 8 Geoffry Song 2011-10-16 20:35:03 UTC
a formula, with a few expensive math calls. Using a lookup table would probably improve performance.
Comment 9 Sven Langkamp 2011-10-17 23:33:00 UTC
Created attachment 64655 [details]
comparison with new gaussian mask

I think the new gaussian mask is good enough to consider this bug fixed.
Comment 10 Halla Rempt 2011-10-18 05:23:31 UTC
I agree, we can close the bug. Two points though: using a lookup table for performance would be very nice, as Goffrie notes. And as Lukas said, it might be worth it to add a new mode that's compatible with Gimp's VBR brushes, which also uses gaussian masks, but in a different way (as shown by your screenshot). But we shouldn't replace the new gaussian mode by the gimp mode, since this code looks very compatible to photoshop.

All in all, great work. Goffrie, you have the honor of closing the bug :-)
Comment 11 Geoffry Song 2011-10-18 21:19:15 UTC
Okay :)