Thanks for taking the time to do the comparison.
I fully agree with you on not releasing this patch with this next "stable"
release. This definitely might need more work and more feedback from users.

I believe to fix a bunch of the brushes (including the glow) all we need is
to also make sure we disable AA only if hardness is also max (1.0). This is
still not the perfect solution though.

Maybe we should create a new slider for enabling/disabling the AA+snapping
(<0.5 is disabled, >=0.5 is enabled) for now while we don't have the
ability to create checkboxes?

On Sun, Dec 16, 2012 at 11:26 AM, Martin Renold <[email protected]> wrote:

> Here is a side-by-side comparison of a coupule of brush strokes:
> http://maxy.homeip.net/misc/mdias-branch.png
>
> Some brushes profit a lot from the new code, like the "delayed" brush
> (rightmost stroke).  The one-pixel snap works for the "1pixel" brush but
> does damage to other brushes, like the "glow" brush (leftmost stroke) and
> the top ink brush looks like a starecase now.  The new anti-aliasing makes
> some brushes more blurry than they used to be, for example the
> "soft-dip-pen" at the top (the one I wrote with).
>
> With the new code, the "delayed" brush can be fixed to work as before. But
> somebody will have to actually do that for all affected brushes, at least
> the obvious regressions should be fixed.  Also, the change of behaviour
> when
> aa is exactly at zero should be mentioned in the tooltip.
>
> Summary: with the current brushes, this change is a mixed thing.  I think
> we
> need more time to re-tune the brushes.  I don't have a good feeling to
> merge
> this last-minute before the release, but let's do it right after.
>
> Regards
> Martin
>
> On Fri, Dec 14, 2012 at 06:15:02PM +0000, Micael wrote:
> > I have spent some time investigating how to put a checkbox on the brush
> > property window, and found that it currently only supports sliders for
> > numeric values, which are inapropriate for the solution I think is best
> > (see my previous post for more info).
> >
> > As such, I have decided to go with David Gowers' solution for now, which
> > seemed simple enough and effective. I have found a lot more difficulties
> > than I thought I would though. Passing new values around the draw
> functions
> > isn't trivial, and a lot of value-copying is happening. I think this
> should
> > be rethought and maybe passing a struct reference/pointer would be
> better.
> > I have however succeeded in doing this.
> >
> > I have rebased my repo to a recent mypaint revision, and applied a new
> > patch that checks for the brush's AA value and enables/disables the AA
> > codepath plus pixel-snapping.
> > This enables the ability to have gapless, pixel-sharp brushes.
> >
> > Please test: https://gitorious.org/~mdias/mypaint/mdiass-mypaint
> >
> > On Sun, Dec 9, 2012 at 5:32 AM, Micael <[email protected]> wrote:
> >
> > > The current AA slider should be renamed to something more appropriate,
> > > like "feather" for example.
> > > Enabling/Disabling the new AA algorithm should be a checkbox, and when
> > > disabled the x/y coords of the dabs should be snapped to pixel centers
> (eg:
> > > "x = floor(x)+0.5"). This would allow for pixel-sharp dabs and it would
> > > perform better than before since it'd also take care of the gappy
> strokes.
> > >
> > > I would do this myself, but I just don't have enough time to
> investigate
> > > how exactly one creates a new widget in the brush settings and pass
> it's
> > > value to the C brushlib up to the "render_dab_mask" function in the
> most
> > > appropriate way.
> > >
> > > This is just my opinion on how things should be.
> > >
> > >
> > > On Sat, Dec 8, 2012 at 5:02 AM, David Gowers <[email protected]> wrote:
> > >
> > >> I have tried your code and I find that it's a great improvement in
> terms
> > >> of consistent thickness for thin lines, whether those lines are hard
> or
> > >> soft edged; it's much more fun and predictable. I actually prefer it
> for
> > >> pixeling, because those 2-pixel-wide dabs constitute a majority of
> the work
> > >> on a pixel piece. The only lack is the inability to paint at a 1px
> detail
> > >> level (again, not only for hard edged brushes; your patches
> effectively
> > >> 'thicken' all <2px brushes to approximately 2px).
> > >>
> > >> IMO the logical way to turn off AA is by checking whether the brush
> > >> 'antialiasing' value is < 0.001. I haven't spotted a fast way to do
> that
> > >> yet.
> > >>
> > >>
> > >>
> > >> On Sat, Dec 8, 2012 at 3:09 PM, Micael <[email protected]> wrote:
> > >>
> > >>> @Martin: The final deltas calculate the difference between the "rr"
> > >>> value at the farthest and nearest positions inside the pixel to get
> an idea
> > >>> of how much should we fade out the pixel. Since this value can be <1
> (but
> > >>> never <0 since rr_far is always >= rr_near), we make it so that it
> will
> > >>> always be >=1, so that the final division will always fade out the
> pixel,
> > >>> instead of fade it in (dividing by >=0 <1). This also makes sure
> that a
> > >>> division by zero will never occur.
> > >>>
> > >>> @David: antialising is all about removing hard edges, and since
> > >>> currently the patch doesn't offer an option to disable the AA
> codepath,
> > >>> it's currently impossible to guarantee "pixel-snapped" edges. At
> most you
> > >>> can guarantee that a dab with diameter of <=1.0 will never occupy
> more than
> > >>> 4 pixels (if painting near a pixel's "vertex").
> > >>>
> > >>> The experimental/1pixel definitely needs a snap-to-pixel-no-aa
> option so
> > >>> that the brush will always paint at a pixel's center, and not go
> through
> > >>> the AA codepath.
> > >>>
> > >>> The AA-attempt code also needs to be fixed to not allow <=0 radius
> dabs.
> > >>>
> > >>> On Fri, Dec 7, 2012 at 9:49 PM, David Gowers <[email protected]>
> wrote:
> > >>>
> > >>>>  >for example "experimental/1pixel" is now
> > >>>> >broader than 1 pixel.  (Not our most important brush.)
> > >>>>
> > >>>> That seems ok as long as it's possible for me to fix it to actually
> be
> > >>>> 1pixel again; or at least that proper hard-edged dab rendering is
> still
> > >>>> possible.
> > >>>>
> > >>>> I'll check out if that is the case ASAP.
> > >>>>
> > >>>>
> > >>>> On Sat, Dec 8, 2012 at 7:22 AM, Martin Renold <[email protected]>
> wrote:
> > >>>>
> > >>>>> hi Micael
> > >>>>> hi David
> > >>>>>
> > >>>>> I think your patch is good now. But it affects existing brushes.
> > >>>>>
> > >>>>> David (or anyone else working on brushes): could you please test
> your
> > >>>>> brushes with this branch?
> > >>>>>
> > >>>>> https://gitorious.org/~mdias/mypaint/mdiass-mypaint/commits/master
> > >>>>> git clone git://gitorious.org/~mdias/mypaint/mdiass-mypaint.git
> > >>>>>
> > >>>>> I would like to know if it's okay to use this for 1.1, or if we
> better
> > >>>>> do it
> > >>>>> after the release, to give more time to check and re-tune brushes.
> > >>>>>  Most
> > >>>>> brushes profit from this change I think, especially dynamic ink
> > >>>>> brushes.
> > >>>>>
> > >>>>> Some are definitively changed, for example "experimental/1pixel"
> is now
> > >>>>> broader than 1 pixel.  (Not our most important brush.)
> > >>>>>
> > >>>>> Some small sharp ink brushes may look a bit blurred now. I have
> > >>>>> noticed this
> > >>>>> with "deevad/soft_dip_pen" from set #2.  Maybe they can be retuned.
> > >>>>>  The
> > >>>>> settings "hardness", "anti-aliasing" and "opacity" are good
> candidates.
> > >>>>>
> > >>>>> --
> > >>>>> Martin Renold
> > >>>>>
> > >>>>> _______________________________________________
> > >>>>> Mypaint-discuss mailing list
> > >>>>> [email protected]
> > >>>>> https://mail.gna.org/listinfo/mypaint-discuss
> > >>>>>
> > >>>>
> > >>>>
> > >>>
> > >>>
> > >>> --
> > >>> Micael Dias
> > >>>
> > >>
> > >>
> > >
> > >
> > > --
> > > Micael Dias
> > >
> >
> >
> >
> > --
> > Micael Dias
>
> --
> Martin Renold
>



-- 
Micael Dias
_______________________________________________
Mypaint-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/mypaint-discuss

Reply via email to