Laser: True grayscale instead of dithering?

I completely understand not wanting to use non-official firmware. I don’t currently know of software that does what you’re suggesting, but I would be curious if someone else does or if you end up creating your own.

Why the emphasis on using a G4 dwell? Lightburn uses a short (.1mm-ish) line at a given feedrate which is like a dwell.

image
image
image

Not on the entire machine. If you brick the controller, then you would have to purchase a new controller, which at least one other person has done. Although with a $10 debugger you can flash the chip even if you brick it, not that I’d plan on it…

I disagree with this assertion. Here’s last years Christmas ornaments done with Lightburn true grayscale:

That was done with .1mm resolution in X, and I have tested finer resolution, but you become limited by the beam waist diameter at much finer resolution.

Than you for your reply, @brent113 .
Because with that mode you can select the vertical resolution by changing the space between lines (0.1mm by default) and that’s good. But the horizontal resolution seem to be fixed. I can’t, for example, change speed to reduce pixel’s horizontal size. If I change speed, horizontal resolution seems to be unaffected so I presume that’s fixed in code. (that’s viewable even in your example)
The good of that approach is the speed: that’s much faster than dwell with G4. But the horizontal resolution is worse.
I’m focused on engraving photo fo faces so details have a big role on the final result.
I could not properly test that method due to my firmware not allowing laser power change while moving so I could be wrong, of course.

But I’ll do that: at the beginning only an algorithm to generate that picture using G4 codes, like Luban does but with laser power modulated (and / or dwell time). I’ll post here my results with a picture.
I don’t know when I’ll complete that, I hope soon.

Thank you for the firmware info, good to know that I can flash the board myself.

The horizontal resolution is the same as the vertical resolution. If you use .5mm vertical then it changes power every .5mm horizontally too. You can see above it’s moving in X .1mm because the resolution is set to .1mm.

Speed does not affect resolution.

If you think the horizontal resolution is worse then measure the beam waist and set the resolution to that, that would be the absolute limit of your machine. And finer and your laser overlaps itself. Conveniently, my beam waist is approximately .1mm because of how I extended out my focus.

You can use dithering or anything except grayscale.

Thank you, I didn’t notice that x resolution is equal to y resolution as on display the preview with a line is misleading :slight_smile: So the line option remains an option for me.

I’ve fully tested with dithering and I’m quite satisfied with that but laser power modulation with a true grayscale pixels is so promising in my point of view… I’ll do some other tests.

I’m only a little worried to update the firmware…

1 Like

To that point, @Edwin would it be possible to consider adding power inline compatibility to the official firmware? Due to the work done by community members (especially @brent113 ) it seems like this would be a relatively low effort way to increase the official capabilities of the machine, especially when it comes to image engraving. There is still the matter of the touchscreen not always sending commands fast enough, but despite this it is still absolutely worth it.

1 Like

I’ll put in a PR when I finish testing. They won’t do it otherwise, just look at the number of open issues on github.

2 Likes

Fair enough. I’d be happy to help you test, making sure that issues aren’t machine specific and all that. I’d also offer to help with coding, but as I have no experience in firmware or with marlin I’d probably be more of a hinderance than a help.

@WilliamBosacker I might be misunderstanding your post, so I apologize in advance.

What we are trying to do is have the power change while the laser is moving, allowing for lines where the power is adjusted on the fly rather than dots or single shade lines. We have managed to do this, and I have gotten some good results, only held back by my poor image adjustment skills and lack of experience with lightbulb.

What @energywave wants, as I understand, is to do a grid of dots, but have them be different shades from different powers of the laser instead of using a dithering algorithm.

With both of these methods true grayscale is possible (proven on the first, theoretically with the second). Any fluctuations caused by the method in which the laser sets is power is negligible due to the speed at which the snapmaker is able to engrave due to diode power and physical limitations.

This has been my experience, let me know if I misunderstood what you were getting at.

1 Like

Lol. I got 105Hz. Wouldn’t that be something though, if this machine actually had high speed pwm

That may be too fine of a point being made. Varying average power while in motion as opposed to moving, stopping, turning laser on, dwell, laser off, then move to next point is what Lightburn and other software refers to the distinction between “grayscale” and “dithering”

The size of the PWM “dither” is nearly invisibly small, as opposed to the larger atkinson dot dither, or other algorithms.

That’s exactly what I want to obtain, that’s a good summary :slight_smile:

Even if that’s true on a pure theoretical point of view, in reality that’s “dithering” is defining how burnt is every piece in wich the line is broken, varying from not burnt at all to what you set as a max level.
Even more by using G4 with dwell times, that I want to test, what you’re explaining it’s not a dithering but a modulation. The effect on the quantity of burn per pixel is exactly the same.
For instance if with a CO2 laser I make a pixel by using 50% of the power, that will have exactly the same effect of a laser diode modulated to be on for 50% of it’s time (not counting the fast PWM for simplicity).
Hoping that I did not misunderstood something here :slight_smile: And hoping to produce something good for the community soon.

@energywave I look forward to seeing what you are able to come up with!

As for the rest of the conversation, I agree that due to the nature of the diode being run by PWM, the laser is doing very fine dots rather than a continuous line. However, I think that that is only really applicable in theory as these dots are too small to be seen with the naked eye on a perfect material (my assumption, but I would argue makes logical sense), and are definitely not visible on real materials due to how they darken as well as the speed of the pulses in comparison to the movement speed and diameter of the beam waist.

In conclusion, I agree with you @WilliamBosacker that in software and hardware the machine is only capable of fine dithering at most, but think that in terms of products the result from the diode is indistinguishable from a CO2 laser (or any continuous beam laser) with the same power and wavelength, and as such can be referred to colloquially as “true” grayscale when our method is being compared to dithering formulas that produce visible dots.