“Practical Analytic 2D Signed Distance Field Generation” by Abbas, Doran, Evans and Mendez

  • ©Wasim Abbas, Chris Doran, Rich Evans, and Roberto Lopez Mendez



Entry Number: 68


    Practical Analytic 2D Signed Distance Field Generation



    In this talk, we present a novel technique to generate Signed Distance Fields (SDF) from vector paths. Unlike existing methods, instead of first rasterizing a path to a bitmap and then deriving the SDF, we can calculate the minimum distance for each pixel to the nearest segment directly from a path description comprised of line segments and Bezier curves. Our analytical method differs from previous works by computing distance in a canonical quadratic space. We have tested our code in Skia to accelerate SDF text rendering and we have found that our method is higher quality and more than 70% faster. Higher quality SDFs are achieved by sampling vector data at the SDF resolution required without losing quality to prior rasterization steps.

    In this talk we present our approach and compare it to related work. We describe the algorithm in detail and how it was implemented in Google’s Skia library. We present quality and performance results.


    Chris Green. 2007. Valve. Improved Alpha-Tested Magnification for Vector Textures and Special Effects. http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf.Google Scholar
    Behdad Esfahbod, 2011. Glypy. https://github.com/behdad/glyphy.Google Scholar
    Sarah F. Frisken, Ronald N. Perry, Alyn P. Rockwood, and Thouis R. Jones MERL — Mitsubishi Electric Research LaboratoryGoogle Scholar
    Stefan Gustavson and Robin Strand, 2011. Anti- Aliased Euclidean distance transform.Google Scholar
    Per-Erik Danielsson, 1980. Euclidean distance mapping. In Computer Graphics and Image Processing 14 (1980), 227–248.



    To Sam Martin for reviewing this abstract and Joel Liang for Skia implementation.


ACM Digital Library Publication:

Overview Page: