[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    Re: Explaining the Scratch Off algorithm of the Hatching brush
From:       JL VT <pentalis () gmail ! com>
Date:       2010-06-19 16:22:14
Message-ID: AANLkTilR1xXRayzcxiV-0lDL-C7xLp-5mhR8qeTsgeqd () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


LukasT wrote:

> > Now, with respect to "boring, very regular" hatching, the current
> algorithm
> > (described in the GUI as trigonometry-algebra) has the problem that lines
> > thicken in incremental mode (opaque background off) and look jagged in
> wash
> > (opaque background on). Part of the jagging comes from the fact that the
> > tips in the borders of the lines look different than the inner parts, so
> > cutting those borders would help; that would have the extra benefit of
> > reducing thickening in incremental mode. But even so, the lines get
> > inherently out of sync when drawn little-chunk by little-chunk instead of
> > all at a time; I am sure that it is due to the rasterization step,
> because
> > I did the algebra carefully, and floating-point calculations aren't THAT
> > imprecise to cause such errors to arise (or are they?).
>
> You might revisit the rasterization code. Maybe try to write some debug
> code
> and see how is our rasterization code behaving and fix the problem, if you
> are
> able. I spent some time on rasterization when I was working on GSoC 2008,
> there were problems with lines so I left the code as it was.
>

I'll try to read that and see if I can do something.
I'm a bit intimidated by touching the existing codebase, as I think I may
break something.
I'm also very slow reading code, as I need to familiarize with many things I
don't know, though I'm getting faster.


>
>
> > I believe the "no jagging and less thickening" benefit is remarkable, it
> > would make the hatching generated look almost as clean if it were made by
> a
> > filter, but it would be generated in real time and directly on the canvas
> > by the user, instead of requiring the user to mount an elaborate set of
> > layers and apply filters on it to get his final result (besides, the
> > GIMP's Newsprint filter isn't too versatile with the hatching, so it
> would
> > take the user many iterations and therefore a great deal of time to
> > achieve areas with different thickness or with crosshatching, using that
> > filter).
>
> > Endnote: with respect to Incremental and Wash: the dialogue the UI offers
> > for choosing between incremental and wash mode has different effects than
> > what I envisioned as the "opaque background" option, that's why I want
> both
> > to coexist. When I link the BrushTip dialogue I'll make a proof of
> concept.
>
> Would you document all those options you have in your paintop in the wiki?
> E.g. I did preliminary docs for spray [1] long time ago (older then
> Internet),
> it's not up-to-date, but you have inspiration.
>
> [1] http://wiki.koffice.org/index.php?title=Paintops/Spray_brush
>
> No problem, I will.

[Attachment #5 (text/html)]

<div class="gmail_quote"><div>LukasT wrote:<br></div><blockquote class="gmail_quote" \
style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); \
padding-left: 1ex;"><div class="im"> &gt; Now, with respect to &quot;boring, very \
regular&quot; hatching, the current algorithm<br> &gt; (described in the GUI as \
trigonometry-algebra) has the problem that lines<br> &gt; thicken in incremental mode \
(opaque background off) and look jagged in wash<br> &gt; (opaque background on). Part \
of the jagging comes from the fact that the<br> &gt; tips in the borders of the lines \
look different than the inner parts, so<br> &gt; cutting those borders would help; \
that would have the extra benefit of<br> &gt; reducing thickening in incremental \
mode. But even so, the lines get<br> &gt; inherently out of sync when drawn \
little-chunk by little-chunk instead of<br> &gt; all at a time; I am sure that it is \
due to the rasterization step, because<br> &gt; I did the algebra carefully, and \
floating-point calculations aren&#39;t THAT<br> &gt; imprecise to cause such errors \
to arise (or are they?).<br> <br>
</div>You might revisit the rasterization code. Maybe try to write some debug \
code<br> and see how is our rasterization code behaving and fix the problem, if you \
are<br> able. I spent some time on rasterization when I was working on GSoC 2008,<br>
there were problems with lines so I left the code as it \
was.<br></blockquote><div><br>I&#39;ll try to read that and see if I can do \
something.<br>I&#39;m a bit intimidated by touching the existing codebase, as I think \
I may break something.<br> I&#39;m also very slow reading code, as I need to \
familiarize with many things I don&#39;t know, though I&#39;m getting faster.<br> \
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; \
border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im"><br>
<br>
&gt; I believe the &quot;no jagging and less thickening&quot; benefit is remarkable, \
it<br> &gt; would make the hatching generated look almost as clean if it were made by \
a<br> &gt; filter, but it would be generated in real time and directly on the \
canvas<br> &gt; by the user, instead of requiring the user to mount an elaborate set \
of<br> &gt; layers and apply filters on it to get his final result (besides, the<br>
&gt; GIMP&#39;s Newsprint filter isn&#39;t too versatile with the hatching, so it \
would<br> &gt; take the user many iterations and therefore a great deal of time \
to<br> &gt; achieve areas with different thickness or with crosshatching, using \
that<br> &gt; filter).<br>
<br>
&gt; Endnote: with respect to Incremental and Wash: the dialogue the UI offers<br>
&gt; for choosing between incremental and wash mode has different effects than<br>
&gt; what I envisioned as the &quot;opaque background&quot; option, that&#39;s why I \
want both<br> &gt; to coexist. When I link the BrushTip dialogue I&#39;ll make a \
proof of concept.<br> <br>
</div>Would you document all those options you have in your paintop in the wiki?<br>
E.g. I did preliminary docs for spray [1] long time ago (older then Internet),<br>
it&#39;s not up-to-date, but you have inspiration.<br>
<br>
[1] <a href="http://wiki.koffice.org/index.php?title=Paintops/Spray_brush" \
target="_blank">http://wiki.koffice.org/index.php?title=Paintops/Spray_brush</a><br><br></blockquote><div>No \
problem, I will.<br></div></div><br>



_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic