LayerCode Offers Improved Way to Embed Bar Codes in 3D Prints


Share this Article

In “LayerCode: Optical Barcodes for 3D Printed Shapes,” researchers Henrique Teles Maia, Dingzeu Li, Yuan Yang, and Changxi Zheng have created a tagging scheme called LayerCode. This embedding process tags 3D printed objects with bar codes during production, allowing them to transfer data about parts and objects without affecting the form of the print at all.

LayerCode tags are compatible with FDM 3D printers and SLA-based printers, whether in producing complex or ‘nontrivial’ shapes. This process is an improvement over those in the past, according to the researchers, which may have failed for numerous reasons, but normally due to issues with placement. In this study though, LayerCode was successful 99 percent of the time, with 4,835 shapes tested during this study.

Challenging shapes. LayerCode tags can be embedded and decoded successfully in challenging shapes such as those with holes, thin features, curved surfaces, and branching threads. To our knowledge, no previous optical tagging mechanism can handle these challenging shapes.

As the authors of the research project point out, barcodes are considered by many retailers and manufacturers to be a necessity, but their intrinsic qualities with standard black bars are also somewhat like the structure of layering in 3D printing. In terms of attaching them to the 3D prints, however, that has historically been a difficult process due to the varied, customized geometries of so many objects. LayerCode was developed exactly for those purposes, embedding codes in curved or rounded parts.

As the project began, the research team’s goal was to embed data in the printing layers with ‘robust encoding,’ along with a specific algorithm for encoding information about the object or component. They realized the need for ‘two distinguishable layer types,’ creating a new coding mechanism, along with software and hardware updates for the 3D printers in use.

For printers using up to two materials, layer types were introduced with varying materials. In FDM single material printers, they changed filament deposition height. For SLA printers, they mixed near infrared (NIR) dye into the resin to make a second layer type.

LayerCode tags are deployed in 3D printed objects through two-color printing (a), variable layer heights (d), and near-infrared steganography (g). In the first case (a), the LayerCode tag is visible; in the second (d), the tag is less visible; and in the third (g) it is completely invisible, but still machine-readable. Just like reading a barcode, we capture an image of each object, and our decoding algorithm processes the image to create a decoding graph (b, e, h), from which a linear barcode is recovered (c, f, i). In this case, the corresponding LayerCode bit string reveals a 24-bit code repeated 3 times in (a), a 24-bit code repeated once in (d), and a 12-bit code repeated once in (g).

“Our proposed LayerCode approach features a number of attributes desired for tagging 3D printed objects,” stated the researchers.

These attributes include:

  • Robustness on complex shapes
  • Ease with a conventional camera
  • Compatibility with 3D printers
  • Structural and appearance preservation
  • Object tagging
  • Depth information

As they began printing, testing on all three types of 3D printers, the researchers noted that jobs took from 40 minutes to three hours, based on how complicated the object was.

“When printing with two colors and with variable layer heights, the time costs are comparable to printing without LayerCode tags. For Ember printing with NIR resin, we observed a minor overhead (about 15% to 20% slow-down) because of the extra tray swaps,” stated the researchers. “A remarkable strength of LayerCode tags is the ability to decode even when the object is damaged, thanks to the layer-by-layer printing process that spreads the tag over the entire body of the object.”

The authors also realized that LayerCode tags would be useful in steganography for 3D printing, with a watermark left on each item to deter counterfeiting.

They went on to test the decoding algorithm, using synthetic images from a photorealistic renderer. During the assessment, they realized it was not cost-effective to 3D print each shape from the datasets they created. With one object taking up to an hour to print, virtual rendering would be the better choice, but they stated that it was ‘desirable’ to test their algorithms on the shapes ‘to prepare for the future,’ as they expect greater affordability and speed in 3D printing soon.

With the virtual environment, however, they were able to many 3D printed items from a variety of different angles, giving valuable insight for further development of LayerCode tags. Testing revealed that out of 4,835, only 44 could not be decoded.

Failure cases. Among the 4,835 shapes, 44 shapes cannot be decoded. Here are three challenging failed shapes.

Successfully decoded shapes. A peek into the diversity of tested shapes within our database. Each view presented is correctly decoded by our graph-based algorithm. Shapes with bumpy, shell, thin, curvy, and other challenging properties showcased here are still subject to encoding and decoding by
our LayerCode approach. Three shapes indicated by the stars are discussed in the main text.

 “If an object is completely occluded or poorly illuminated, decoding will fail. The ability to decode also depends on the camera view angle. While as shown in our experiments, LayerCode tags can be correctly read from a wide range of camera angles, there are other view angles (such as those nearly aligned with the printing direction) from which the decoding is prone to failure,” stated the researchers in their conclusion. “Therefore, optimizing for how a shape might be held, seen standing, or made less visible would certainly improve robustness.

“Similarly, since not all angles are equally easy to decode, processing multiple views in parallel to achieve more robust decoding also serves as an exciting avenue for future work.”

While so much of 3D printing innovation still emanates from the home workshops of makers, hackers, and tinkerers around the world, as it becomes more entrenched within important industries, we will see many interesting changes—as with embedding bar codes, other interesting identifiers and retail agents may be in place such as luxury goods authenticity tags or other inventory tracking. What do you think of this news? Let us know your thoughts! Join the discussion of this and other 3D printing topics at

Fabricated pieces carry LayerCode tags made by two-color printing, variable layer heights, and near-infrared resins. LayerCode tags are successfully tested on bumpy, shell, curvy, and otherwise complex geometry.

The 24 bit LayerCode tag embedded in this Zebra-shaped object is repeated twice and reveals shape and related mesh information.

[Source: LayerCode: Optical Barcodes for 3D Printed Shapes]


Share this Article

Recent News

3D Printing News Briefs, April 13, 2024: Robotics, Orthotics, & Hypersonics

Polls of the Week: Are 3D Printed Guns a Threat and Should We Regulate Them?


3D Design

3D Printed Art

3D Printed Food

3D Printed Guns

You May Also Like

3D Printing News Briefs, April 3, 2024: Kickstarter FDM 3D Printer, Artificial Eyes, & More

In 3D Printing News Briefs today, we’re talking about an FDM 3D printer on Kickstarter, advancements in artificial eye creation, and 3D printed solenoids for electromagnets. Then we’ll move on...

Daring AM: The Global Crackdown on 3D Printed Firearms Continues

In the last few years, a surge in police raids uncovering 3D printed guns has led to concerns about their growing association with criminal gangs. Although typically seen as inferior...

3D Printing Ethics: Navigating the Gray Areas of 3D Technology

From crafting custom birthday presents to building life-saving prosthetics, 3D printing has revolutionized how we interact with the physical world. But with great power comes great responsibility, and the democratization...

Poll of the Week: Exciting Topics at Additive Manufacturing Strategies 2024

This week, from February 6-8, the 7th annual Additive Manufacturing Strategies (AMS) event will take place. Produced by and Additive Manufacturing Research (AMR), this is the only 3D printing...