We are marking a pair of QR codes on our products using a CSV file which contains the data for both. One is a URL specific to the product serial number, and one is a set of unique WiFi credentials. This is all working as it should.
The QRs are generated with maximum bit redundancy, so we have some freedom to put small symbols in the QR area to help identify for the user what each QR code is for; A question mark for the URL one, and a WiFi symbol for the WiFi credentials one. The question mark one looks like this, for example:
I constructed this by making a filled circle and performing a boolean union with the QR code. I then created the question mark as text and centered it in the circle and performed a boolean intersection. This yields the desired result visually, but since Lightburn does not store a processing chain / timeline like say, Adobe Photoshop, it appears to āfreezeā the QR code to whatever variable text it was encoding at that moment you do the boolean operations. If you incremement through the CSV indexes, you can see the untouched WiFi QR code still changes, but this one no longer does.
Is there some way I can still accomplish this, maybe without boolean operations? If for example the software supported alpha channels, masking, or some sort of layer draw order?
LB supports image masing, so it might work if you create the logo as a pixel image and then use image masking. But I donāt know if that would work for your use case..
Alternatively, you could just place the logo on top, on a second layer, then it gets engraved on top of the rest, but this might only work ok for the circle, the question mark might be disturbed by the QR pixels that have been lasered before. So not a great option.
I will try this, but I think the main issue here is that as soon as you start doing any boolean operations, the QR object ceases to be dynamic and does not change encoding with the variable text. As a software developer myself, I know this can be trickier to accomplish than it seems. The document has to remember the sequence of operations needed to produce the output, not just store the result, which can be a pretty major design change if you have not anticipated the need for this from the start.
I donāt believe thereās any way of achieving the desired output with a non-destructive workflow all within LightBurn, or at least I canāt think of one. The biggest hurdle is in being able to mask or negate the area of the QR code not covered by the symbol. Thereās no non-destructive mechanism to be able to handle that as far as Iām aware.
@Berainlb is right, unfortunately this is not currently possible.
Based on this topic, your support ticket (with your helpful ideas), and a brief discussion with @LightBurn, Iāve added an internal feature request currently titled;
āQR Code: ability to include a custom internal graphic/logo, while retaining variable text functionalityā
This could potentially be implemented as a configurable small white circle or square within the QR Code to allow your own graphic to be layered over it.
There is an existing public Fider request for this, which Iād encourage you, along with anybody wanting this to upvote (and please add your comments if you think of any other specific functionality you would like to see):
Thanks for setting up the feature request. We need this for a production environment in the short term, so I canāt wait on the chance a feature might be implemented in the future.
I canāt seem to find this anywhere, but is there a means by which one can load / import bitmap or SVG images using a CSV driven variable text field that is the file path to the image to be loaded? That way I could write my own code to generate the QR codes with overlaid icon images that I need and then just have LightBurn load them sequentially as we mark tens of thousands of items.
I donāt think that is possible with LB. But you could try GRBL-Plotter Releases Ā· svenhb/GRBL-Plotter Ā· GitHub. It can batch-import graphics and some more automations, an example is here:
Thanks. This looks to be G-code based? I need this to operate a 100W JPT MOPA galvo fiber laser with a rotary turntable plugged into it to continuously mark thousands of plastic parts placed and later removed from the 10-position rotary table as it goes around. The laser uses a USB-based BJJCZ board as a controller.
Ah, I didnāt notice. No, then it doesnāt work. Itās only for grbl-based devices.
Another thing you could try is to use the (virtual) array feature of LB to create a set of letās say 50 qr codes at once, create another array of 50 logos with the same array settings (so each will be positioned correctly, and then do only one boolean operation with both layers. But Iām not sure if you can create qr codes as an array and using csv input..
I did a quick video of what I meant. It does work fast if you can create the qr codes based on CSV, which I never used so far (I donāt know if that works).
If you need the small symbol to vary dynamically based on the content of each row (if they are mixed up and not able to be batched one symbol type at a time) then for now you could convert your graphic into a character of a custom font, and include it in another column in a unicode supporting csv file.
For example, here I imported a wifi symbol (svg) to replace a character of a basic font using Font Forge. I replaced the āFrowning faceā glyph as you can see in the character map (but there are plenty of spaces to create your own characters without disturbing the others).
You may not have much space for the QR code, but if you put the symbol to the corner and shrink the QR you will need less error correction so the readability may not suffer.
There is an existing fider request for āVariable icon/imageā by CSV which has yet to gain much traction - but is what you would otherwise need.
I donāt need to change the icon with the QR code - these are always the same. I have two different codes in this one marking, but they are in different locations and always have the same graphic.
Iām relucantant to move this icon to the type of location you suggest for functional reasons. If you read the specs for QR codes, there is a permiter around the code that must remain blank for it to be readable. Normally, I might ignore this warning, but I have actually run into this issue where we were putting a QR code too close to the edges of a part and it was having trouble reading it with a newer iPhone, but still worked OK on Android. Aztec codes do not have this restriction, and there is API support for reading them in iOS, but the camera app doesnāt automatically recognize them so it is a deal-killer.
The UDP control is interesting, also an odd choice that they use UDP instead of TCP/IP for controlling something important with safety implications like a laser. I donāt know if there is enough functionality here to fire the laser and advance the turntable programmatically?
This may have been originally chosen to match Ruida communication as thatās also done using UDP but I have no insight into this. Communication between LightBurn and LightBurn Bridge, in contrast, is done with TCP.
I donāt believe any of those are available through UDP at least discretely. I believe you can āStartā a job but no access to individual functions.