Min/Max Power: Clip or scale?

I think I know the answer, but I’m hoping for confirmation from the developers/designers of LightBurn.

I have a K40, although this probably applies to all lasers (CO2 and RF, at least). I’m considering 3 inputs to the laser power:
a) Machine Percent: The percentage I set on the machine that limits the milliamps going to the tube. For me, I get about 16 mA at 55% power. I’ll use 50% for this example.
b) Min/Max Percent: The setting in LightBurn about which I have a question. I’ll use 10% for Min and 33% for Max in this example.
c) Grayscale Percent: This is the power level per the SVG or grayscale image. Normally expressed as an 8-bit value (?) from 0 to 255, but for the sake of this discussion I’ll use a range of values from 0% (no laser) to 100% (full laser power).

If I only work with Machine Percent and Grayscale Percent, my resulting power output could be no less than 0% and no greater than 50%, because even if my grayscale image indicates 100% power, that power is limited by the Machine Percent. The power output is scaled linearly, so a grayscale value of 0% results in 0% power at the tube, a grayscale value of 50% results in (50% of 50%), or 25% power at the tube, and a grayscale value of 100% would result in 100% of 50%, or 50% power at the tube. The equation here is Tube Power = (Machine Percent) * (Grayscale Percent)

Good so far?

Now I want to bring in the Min/Max Percent values from LightBurn. As I see it, there are two ways these values could be used:

  1. Clipping: The power output could be clipped to the Min/Max values, which means any value below Min will result in an output of Min while any value above Max will result in an output of Max. The formula is relatively simple:
    Tube Power = (Machine Percent) * (Grayscale Percent)
    if (Desired Power < Min) Tube Power = Min
    if (Desired Power > Max) Tube Power = Max
    So if my grayscale value is 0%, I would end up with 10% power at the tube (the value of Min). If my grayscale value is 50%, I would end up with 25% power at the tube. If my grayscale value is 100%, I would end up with 33% power at the tube (the value of Max).

  2. Scaling: The power output could be scaled to the Min/Max values. There would be no values below Min or above Max, but the power output would be scaled linearly between Min and Max. The formula is:
    Tube Power = (Min Percent) + ((Machine Percent) * (Grayscale Percent) * (Max - Min))
    Now if my grayscale value is 0, I would get 10% power at the tube. If my grayscale value is 50%, I would end up with (10% + (50% * 50% * 23%)) or 15.75% power at the tube. And if the grayscale value is 100%, I would end up with (10% + (100% * 50% * 23%)) or 21.5% power at the tube.

I believe Min/Max Percent are used to clip the power output and not to scale it… is that correct?


I’d like to make sure that you have seen these resources from C3D, then we can talk more about the LightBurn side of things:

Yep. Thanks for the pointer, but I’ve been through those. I just want to understand how the algorithm behaves so I can reliably predict what I’m going to get (and hopefully eliminate the trial/error and waste).


For grayscale, the output is the 8 bit value from the image mapped from min power to max power non-linearly, according to the sRGB power curve that images are stored in.

Min and Max are expressed as a percent in LightBurn, where 0 is off and 100 is whatever you’ve set on the panel.

So if you had an image with 0 and 255 in it, 0 would be output as Min Power, and 255 would be output as Max Power, both of those as a percentage of whatever you have set on the laser panel. They’re scaled, not clamped.

1 Like

Thank you for the clarification! My assumption was wrong, so I’m glad I asked.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.