Thu Sep 23 02:01:49 CEST 2010
try to make it such that the "fading time*" of the brush is similar to
the previous one, ~50% faster at most. It currently feels like the
brush fades more than twice (maybe trice?) as fast as before, and with
certain rate settings it basically vanishes instantly.
This very fast fading prevented me from smudging with very low
spacing. And this particular brush needs a very low spacing to look
good (contrary to Hatching which needed a big spacing). I'd go as far
as to suggest to make the default spacing just 0.05 .
> What to test before and after applying the patch.
> 1. Edit-> clear to have transparent layer
> 2. draw big red dot somewhere
> 3. smudge from red dot to transparent area in NORMAL mode
> 4. smudge from red dot to transparent area in COPY mode
> 5. smudge from transparent area to red dot in NORMAL mode
> 6. smudge from transparent area to red dot in COPY mode
> 7. Report back
> 8. Have some candies
Did all that, with candies included.
I observed artifacts in both cases.
--Applying the brush on partly-transparent pixels darkened them too
much (consistent with bug report).
--The stroke starts with white pixels inside the red blot when using
the copy composite op, this was bad.
--Problems persist with the copy composite op, there still are white
pixels inside the red blot when the dab resizes mid-stroke (example:
using stylus). (Upside: this problem is fixed when using just the
--New problem with copy composite op: OUTSIDE the red blot, a
completely unexpected black smudge appears. This problem is less
obvious when using a tablet, but completely obvious with the mouse.
--With the normal composite op this works pretty well and as expected.
The small red square inside the stylus stroke using normal composite
op is EXPECTED, this was discussed earlier with Cyrille Berger and
there's some comments on the commits (I think I should have documented
our discussion). To avoid that artifact, simply reduce the spacing
during the stroke.
Trying to make that "artifact" disappear for all cases is very tricky.
We went for a compromise that optimizes speed. Also, this is only
visible when the dab varies size during a stroke (specially when it
grows quickly). Otherwise it is indistinguishable.
I also spotted a silly BUG related to SELECTING composite ops:
--Pick the smudge op.
--Pick the copy composite op.
--Then switch to the pixel brush using the hotkey approach (right
click or middle click of the mouse?).
--You'll see that the copy composite op is selected in practice (paint
with it), you'll also see that the name of the composite op doesn't
appear on the list (it shouldn't be selectable in the first place!).
> What I did: Instead of changing the pixel transparency per pixel, I added
> opacity of the painter that is changed according the rate option.
> It's not exactly the same thing that used to happen -- because you can notice
> that the opacity is raised per pixel when we bitBlit part of the layer data
> with copy painter.
> It solves the problem of mixing transparent pixels to colours.
> It has some blocky effect (also visible before) but that is not important now,
> I will be important when we decide to go this path.
The blocky effect shown in the attachment?. It only happens with the
copy composite op active (I tried normal, overlay, multiply, copy,
darken and lighten).
I think the bug lies probably somewhere around KisPainter or the copy
composite op. I don't think it's inside the smudge op itself.
> Have you got ideas for different solution or what should I test?
> I'm thinking about changing the opacity of the mask pixels maybe?
> I did not managed to test it yet though.
Do anything that preserves the old "fading time" of the brush. And
solves the problems presented here. Also, if you reach a satisfactory
solution, please document the changes in the code (change the part
that describes the algorithm, for example).
* fading time = time it takes for the colors of the brush to become transparent.
-----ATTACHMENTS---- (this e-mail bounced, it was too big, so the
attachments are now links)
More information about the kimageshop