Bug 414025 - Jagged lines when canvas is too big and zoom out, it makes impossible to draw a smooth circle
Summary: Jagged lines when canvas is too big and zoom out, it makes impossible to draw...
Status: CONFIRMED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: 4.2.7.1
Platform: macOS (DMG) macOS
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
: 413496 422115 422373 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-11-11 09:17 UTC by Lissette
Modified: 2020-06-19 16:32 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
big circle was made at 50% zoom, smaller circle was done at 200% zoom, and the smallest one at 300% zoom approx. (93.49 KB, image/jpeg)
2019-11-11 09:17 UTC, Lissette
Details
Circles made with canvas acceleration enabled (150.47 KB, image/jpeg)
2019-11-12 08:44 UTC, Lissette
Details
Circles made with canvas acceleration disabled (163.08 KB, image/jpeg)
2019-11-12 08:44 UTC, Lissette
Details
Log for circles made with acceleration on and off (10.93 KB, text/plain)
2019-11-12 08:45 UTC, Lissette
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lissette 2019-11-11 09:17:09 UTC
Created attachment 123838 [details]
big circle was made at 50% zoom, smaller circle was done at 200% zoom, and the smallest one at 300% zoom approx.

SUMMARY
Lines are jagged when canvas is too big and zoom out. It results impossible to draw a circle

