Bug 140582 - Random filter, such as raindrops, recalculates each render
Summary: Random filter, such as raindrops, recalculates each render
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Filters (show other bugs)
Version: git master (please specify the git hash!)
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: LukasT
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-25 02:16 UTC by Clarence Risher
Modified: 2014-03-05 15:57 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Clarence Risher 2007-01-25 02:16:16 UTC
Version:           1.5.2 (using KDE KDE 3.5.5KDE 1.2)
Installed from:    Ubuntu PackagesUbuntu Packages
OS:                Linux

When using an adjustment layer with a filter with random components, such as raindrops (the only example right now, afaik), the random components are re-evaluated every time a lower layer is updated.  For layer visibility toggles, the whole image is re-evaluated, and for modifications such as drawing only the modified areas are re-evaluated*.

This behavior is very undesirable in almost any case that I can think of.

One possible solution would be to store the random seed at the time the layer is created, and re-use it any time the layer is re-rendered, although this would still fail in the case of (hypothetical) filters where the number of random numbers generated is dependent on aspects of the image.

* - this is only true until later, when the whole image will re-evaluate, which means that the current view is inaccurate until a complete redraw occurs.
Comment 1 Halla Rempt 2007-01-25 08:36:16 UTC
We "fixed" this by making the raindrops and oilpaint filters no longer available for use in adjustment layers in later versions of Krita. We may take up the issue in 2.0 again and implement your solution about the random seed.
Comment 2 Halla Rempt 2009-11-20 15:53:46 UTC
I'm not sure whom to assign this to, but it confirmed.
Comment 3 Halla Rempt 2014-02-28 13:26:01 UTC
Git commit 7d7b6cbda09d3420419039cd3068a01275e868b3 by Boudewijn Rempt.
Committed on 28/02/2014 at 13:17.
Pushed by rempt into branch 'calligra/2.8'.

Make the raindrops and oilpaint filter store the seed in the config

And fix the settings widget to take invisible properties
like the seed into account.

M  +11   -4    krita/plugins/filters/oilpaintfilter/kis_oilpaint_filter.cpp
M  +13   -13   krita/plugins/filters/raindropsfilter/kis_raindrops_filter.cpp
M  +1    -1    krita/ui/widgets/kis_filter_selector_widget.cc
M  +19   -14   krita/ui/widgets/kis_multi_integer_filter_widget.cc
M  +6    -8    krita/ui/widgets/kis_multi_integer_filter_widget.h

http://commits.kde.org/calligra/7d7b6cbda09d3420419039cd3068a01275e868b3
Comment 4 Halla Rempt 2014-03-05 15:57:56 UTC
Git commit 2a8c794da3fe3a149d139a908afe98c57e1abd8c by Boudewijn Rempt.
Committed on 28/02/2014 at 13:17.
Pushed by rempt into branch 'master'.

Make the raindrops and oilpaint filter store the seed in the config

And fix the settings widget to take invisible properties
like the seed into account.

Conflicts:
	krita/plugins/filters/oilpaintfilter/kis_oilpaint_filter.cpp

M  +4    -1    krita/plugins/filters/oilpaintfilter/kis_oilpaint_filter.cpp
M  +13   -13   krita/plugins/filters/raindropsfilter/kis_raindrops_filter.cpp
M  +1    -1    krita/ui/widgets/kis_filter_selector_widget.cc
M  +19   -14   krita/ui/widgets/kis_multi_integer_filter_widget.cc
M  +6    -8    krita/ui/widgets/kis_multi_integer_filter_widget.h

http://commits.kde.org/calligra/2a8c794da3fe3a149d139a908afe98c57e1abd8c