LayerCode: Optical Barcodes for 3D Printed Shapes

Henrique Teles Maia, Dingzeyu Li, Yuan Yang, Changxi Zheng

ACM Transactions on Graphics (SIGGRAPH), Paper, 2019

With the advance of personal and customized fabrication techniques, the capability to embed information in physical objects becomes evermore crucial. We present LayerCode, a tagging scheme that embeds a carefully designed barcode pattern in 3D printed objects as a deliberate byproduct of the 3D printing process. The LayerCode concept is inspired by the structural resemblance between the parallel black and white bars of the standard barcode and the universal layer-by-layer approach of 3D printing. We introduce an encoding algorithm that enables the 3D printing layers to carry information without altering the object geometry. We also introduce a decoding algorithm that reads the LayerCode tag of a physical object by just taking a photo. The physical deployment of LayerCode tags is realized on various types of 3D printers, including Fused Deposition Modeling printers as well as Stereolithography based printers. Each offers its own advantages and tradeoffs. We show that LayerCode tags can work on complex, nontrivial shapes, on which all previous tagging mechanisms may fail. To evaluate LayerCode thoroughly, we further stress test it with a large dataset of complex shapes using virtual rendering. Among 4,835 tested shapes, we successfully encode and decode on more than 99% of the shapes.

downloads Paper / Paper (low resolution) / acm
Source Code: Github
Slides: keynote (320MB) / pdf (30MB) / html viewer

We validate our code using a benchmark dataset Thingi10K. We pre-process all 10,000 meshes such that the remaining meshes are printable and thus satisfy the following: After the pre-processing, we have 4968 meshes. We then run IsoStuffer to tetrahedralize all the obj mesh files.

All the obj files can be downloaded here: input obj (1.5GB).

Henrique Maia ( and Dingzeyu Li (

slides quickview


We would like to thank Qingnan Zhou for sharing code to generate the database mosaic, as well as Joni Mici, Bill Miller, and Mohamed Haroun for their assistance with printing. We thank Eitan Grinspun and Oded Stein for their helpful discussions, along with Anne Fleming for proofreading. The authors would also like to thank the anonymous referees for their valuable comments and helpful suggestions. The work is supported in part by the National Science Foundation under Grant No. 1816041 and 1644869.

Related Projects
AirCode: Unobtrusive Physical Tags for Digital Fabrication
Acoustic Voxels: Computational Optimization of Modular Acoustic Filters
FontCode: Embedding Information in Text Documents using Glyph Perturbation

bibtex citation
 author = {Maia, Henrique Teles and Li, Dingzeyu and Yang, Yuan and Zheng, Changxi},
 title = {LayerCode: Optical Barcodes for 3D Printed Shapes},
 journal = {ACM Trans. Graph.},
 issue_date = {July 2019},
 volume = {38},
 number = {4},
 month = jul,
 year = {2019},
 issn = {0730-0301},
 pages = {112:1--112:14},
 articleno = {112},
 numpages = {14},
 url = {},
 doi = {10.1145/3306346.3322960},
 acmid = {3322960},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {3D printing, fabrication, information embedding, physical hyperlinks},