Summary: | Brush softness acts odd when a painted line intersects itself | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Kubuntiac <user581> |
Component: | Brush engines | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | cberger, dimula73, halla, lukast.dev, martinxyz, pentalis |
Priority: | NOR | ||
Version: | git master (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
file demonstrating the effect
Self intersecting , semi-transparent, soft brush line in The Gimp In gimp Right angle in krita demonstration by david revoy of the problem. |
Description
Kubuntiac
2010-09-17 21:15:17 UTC
Created attachment 51803 [details]
file demonstrating the effect
this is probably due to the way the stroke is composited. it takes max(source, dest) instead of adding the colours. so if on a intersecting point there is grey 100 it is overwritten with grey 80 instead of adding it to grey 20.
to change the behavior, change to build up painting mode. i suppose, that this is by design, but i don't really know it.
Yes, this is due to the differences between Wash mode and Build-up mode. Wash mode is supposed to work exactly as described in the report =) I don't pretend to understand the wash / buildup modes, but I am very certain that no artist would expect it to work the way it currently does by default. Surely this is not a good thing... You can compare the results with GIMP. In GIMP the mode is called Incremental. Created attachment 53408 [details]
Self intersecting , semi-transparent, soft brush line in The Gimp
I'm not referring to the name. I'm referring to how lines look when painted. In Gimp they look exactly as I would expect (even if I'd never used Gimp). ie there are no strange white "corners" drawn where a line intersects itself. (Even if those are somehow "expected" by the algorithm). See attached image from the Gimp.
kubuntiac is right. This is the zombie brains effect described by Deevad, too, I think. Ok, should we set build-up mode as default then? Or there is some other way out? Created attachment 53426 [details]
In gimp
It is a tricky problem.
Gimp is basically cheating, instead of "alpha darken" they are using the "normal" blend, and they are using brush with an exponential fade, which allow to still get lines that are soft. But this has significant drawbacks:
1) points and lines have different aspect, this also means the preview of the brush looks significatively different of what it is drawn on the canvas (see the left part of the attachement)
2) the fading of the line is dependent of the spacing (see the right part of the attachement)
3) it is not possible to draw a line with a high amount of fading, this image was made with hardness set at minimum
Created attachment 53428 [details]
Right angle in krita
While in Krita we have choosen to follow the "mathematicaly" correct way. We use "alpha darken" in wash mode (non-incremental), meaning that new color is added only if the pixel has a higher alpha value (and it does some mixing).
This way of doing things fix all drawbacks from the gimp solution. However, it has the drawback of that oddness when line intersects itself.
In the attached image, I have created two lines with a right angle (perfect one), if you use the color picker and follow the individual lines horizontally, and then vertically, you can see that they have equal color value (take a pixel of the horizontal part, then go right horizontally and pick color, untill you arrive at the corner and then go down). This is very interesting, because, if you look at zoom = 100%, you can see the ghost line of David (or the oddness of Kubuntiac), while if you look at the data it looks like a perfect right angle.
To conclude on this, as I said it is a tricky problem, as we can see, both solutions have problems. I am not sure if there is a fix to that problem. A possibility would be to add a new mode for paintop, using the normal paintop instead of alphadarken. But I am also rather convinced that our choice is the reason why people think krita has a more natural drawing than gimp. >But I am also rather convinced that our choice is the
>reason why people think krita has a more natural drawing than gimp.
Why do you think so, which people :) ? I saw people usually compain about our choice, they see it as bug: deevad, Kubuntiac and enkithan.
Maybe adding new mode that mimics MyPaint and GIMP as fix to this bug?
> I saw people usually compain about our choice, they see it as bug: deevad,
> Kubuntiac and enkithan.
yes they complain about the line crossing, do they complain about the other part of the behaviour ?
The effect with the perfect angular line seems to be due to Mach bands: http://en.wikipedia.org/wiki/Mach_bands Or to other optical effects: http://www.michaelbach.de/ot/lum_cobc/index.html http://www.michaelbach.de/ot/lum_diamond/index.html The human body is like a piece of spagetti code programmed by countless different entities. The eyes do some adjustments to the image, then other changes are done as the information transits to the brain, then the brain does the final changes. Sometimes a set of changes undoes the previous changes. Sometimes we see things that the computer knows are not there, but we force the poor computer to render things incorrectly so we can feel peace of mind. Just my 0.02 :) Created attachment 60882 [details]
demonstration by david revoy of the problem.
From Cyrille's conclusion at #comment10 I think we could just add new GIMP-like mode and let the artist decide what he wants in the moment, if he prefers krita's clean style or gimp's cheating mode :) Is this bug fixed now? As far as I'm concerned, yes, but let Bugsbane check Plassy's new code :-) Joy! <3 <3 <3 <3 <3 <3 ! Bugsbane is happy and declares this bug resolved. +1 to good sir Plassy :D |