Bug 363663 - bad pixel randomness with low density with gaussian or soft mask type
Summary: bad pixel randomness with low density with gaussian or soft mask type
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: 3.0 Release Candidate
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: investigated, regression, triaged
Depends on:
Blocks:
 
Reported: 2016-05-29 11:46 UTC by AfsMax
Modified: 2018-09-15 17:30 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
bug demonstration (41.58 KB, image/png)
2016-05-29 11:48 UTC, AfsMax
Details
can't be reproduced on ubuntu 16.04 (407.44 KB, image/png)
2016-05-29 11:59 UTC, wolthera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description AfsMax 2016-05-29 11:46:33 UTC
Pixel brushes with a low density create very noticeable patterns when the mask type is set to either Gaussian or Soft
It also happens with the Default mask type if the brush is small enough (less than 11 px).
The pattern are the most noticeable with horizontal lines.


Reproducible: Always

Steps to Reproduce:
1.  Choose the Ink_ballpen brush
2. Lower density to 20 % in the brush settings for better visibility of the problem
3. Draw a horizontal line (either freehand or with line tool)

Actual Results:  
The pixels follow a pattern and don't look random at all.

Expected Results:  
Random pixels with no noticeable pattern, like with older Krita version

This is a regression in 3.0 because Krita 2.9.11 doesn't have the problem.

In fact it is a quite recent regression because the First alpha does not have the problem. I tested a few 3.0 krita:
- 1f5cdac (first Alpha) is OK.
- f38b47e is broken.
Comment 1 AfsMax 2016-05-29 11:48:22 UTC
Created attachment 99240 [details]
bug demonstration
Comment 2 wolthera 2016-05-29 11:59:07 UTC
Created attachment 99241 [details]
can't be reproduced on ubuntu 16.04

I can't reproduce this on ubuntu 16.04, with compiled krita git d539a80, not with several settings.

I am not sure what might be going on here.
Comment 3 AfsMax 2016-05-29 12:29:33 UTC
For the initial bug report, I was on Windows 10 with the RC1.

I just saw the new 3.0 version (f0cbffc, is this the final version?) and just gave it a try on Windows AND on Ubuntu 16.04.

I can say that:
- The problem is still present on Windows 10 in f0cbffc
- I can't reproduce on Ubuntu 16.04
Comment 4 Dmitry Kazakov 2016-08-16 15:34:16 UTC
The bug can be reproduced only on Windows and only with the prebuilt packages. My own build (without Vc) works fine. The latest Alpha2 brebuilt .zip package is broken.
Comment 5 Dmitry Kazakov 2016-08-16 15:37:23 UTC
Ok, I might be wrong about Vc. My local branch was at kazakov/memory-optimizations, which is a bit old. Anyway, Alpha2 package is affected.
Comment 6 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 370246, bug 367873
Closed phabricator task T3887,T3968

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

http://commits.kde.org/krita/2c0bc2a25f793b7773af271a5d0695794b0d49d0
Comment 7 AfsMax 2016-11-02 23:14:52 UTC
I still see the problem on the 3.0.91 prebuilt package on Windows 10.
The tag does include the commit (and its revert(?)).

It does not seem to be fixed, despite what the phabricator tasks say (T3887 and T3968).
Comment 8 Andrew Crouthamel 2018-09-15 15:41:13 UTC
I'm unable to reproduce this on Windows in 4.1.1 or git master, could you retest with the latest version?

Application Version: 4.2.0
KDE Plasma Version: 5.13.5
KDE Frameworks Version: 5.50.0
Qt Version: 5.11.1
Comment 9 AfsMax 2018-09-15 17:27:48 UTC
I just retested with several releases. It looks like it is fixed in 4.1.1 .

I can reproduce the bug with release 3.0.92, but not with 3.3.3 nor 4.1.1

Good.
Comment 10 Andrew Crouthamel 2018-09-15 17:30:18 UTC
Great! Let's close this then, since it appears resolved in the latest versions.