We announce the release of GMLStenciler, an open-source software project for converting Graffiti Markup Language (GML) drawings into vector-art stencils suitable for laser cutting. This free tool solves the problem of transforming GML’s widthless linear strokes into adjustably-thickened stencil patterns with automatically bridged islands. GMLStenciler is built in openFrameworks, an open-source C++ toolkit for creative coding; it can be downloaded below (with complete source code) for Windows and Mac OSX.
In January 2010 the F.A.T. Lab released a suite of XML specifications and open-source tools for recording and displaying handwritten marks, which they named Graffiti Markup Language (GML). Their flagship system is the Graffiti Analysis software by Chris Sugrue and Evan Roth, which allows GML drawings to be recorded with an iPhone, uploaded to an online database, and freely shared at the #000000book.com website. Users of Graffiti Analysis have contributed some 17,500 tags to date. As with our Robotagger project, the GMLStenciler software presented here offers a means by which these virtual handwritten marks can be given physical form, made multiple, and economically disseminated at a variety of scales.
The Graffiti Markup Language specification defines a “tag” as a sequence of linear “strokes”, each consisting of a sequence of timestamped (x,y) points. These strokes lack a width or thickness; as a result, it is not possible to stencil raw GML tags directly. GMLStenciler solves this by providing a tool in which:
● The user imports a GML file, such as this one from 000000book.com:
● An interface is provided by which the user can select an adjustable thickness for rendering the tag’s strokes. Using OpenCV, the system then automatically detects “holes” in the rendered tag (such as would be produced by the closed counters within characters like A, B, D, O, P, Q, R, etc.). These holes are problematic for stencils because they form loose “islands” that, left unbridged, would disappear from the final stenciled design.
● The user can select one of several methods by which these holes will be automatically bridged. Options for this operation include: bridging at the top point of each counter, bridging at the nearest point to the counter’s enclosing stroke, etc. Because GMLStenciler bridges holes recursively, strokes with complex nested structures or holes-inside-of-holes (as in the symbols ®, ◎, ©, ʘ, etc.) are still bridged successfully:
● The user can export the stencil design as an EPS (Encapsulated PostScript) vector file. (Here’s a raw example output file created by GMLStenciler.) Optionally, this EPS file can be loaded into CAD programs or vector art editors like Illustrator or CorelDraw for further editing:
● The EPS file can then be used as the pattern for cutting a stencil on a laser cutter, vinyl cutter, water-jet cutter, CNC router, or other computer-controlled cutting machine. Laser cutting services are widely available in many cities, and are also increasingly common in regional hacker spaces and university art, architecture and design departments. Below, the stencil has just been cut from 1/8″ MDF (20″x16″, about $3) on a 40-watt Epilog laser cutter; cutting time was under 2 minutes. For very large stencils, I recommend using a CNC router, many of which can accommodate materials up to 5’x10′.
These stencils can then be used in a variety of ways. One interesting potential use for such stencils is so-called cleanfitti or reverse graffiti (also known as clean tagging, dust tagging, or grime writing), in which the stencil is used as a frisket for dirt removal.
The GMLStenciler can be downloaded here:
- GMLStenciler_1.00_mac.zip [20MB] Includes app and source, as an openFrameworks v0.061 project for MacOSX 10.6.3 / XCode. This zip includes all necessary (ofx) addons, but developers wishing to recompile this will still need to download the openFrameworks v0.061 library. This slimmer 11MB zip omits standard ofx addons and assumes you already have OF v0.061 working.
- GMLStenciler_0.99_win.zip [21MB] Includes exe and source, as an openFrameworks v0.061 project for WinXP+ with MS VisualStudio 2008. This build currently lags the Mac version very slightly.
- As a Github repository. Developers, note: The most recent version of the source code can be found here.
License and Disclaimer
The GMLStenciler software is licensed under the CC-GNU GPL version 2.0 or later. All Graffiti Analysis related media is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License. Users of GMLStenciler are solely responsible for their activities while using this tool; this site and its author(s) do not condone illegal uses of the GMLStenciler software.
Credits and Acknowledgments
The GMLStenciler software was entirely developed by Charlie, my 15-year-old intern, during June 2010. Charlie (a rising Junior in a Pittsburgh-area high school) has a solid background in Java programming and server-side web scripting, but hadn’t previously worked with C++, OpenGL, OpenCV, or openFrameworks, so this proved to be an ideal learning project. Here’s a photo of Charlie.
Charlie developed GMLStenciler in openFrameworks under the auspices of Golan Levin. GMLStenciler makes use of the Graffiti Markup Language (GML) specification released by the F.A.T. Lab, and includes code developed by Chris Sugrue and Evan Roth for their Graffiti Analysis software. The GMLStenciler also uses the OpenCV open-source computer vision library. Thanks to Kyle McDonald, Jacob Tonski and Solomon Bisker for supporting Charlie with ad hoc coding advice during his internship. Thanks to the STUDIO for Creative Inquiry at Carnegie Mellon University for hosting Charlie, and to the CMU School of Art for the use of its laser cutter. GML “em@il” tag by Evan Roth. Documentation photos by Kyle McDonald.
- “Semi-Automatic Stencil Creation through Error Minimization“. Jonathan Bronson, Penny Rheingans, and Marc Olano. Proceedings of the 6th International Symposium on Non-Photorealistic Animation and Rendering, 2008.
- “A Drawing Editor for Stencil Design” [ステンシルデザインのためのドローエディタ]. Yuki Igarashi and Takeo Igarashi. 17th Workshop on Interactive Systems and Software (WISS), 2009.
FAT, GML, GRL, #OF, Free Art and Technology, Graffiti Markup Language, openFrameworks, graffiti research, GML-Stenciler, GMLStenciler, GML-Stenciller, GMLStenciller, free open-source software, source code, software tools, app, laser cutting, laser cutter, rapid prototyping, digital manufacture, pochoir, frisket, stencil, stenciller, stenciler, cut patterns, vector art, vector output, XML, EPS, PDF, CAD, C++, OpenCV, graf, graffiti, grafitti, cleanffiti, cleanfitti, inverse graffiti, reverse graffiti, clean tagging, dust tagging, grime writing, computational design, computer-aided stenciling, automatic stencil creation, automatic stencil generation, hacking, Robotagger, graffiti and automation.
5 Responses to “GML Stenciler: Laser Cut Patterns from Graffiti Markup Language”« Prev post: Rectified Flowers
» Next post: Installing Arduino with Firmata for MaxMSP and Processing in OSX