Bug 362136 - Instant preview doesn't work for the spray brush
Summary: Instant preview doesn't work for the spray brush
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Instant Preview (other bugs)
Version First Reported In: git master (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2016-04-23 12:26 UTC by wolthera
Modified: 2016-08-15 09:18 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wolthera 2016-04-23 12:26:22 UTC
It breifly worked, but then it stopped working, I'll attach a video.

Reproducible: Always
Comment 2 Dmitry Kazakov 2016-04-29 08:59:27 UTC
Hi, Wolthera! You mean the same preset worked ok and then stopped working in the same Krita session? I just tried to reproduce it and I guess I cannot do it :(
Comment 3 Dmitry Kazakov 2016-04-29 09:03:09 UTC
Could you probably attach a brush preset with the failing brush? The only problem I see is the spray with very thin drops (<3px), then they get aliased in the preview and become more contrast
Comment 4 wolthera 2016-04-29 09:29:27 UTC
No, not in the same session, in different builds.

Might be user error on my part, that I briefly disabled instad preview to check a bug, and then though it was fixed.

Snyhow, the spray brushes in the sfx pack have this issue https://forum.kde.org/viewtopic.php?f=274&t=125125
Comment 5 Dmitry Kazakov 2016-04-29 13:04:10 UTC
Git commit e1c7211c4d846bb560d5c9c35c2df44bfa5dea49 by Dmitry Kazakov.
Committed on 29/04/2016 at 13:03.
Pushed by dkazakov into branch 'master'.

Fix spray brush when using small drops and LoD

1) The minimum size should be not 1px, buy 1px * lodScale.
   Otherwise huge artifacts appear.

2) The srops should be painted with floating point size, not integer
   one.

Ref T2369

M  +17   -66   plugins/paintops/spray/spray_brush.cpp
M  +3    -3    plugins/paintops/spray/spray_brush.h

http://commits.kde.org/krita/e1c7211c4d846bb560d5c9c35c2df44bfa5dea49
Comment 6 wolthera 2016-05-01 11:41:05 UTC
There's still some mismatch with the cloud brushes from that pack, but the resize issues are fixed. Would you still like to tackle them, dmitry? Or at the least add a start to the instant preview?
Comment 7 Dmitry Kazakov 2016-08-15 09:18:53 UTC
Git commit 5cf22427beabe410851c52e78a906fd44adb2a64 by Dmitry Kazakov.
Committed on 15/08/2016 at 09:18.
Pushed by dkazakov into branch 'master'.

Fix Instant Preview in Spray brushes

We should use KisRandomSource for every random number generation in
the paintop, not the home-grown implementation based on srand.
Fixes T2369

M  +8    -0    libs/image/brushengine/kis_random_source.cpp
M  +5    -0    libs/image/brushengine/kis_random_source.h
M  +0    -1    plugins/paintops/gridbrush/CMakeLists.txt
D  +0    -49   plugins/paintops/gridbrush/random_gauss.cpp
D  +0    -53   plugins/paintops/gridbrush/random_gauss.h
M  +0    -1    plugins/paintops/spray/CMakeLists.txt
D  +0    -49   plugins/paintops/spray/random_gauss.cpp
D  +0    -54   plugins/paintops/spray/random_gauss.h
M  +11   -9    plugins/paintops/spray/spray_brush.cpp
M  +0    -2    plugins/paintops/spray/spray_brush.h

http://commits.kde.org/krita/5cf22427beabe410851c52e78a906fd44adb2a64