Introduction to Laser “Painting” on Stainless Steel
So you’ve spent the last few weeks running test array in order to define a set of parameters that will give you a nice set of colors on stainless steel and you’re thinking, “Now what? How do I actually use these colors to make a picture?” Fear not! Help is at hand! In this tutorial, I will explain my step-by-step process for creating an image like the one you see above using your Snapmaker Ray. I assume that the basic steps will port fairly smoothly over to the Snapmaker’s 3-in-1 tools (like the A350T) but I can’t make any promises since I haven’t tried to do it on both machines yet. If you are interested in pursuing projects in laser color marking and haven’t yet done so, I encourage you to start with my tutorial on that subject before diving into the depths of making images.
Materials and Useful Accessories
As I note in the other tutorial, my best results to date have come from using “frosted” steel plates of at least 1 mm thickness, sourced from Amazon. I usually use square pieces of 100 mm by 100 mm, with a protective film on both sides that keeps the surface of the steel from getting scratched prior to use. I usually peel the film off just before placing the metal sheet into my Ray, to minimize the chance of getting scratches or fingerprints on the surface. If you do get fingerprints, I recommend cleaning off the steel using a lint-free towel and 99% Isopropyl Alcohol. That leaves a nice, clean surface on which to “paint”. Again, I will be using my aluminum hold-down plate and button-head screws to secure the steel plate during “painting”.
Laser Parameters Reference File
If you came here after going through my tutorial on Laser Color Marking, you should already have a LightBurn reference file containing a colored test array of squares that sets out the proper laser power / speed / intervals / etc for the different colors you have available. I usually start every new image project by making a copy of the reference file and renaming it with the name of the new image. That helps prevent making changes to the original reference file and potentially losing your set of laser parameters. If you place your test array of colors outside the working area in LightBurn, it will happily just sit there and not be included in any G-code output files you create, but you can still use it to define all your laser color parameters.
Outline of the Laser-color Image Creation Process
Below I list the steps we will follow that will ultimately result in a G-code file that you can load into Luban and run on your Ray. After the outline, I’ll go through each of the steps individually and explain what they mean.
Outline of picture process
- Select picture
- Best is something with well-defined color areas, little shading, color set close to what is available or can be adjusted to fit what you have.
- Open picture in GIMP
- Select by color
- CTRL + C to copy.
- Paste as new image
- Export as JPEG or PNG with label as that color (or color #1 …)
- Open LightBurn
- Open file where you have color parameters setup
- Should have colors in test array outside of active area.
- Won’t show up in output G-code.
- Should have colors in test array outside of active area.
- Import JPEG / PNG into LightBurn
- Trace Image (reduce min size to zero from default of 2)
- Increase Threshold to get all but outer profile.
- Drag thing you just traced to side and delete
- Assign a color/raster parameters to that layer
- Go back to GIMP and delete that color from working image
- Repeat Steps 3-12 for each color in working image
- Can combine layers to same color if you want to.
- Drag each new layer to correct position relative to previous layers.
- Select entire image and resize to fit steel workpiece
- I use 90 mm as max on 100 mm square to keep away from hold down screws / washers.
- Re-zero to put bottom corner at 0, 0
- Save complete image as new Lightburn Project
- Check simulation to get idea of time required for all layers
- Can turn off output of layers to reduce time for a given laser session.
- When time looks right, save G-code
Step 1 Select Your Picture
Given the limited set of colors accessible with our lasers, not every image / picture is going to be suitable for use in the laser color marking process.
Before jumping into this first step, I want to talk briefly about two basic ways to “make” a given color show up in an image: “dithered” and “non-dithered”. In a dithered image, color in a given area is created by combining smaller areas (sometimes single pixels) of multiple colors in your palette in an attempt to present a sort of average / mixed color. The simplest example of this is found in black and white newsprint, where a “grey” pixel is created by splitting a pixel into white sub-pixels and black sub-pixels. From a distance, the eye will visually “average” that pixel into something between black and white. The smaller your sub-pixels, the more different levels of “grey” you can obtain in that spot. The same thing works with colors, originally by combining red, green, and blue (RGB) sub-pixels, but now often adding additional colors to the mix. Looking at your phone or computer screen close-up with a magnifying glass will show you this in action. Using dithering works best when the colors of your sub-pixels are saturated and contrasty, which is typically not the case for many of the colors found with laser color marking on stainless steel. Also, much of the color effect we see on steel comes from the degree of overlap between adjacent laser lines or laser dots, so if we try to use too small of a sub-pixel in dithering, we will likely not get the expected color. For these reasons, I recommend NOT using dithering when trying to make colored images. If I figure out how to do this in the future, I’ll come back and edit this tutorial to reflect that. But for now, let’s just focus on non-dithered images.
Keeping the above in mind, I generally look for images that have clear, well-defined areas of color, with very little shading. Below I show three example images: two that are well suited for this process, and one that isn’t.
https://pixabay.com/vectors/abstract-colourful-dance-dancer-2029887/
https://pixabay.com/vectors/octopus-animal-cartoon-nature-8576823/
Image #1 would be an excellent choice for laser color imaging because its colors are well-defined and quite “contrasty”, and would look good with multiple color replacement sets (if you liked some of your colors better than the ones in the image). Image #2 was an acceptable choice (see the header image on this tutorial), even though it contains a larger number of colors than #1, even though some of its colors are not particularly close to the ones we have available. It depends on how close to the original color set you feel it is important to achieve. As is often the case, I made multiple versions of #2 until I found a color set I liked best.
https://pixabay.com/illustrations/landscape-illustration-nature-water-4394746/
Image #3 would probably be a poor choice for this process. Even though it has a limited color palette, there is a lot of subtle shading that would be very difficult to replicate. In the end, much depends on your level of patience and willingness to dive into the details of an image.
Step 2 Open Your Picture in GIMP
The next step in our process is to start breaking your picture down into its individual color components. There are many different image processing programs that could do many of the rest of these steps, but I chose GIMP for the simple reason is that it is free to use, and quite powerful. Using our Octopus as an example, this is what my screen looks like after I’ve opened the file in GIMP.
Steps 3-4 Select by Color, Paste As New Image
On the Menu bar, choose Select and then By Color (Shift + O). In this example, let’s start by selecting the background (purple) color by placing the cursor crosshairs on the background and clicking it. The outline of that color (everywhere it exists in the image) will be highlighted by a flashing dotted line. Now click on CTRL+C to copy that color into the clipboard. We then click on Edit on the Menu bar and choose Paste As > New Image (CTRL + SHIFT + V). This will create a new image page that only contains the selected color.
Step 5 Export This Page
We now go to File on the Menu bar, and select Export. This will open an Export window that will allow you to choose a name for this file and where to save it on your computer. Try to name it something helpful, like “Octopus background color.PNG”. The default file type will be PNG, which is fine. If you prefer JPEG, that should work, too. Our next step will be to import this file into LightBurn, so any image file type the Lightburn can read should work. I have created a folder on my Desktop specifically for Snapmaker Ray project files, so this is where I usually export mine to.
Steps 6-8 Create a NEW Copy of Your LightBurn Color Test Array File, and Import the (Single Color) Image File You Just Made
Below is what my computer screen looks like at this point:
You can see my color test array on the left (outside the work area), a big copy of the background color image file in black and white in the middle of the screen, and my laser parameters Cuts / Layers window on the right side. Select the image with your cursor (you may need to click the Arrow icon on the left side of the screen).
Step 9 Trace the Image
With the image selected, right click the cursor (or use the Tools dropdown on the menu bar) and choose Trace Image. Your screen should now look like the picture below. There should be a purple outline of the image. I advise that you change the Ignore less than value to zero (0) and push the Threshold slider up to near the upper end of its range to capture as much detail as possible. Note that if you push the Threshold slider up all the way to its max value, the purple outline will disappear. Make sure not to go that far! Reducing the Ignore less than value will make sure the trace doesn’t ignore small spots of color. Sometimes it is also necessary to play around with the Cutoff slider to make sure you capture everything. When the single color files are exported from GIMP, their “blackness” level will reflect their color “value”, so a lighter color will be exported as more of a grey image than the one we see below. The Trace Image function is looking for where the contrast in the image changes, so adjusting the Cutoff value can compensate for a lower contrast. The idea is just to make sure you “get” all of the colored area enclosed by the trace.
Step 10-11 Assign Traced Image a Set of Color Parameters and Delete Original Image
Although the screen won’t look any different at this point, what you have done is to create an new layer underneath the original, typically now assigned to the most recent set of color parameters used. You can see this by dragging the top layer away to the side. Underneath you will find a layer that looks the same, but has now been converted into an area which can be “filled” by a color. If it’s the first time you’ve done this step, it will be assigned to the “00” layer and will still be black (look at the list of colors on the bottom of the window).
If you now click on this new layer, you can then click on one of the other colors at the bottom of the window and it will be assigned to that “cut/layer”. In the picture below, I’ve assigned it to Cut / Layer 09 causing it to now look dark blue.
Once you have accomplished this, it is okay to delete the original image copy on the right side.
If you were now to click on the Save GCode button under the Cuts / Layers window on the right, LightBurn would write a set of G-code commands to a file that would “Cut” that image out using the laser parameters set up for Cut / Layer 09. Namely, a laser travel speed of 2500mm/min, a Line Interval Spacing of 0.05mm, and a power of 12.7%, which are the values I previously found to give a nice dark blue. If you decided after this point that you wanted the background to be a different color than Dark Blue, all you would need to do would be to click on the layer and then click on a different color square on the bottom of the window. Note that if you inadvertently assign it to a color that you haven’t defined with your test array, it will choose a default set of parameters from the top of the Cuts / Layers window (White in my case), so if one of your images ends up with an area that is unexpectedly a different color than you were expecting, this may be the cause.
Step 12 Return to GIMP and Delete That Color from the Working Image
In this step we return to GIMP and delete the color we have just added to our Lightburn project. This will help us keep track of the colors we have completed and which ones we still have yet to process. The picture below shows what your computer screen should show after you delete that color.
Step 13 Repeat Steps 3-12 Until You Run Through All the Different Color Areas
From this point on, we are just going to repeat Steps 3-12 for every different color in the starting image. If there are areas in the original image that have different colors that you wish to combine into a single color, simply hold down the SHIFT key while clicking with the mouse on the additional color areas. Alternately, this step can be done in LightBurn by clicking on a given layer and then assigning it to one of the colors already used. This will make both areas part of the same Cut / Layer.
Each time you add a new color layer to the LightBurn Project you should move it to line up with the first layer. You can also do small shifts by adjusting the numerical values in the X and Y boxes when the layer you wish to move is selected. For very small layer movements, it is helpful to zoom into the image.
Steps 14-15 Rescale the Layers and Zero the Corner
Once all the color layers are complete and aligned with one another, we use the select rectangle to select all the layers and then enter the appropriate dimension in the Height or Width boxes. If you are using a 100 mm square piece of steel, I recommend a maximum dimension of 90 mm to keep the edges of the image away from the hold-down screws.
You should also place the corner of the image at the 0,0 position (I always use the bottom left corner as the default zero point, as one of the arrows shows).
Step 16 Save the Completed Project As a LightBurn Project
Make sure to save the project at this point, in case you want to come back later and make modifications to layer positions, colors, etc.
Step 17 Check Your Laser Time Prediction
By clicking on the Preview icon at the top of the LightBurn window (see arrow below) you can get a good estimate of how long the laser time is predicted to be once you press the START button on your Ray. I have found LightBurn’s estimates to be quite accurate if you have followed the instructions for setting up LightBurn to work with the Ray.
If you find that the laser time is longer than you wish to babysit the Ray, you can “turn off” layers by switching the Output to OFF in the Cuts / Layers window (see arrow). You can choose to laser anything from a single layer to all the color layers, depending on how much time it will take vs how much time you want to spend babysitting the laser.
Step 18 Save the G-code to Your Computer and Load into Luban
Whatever layers have their Output ON in the LightBurn Cuts / Layers window will be included in the set of G-code instructions that are generated when you click on the Save GCode button.
Once you have saved the G-code to your computer, you can start Luban and load the G-code into the Workspace window.
I will note here that in my attempts to set up LightBurn to work with my Snapmaker, I have somehow ended up with an X offset in the Luban G-code image of 21 mm (negative), which you can see in the above picture. However, the origin of the image generated by the diode laser still uses the red laser crosshair point as its effective origin. So I just ignore the offset in the image on the screen.
Once you have imported the G-code file into Luban, you can upload it to your Ray, position your laser on your workpiece, and press the Start button. If you have opted not to include all of the color layers in the current laser file, make sure NOT to manually move the laser from the origin position in between laser sessions, unless you have established some way to return it to precisely the same position before you burn the rest of the layers. Otherwise, the origins of the different G-code session will likely be in different spots and your colors won’t line up between the sessions.
Below is the final output from my pre-defined color set, following the steps I have laid out above. Total laser time was 3 hours and 50 minutes.
Image References
https://pixabay.com/vectors/abstract-colourful-dance-dancer-2029887/
https://pixabay.com/vectors/octopus-animal-cartoon-nature-8576823/
Greyscale Images
One subset of “images on steel” that I haven’t yet discussed takes advantage of one of the ways Lightburn can deal with images. When you import an image into Lightburn, it immediately converts the image into black and white (or “greyscale” to be more accurate). There are multiple techniques/algorithms that can be used to convert an image into greyscale, including dithering, as we’ve discussed previously. However, it is possible to choose none-of-the-above as a conversion method and to leave the image as a purely greyscale one, with the pixel “magnitude” at each point corresponding to how bright that particular pixel is. Pure black has a magnitude of “0” and pure white has a magnitude of “100”. In Lightburn’s case, this range of magnitudes can be set to any laser power range that you want, such that the “100” magnitude is set by the Minimum % power setting, and the “0” magnitude is set by the Maximum % power setting. This is inverted from what you might expect, because Lightburn assumes you will be using this process to burn images into wood, and the darkest parts of the image (“0” magnitude) will thus need the highest amount of laser power, and the lightest parts will need close to zero laser power. If you have already gone through the process of setting up material test arrays, you should be able to see that certain power ranges pretty well cover a range of colors from very dark to very light. In the image below, I show a particular power range that spans very dark blue to almost white. If you use that power range as your minimum and maximum power settings in the Lightburn cut editor window, you can produce an image on the steel.
The process you use should look something like the following:
Step 1 Select Your Picture
In this case, the best pictures to use will look reasonably good when converted to black and white (more accurately “monochrome” since we may not be able to find a power range that actually spans from black to white). The example I will use is a picture of Michelangelo’s Pieta statue.
Step 2 Edit the Picture for Imaging
Here you should edit the picture in an image editor to crop it to the desired aspect ratio, and adjust the contrast, brightness, highlights, midtones, and shadows to work well with the power/color range you have chosen to use for imaging. This is a bit of a trial and error process, since the power/color range is not linear. You will probably need to try a few times to get the image the way you want it. When finished, import the picture into Lightburn, set the proper size, and place the corner at 0,0.
Step 3 Invert the Picture
As the screenshot below shows, we can use the Adjust Image window in Lightburn to invert the image brightness. This is necessary because the darkest colors in our power range are at the lowest power, which is the opposite of what Lightburn expects.
Step 4 Set Your Laser Parameters
Using the Cut Settings Editor window, you now will fill out the laser speed, max and min power settings, overscanning range, line spacing, and Image Mode (Greyscale), as shown below. Once you have these values set, use the Save GCode button to create your G-code file.
Step 5 Import into Luban and Run the Laser
As with the other image “painting” method, now you can import the G-code file into the Luban workspace, align your laser, and generate your image. Below I show a couple of image created using this process. The image on the right used a reduced brightness to give a better dynamic range in the image.
In both cases the laser speed was 2500 mm/min, the line spacing was 0.08 mm, and the power range was 13.8% - 22%.
Image References
https://pixabay.com/vectors/abstract-colourful-dance-dancer-2029887/
https://pixabay.com/vectors/octopus-animal-cartoon-nature-8576823/
Image by Jacques Savoye from Pixabay