While most items identified by barcodes are affixed with a printed paper label, direct part marking is a process by which a manufactured part has its identifying barcode printed on it directly and permanently. It's particularly useful in fields wherein parts need to be reliably tracked throughout their life cycles, such as aerospace, automotive, and electronics manufacturers (such as for cell phone parts). This can be done for safety issues, to identify a faulty part after an accident and trace where it came from and how it came to be faulty, as well as for simple warranty issues. The codes printed on these parts are usually 2D data matrix codes, such as QR, as they can be condensed and printed on any size part.
Direct part marking can be performed in a number of different ways, from simple laser printing, to engraving or dot peening, to chemical etching, or abrasive blasting. However, it's important to note that, since printing on parts generally doesn't allow for the traditional black markings on white background, DPMs tend to be low contrast no matter what method of printing is used.
There are also additional factors, such as the surface that the code is being printed on. A curved or uneven surface will be more difficult to read a barcode from than a perfectly flat surface. Highly reflective surfaces are likewise difficult to read, unless a small textured patch to reduce glare is added for the barcode to be printed on. In any event, most direct part marking codes require advanced image-based readers in order to be scanned and read properly.