freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freetype-devel] Re: GSOC - Distance Fields


From: Alexei Podtelezhnikov
Subject: Re: [Freetype-devel] Re: GSOC - Distance Fields
Date: Thu, 6 Aug 2020 11:54:11 -0400

Hi Anuj,

> > If I understand correctly, overlaps cause unexpected discontinuity in
> > SDF, which otherwise should not have any. I doubt that detecting and
> > removing contour overlaps is productive. I would rather deal with the
> > discontinuity directly. Perhaps there is a clever way to ignore
> > smaller distances that unexpectedly have an opposite sign. The
> > distance cannot change by more than the grid size. If it does, ignore
> > the offending value.
>
> Yes, overlaps cause discontinuity in both sign and distances. Detecting
> unexpected opposite sign is possible, but the sign may not be opposite.
> In many cases the sign is not flipped (there is no unexpected change
> in sign) and the distances interpolate smoothly, in those cases it becomes
> hard to find the true distances of the point.

I still think that it should be possible to ignore distances that
result in discontinuities. The distance field has to be continuous
from edge to edge, from clamped "infinity" to clamped "infinity", with
continuity defined as not changing by more than a grid size. The signs
are allowed to flip only then crossing line segments (i.e. scanning
the line neighborhood, rather than overriding a previous value). As
you scan a neighborhood for a line and encounter a previously recorded
(not "infinite") value you should override only if it has the same
sign and smaller magnitude.

Can you describe discontinuities with the same sign if I overlook them?

Thank you
Alexei



reply via email to

[Prev in Thread] Current Thread [Next in Thread]