STEPS TO REPRODUCE
1. Create a big canvas (2160x2160)
2. Zoom out so you see the whole canvas in the screen
3. Draw a circle (relatively fast), using the notebook trackpad, a mouse or a drawing tablet (I've try with these three and the result is the same - the pen pressure is correctly detected when using the tablet, but the circles are still not smooth, same shape as drawing with the mouse or trackpad)

OBSERVED RESULT
Lines are really jagged, it is impossible to draw a circle, it looks more like a polygon (see image attached, big circle was made at 50% zoom, smaller circle was done at 200% zoom, and the smallest one at 300% zoom)

EXPECTED RESULT
Smooth circle

SOFTWARE/OS VERSIONS
Windows: 
macOS: macOS Mojave (10.14)
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 5.12.5

ADDITIONAL INFORMATION

Krita
 Version: 4.2.7.1
 Languages: en_NZ
 Hidpi: true


Qt
  Version (compiled): 5.12.5
  Version (loaded): 5.12.5


OS Information
  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: darwin
  Kernel Version: 18.7.0
  Pretty Productname: macOS Mojave (10.14)
  Product Type: osx
  Product Version: 10.14

Hardware Information
  GPU Acceleration: desktop
  Memory: 8192 Mb
  Number of Cores: 4

11 Nov 2019 21:40:29 +1300: Created image "Unnamed", 2160 * 2160 pixels, 300 dpi. Color model: 8-bit integer/channel RGB/Alpha (sRGB-elle-V2-srgbtrc.icc). Layers: 2
11 Nov 2019 21:40:29 +1300: Instant Preview Setting: 0
11 Nov 2019 21:40:29 +1300: Disabled smoothing.
11 Nov 2019 21:40:29 +1300: Disabled smoothing.
11 Nov 2019 21:40:29 +1300: Disabled smoothing.
11 Nov 2019 21:40:29 +1300: Instant Preview Setting: 0
11 Nov 2019 21:40:30 +1300: Instant Preview Setting: 0
11 Nov 2019 21:41:42 +1300: Saving Document  as /Users/username/test3.kra (mime: application/x-krita). 2160 * 2160 pixels, 3 layers.  101 frames, 24 framerate. Export configuration: No configuration
11 Nov 2019 21:41:42 +1300: Converting from application/x-krita to application/x-krita. Location: /Users/username/test3.kra. Real location: /Users/username/test3.kra. Batchmode: 0. Configuration: none
11 Nov 2019 21:41:42 +1300: Completed saving /Users/username/test3.kra (mime: application/x-krita). Result: OK
11 Nov 2019 21:42:32 +1300: Closing.
OpenGL Info
 
  Vendor:  "Intel Inc." 
  Renderer:  "Intel(R) HD Graphics 615" 
  Version:  "4.1 INTEL-12.10.14" 
  Shading language:  "4.10" 
  Requested format:  QSurfaceFormat(version 3.2, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CoreProfile) 
  Current format:    QSurfaceFormat(version 4.1, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CoreProfile) 
     Version: 4.1
     Supports deprecated functions false 
     is OpenGL ES: false 


QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsOpenGLES: false 
  isQtPreferOpenGLES: true 
== log ==
 Supported renderers: QFlags(0x2) 
Surface format preference list: 
* QSurfaceFormat(version 3.2, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CoreProfile) 
    2 
Probing format... QSurfaceFormat::DefaultColorSpace 2 
Found format: QSurfaceFormat(version 3.2, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CoreProfile) 
    2
Comment 1 Halla Rempt 2019-11-11 09:19:02 UTC
Do you have any form of smoothing enabled in the freehand tools' brush options?
Comment 2 Halla Rempt 2019-11-11 09:21:15 UTC
Oh, that's in the log, too. Can you check with different forms of smoothing enabled, and with canvas acceleration enabled and disabled?
Comment 3 Lissette 2019-11-12 08:44:07 UTC
Created attachment 123853 [details]
Circles made with canvas acceleration enabled
Comment 4 Lissette 2019-11-12 08:44:38 UTC
Created attachment 123854 [details]
Circles made with canvas acceleration disabled
Comment 5 Lissette 2019-11-12 08:45:38 UTC
Created attachment 123855 [details]
Log for circles made with acceleration on and off
Comment 6 Lissette 2019-11-12 08:46:24 UTC
Hi, thank you for your quick reply. Unfortunately I've tried all combinations with no luck.
I've attached the log and the resulting images for both attempts, with the canvas acceleration enabled and disabled. Each image contains different circles made with the different forms of smoothing and zoom, indicating which combination was used. 
I used my drawing table this time, but it is the same result (in terms of the circle shape) using a mouse or trackpad.
Comment 7 Halla Rempt 2019-11-12 08:48:38 UTC
Weird... Of course, with Apple not properly developing their opengl drivers, some weirdnesses are to be expected, but that shouldn't matter when it comes to zoom levels.
Comment 8 Lissette 2019-11-12 08:56:23 UTC
Yes, weird :( I blame Apple. I've tried Krita in Windows with the same tablet and it works perfect.
I'm still able to use Krita in my macbook, only with a not too big canvas and trying to not making the strokes too fast. It is a bit inconvenient tho. Let me know if I can provide more information that can help.
Thanks!
Comment 9 vanyossi 2019-11-12 16:37:05 UTC
*** Bug 413496 has been marked as a duplicate of this bug. ***
Comment 10 vanyossi 2019-11-12 16:37:49 UTC
Setting this on eto confirmed and as the main report, as it contains some more info.
Comment 11 vanyossi 2020-01-30 21:50:12 UTC
(In reply to Lissette from comment #8)

Hi Lisette, could you test something to try and get better performance (It might or it might not work, but its worth a shot)

- Locate kritarc: on macOS is usually in ~/Library/Preferences/kritarc
- Open with a text editor add "textureSize=4096" as the first line. The number can be any power of 2. preferably anything like 256, 512, 1024, etc)The number upper limit depends on your hardware, on mine the number is somwhere around 10k, however I don't recommend going that higher.
- Save the file
- Start krita.
Inside Krita Preferences, Display, Canvas Graphics acceleration should be on, and select OpenGL


This should make possible to draw on big canvases zommed out. I tested with a 12000 by 12000 canvas at 4% zoom

let me know if that helped
Comment 12 Halla Rempt 2020-01-31 13:36:59 UTC
Maybe we should use a larger tilesize automatically for larger images?
Comment 13 vanyossi 2020-01-31 17:39:17 UTC
Yes, I think that should be the case. Right now the recommended tile size is hardcoded to 256. which is not optimal. Let me work on a patch for this.
Comment 14 vanyossi 2020-02-01 20:41:39 UTC
Related merge request
https://invent.kde.org/kde/krita/merge_requests/234
Comment 15 Lissette 2020-02-23 00:51:54 UTC
Thank you very much! I confirm this fixed the problem for me :)
Comment 16 vanyossi 2020-02-28 04:51:34 UTC
Just note that, the tileSize solution will slow down painting with small brush sizes. If that slowdown is acceptable, then yes, this workaround fixed it for now. :)
Comment 17 vanyossi 2020-06-19 16:31:44 UTC
*** Bug 422373 has been marked as a duplicate of this bug. ***
Comment 18 vanyossi 2020-06-19 16:32:08 UTC
*** Bug 422115 has been marked as a duplicate of this bug. ***