Bug 370246 - Random pattern offset is constant
Summary: Random pattern offset is constant
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: 3.0.1
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL: https://youtu.be/IYaE6XMLa9U
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-07 12:20 UTC by Luis Payano
Modified: 2016-10-09 11:25 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luis Payano 2016-10-07 12:20:38 UTC
I was trying to use this as an alternative to dual brush for randomness in each stroke, but it seems to increase a very small, fixed amount of pixels instead at the moment...

Video demonstration:

https://youtu.be/IYaE6XMLa9U

Reproducible: Always

Steps to Reproduce:
1.Turn on pattern option on preset
2.Select random offset on vertical/horizontal 
3.Do multiple brush stroke passes in the same area

Actual Results:  
The pattern is applied consistently to the brush stroke whether or not the random offset option is enabled

Expected Results:  
The pattern offset is "refreshed" on every brush stroke, creating an uneven/random texture when combined with the brush tip selected for the preset.

Using windows 7, krita 3.0.1.1
Comment 1 Halla Rempt 2016-10-07 13:15:40 UTC
Hi Luis,

I think I can go further and confirm that the random offset property is not used at all. I'm not even sure what the range for the random offset should be... I'll hide the checkboxes for now, and make a phabricator task to discuss the issue.

https://phabricator.kde.org/T3968
Comment 2 Halla Rempt 2016-10-07 13:18:01 UTC
Git commit 81e6fa9e6f24f5e89d981e9f7f104890bbc0c990 by Boudewijn Rempt.
Committed on 07/10/2016 at 13:17.
Pushed by rempt into branch 'master'.

Hide the random offset checkboxes

The random offset feature is not implemented
See also https://phabricator.kde.org/T3968

A  +19   -0    3rdparty/ext_pyqt/CMakeLists.txt
M  +3    -1    plugins/paintops/libpaintop/kis_texture_option.cpp

http://commits.kde.org/krita/81e6fa9e6f24f5e89d981e9f7f104890bbc0c990
Comment 3 Halla Rempt 2016-10-07 14:16:01 UTC
Git commit 72e51771f5681fbf86ac4cac6f1eb5c8033dc832 by Boudewijn Rempt.
Committed on 07/10/2016 at 14:15.
Pushed by rempt into branch 'master'.

Use KisRandomSource for the random texture offset feature

M  +23   -30   libs/image/brushengine/kis_paintop_settings.cpp
M  +12   -9    libs/image/brushengine/kis_paintop_settings.h
M  +14   -14   plugins/paintops/libpaintop/kis_texture_option.cpp

http://commits.kde.org/krita/72e51771f5681fbf86ac4cac6f1eb5c8033dc832
Comment 4 Halla Rempt 2016-10-09 11:25:34 UTC
Git commit 2c0bc2a25f793b7773af271a5d0695794b0d49d0 by Boudewijn Rempt.
Committed on 09/10/2016 at 11:20.
Pushed by rempt into branch 'master'.

Fix the randomness of KisRandomSource

The root cause probably was all the places where srand was called,
but after this change, textures are random again. This was a problem
on Windows only, probably because the resolution of time() is too
low. But that's a guess.
Related: bug 345196, bug 363663, bug 367873
Closed phabricator task T3887,T3968

M  +22   -5    libs/image/brushengine/kis_random_source.cpp

http://commits.kde.org/krita/2c0bc2a25f793b7773af271a5d0695794b0d49d0