nebarnix / img2gco

Image to reprap gcode converter
GNU General Public License v3.0
56 stars 29 forks source link

Strange markings between etchings #10

Open AOsmankic opened 2 years ago

AOsmankic commented 2 years ago

Hi, I've been trying to get img2gco to work on some of my images and I keep getting these strange markings in the whitespace of my prints.

krihbunpsom71

The image is not mine (from https://www.reddit.com/r/Ender3Pro/comments/plm96h/ender_3_pro_w_creality_laser_question/), but my problem looks exactly like this.

I have an ender3 v2 with a Sovol 3D 500mW laser. I've tried several images (both jpg and png) and I keep getting this result.

I have tried setting the ignore value from 230 - 254 and I have gone from .15 to .05 resolution just in case.

No matter what I try, I can't seem to get rid of those markings. Anyone know how to fix this? Can I do some pre processing to the image to get img2gco to analyze my image right or any post processing to the gcode to manually get rid of those markings?

nebarnix commented 2 years ago

Oh wow, I haven't seen that one before. Though a neato fill pattern... hah!

What is the off (white) power set to? It looks like your laser isn't turning o All the way off, or maybe the pwm has a weak pulldown so it is picking up noise from the stepper motors?

  1. Verify your off (white) setting, and make sure that when you manually set the pwm to that setting the laser stays off.

2.) Assuming the laser is off or off enough not to mark, try jogging manually with it set to this level. If it came on, you have an electrical problem... You can try pushing white out further into the off realm at the expense of really light grey's or somehow fix the electrical noise...

Report back and we'll go from there!

On Fri, May 6, 2022, 10:53 AM AOsmankic @.***> wrote:

Hi, I've been trying to get img2gco to work on some of my images and I keep getting these strange markings in the whitespace of my prints.

[image: krihbunpsom71] https://user-images.githubusercontent.com/43686181/167187063-8f0f986b-54e6-4408-bed8-2fd373fb46c9.png

The image is not mine (from https://www.reddit.com/r/Ender3Pro/comments/plm96h/ender_3_pro_w_creality_laser_question/), but my problem looks exactly like this.

I have an ender3 v2 with a Sovol 3D 500mW laser. I've tried several images (both jpg and png) and I keep getting this result.

I have tried setting the ignore value from 230 - 254 and I have gone from .15 to .05 resolution just in case.

No matter what I try, I can't seem to get rid of those markings. Anyone know how to fix this? Can I do some pre processing to the image to get img2gco to analyze my image right or any post processing to the gcode to manually get rid of those markings?

— Reply to this email directly, view it on GitHub https://github.com/nebarnix/img2gco/issues/10, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE5BRDMLOO2JCCHVZAFIN3VIVMCTANCNFSM5VI2SN3A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

AOsmankic commented 2 years ago

I know, super cool fill pattern, but gets in the way of some details sadly...

The power off is set to 0 and I've tried setting the "min laser" from 0 to 15 and got the same result.

The strange thing is that these markings only show up between any "intended" markings. I added a thick white border around my entire image and it hops over that as expected. Same thing with curved borders. This fill pattern only occurs between any sort of "object borders" in the image making me think there might be something off with the images I'm uploading?

When manually setting the fan speed to 0 on my control panel and messing with the stepper motors, the laser doesn't turn on. There might be some interference, but I have no way to measure it. Doesn't seem strong enough to turn on the laser though.

AOsmankic commented 2 years ago

IMG_20220506_140847

I think I confirmed it might be the image or image processing. When I manually grayscale the image (the lower one), it looks better. Not perfect, but better. Using the exact same settings but with the normal image, it generates that weird pattern (top three) despite the grayscale preview looking perfect.

IDK if its because of some compression creating weird artifacts that were removed when making it grayscale, some weird bug with large images, or if the hardware decided to finally work right (definitely possible with the ender 3's stock mainboard) but it looks like progress.

Any suggestions for getting a cleaner image?

nebarnix commented 2 years ago

Interesting... Definitely seems worth a look. Can you send me an example image and zipped gcode? Smallest image that displays this please as the gcode can get large ...

On Fri, May 6, 2022, 12:27 PM AOsmankic @.***> wrote:

[image: IMG_20220506_140847] https://user-images.githubusercontent.com/43686181/167203417-fd78f90d-a06b-4a61-aec3-83d55ddcfb84.jpg

I think I confirmed it might be the image or image processing. When I manually grayscale the image (the lower one), it looks better. Not perfect, but better. Using the exact same settings but with the normal image, it generates that weird pattern (top three) despite the grayscale preview looking perfect.

IDK if its because of some compression creating weird artifacts that were removed when making it grayscale, some weird bug with large images, or if the hardware decided to finally work right (definitely possible with the ender 3's stock mainboard) but it looks like progress.

Any suggestions for getting a cleaner image?

— Reply to this email directly, view it on GitHub https://github.com/nebarnix/img2gco/issues/10#issuecomment-1119947428, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE5BRB6IASKAUOVOIWNIADVIVXDRANCNFSM5VI2SN3A . You are receiving this because you commented.Message ID: @.***>

nebarnix commented 2 years ago

What happens if you go really slow, does the pattern change?

On Fri, May 6, 2022, 2:26 PM Jasper Nance @.***> wrote:

Interesting... Definitely seems worth a look. Can you send me an example image and zipped gcode? Smallest image that displays this please as the gcode can get large ...

On Fri, May 6, 2022, 12:27 PM AOsmankic @.***> wrote:

[image: IMG_20220506_140847] https://user-images.githubusercontent.com/43686181/167203417-fd78f90d-a06b-4a61-aec3-83d55ddcfb84.jpg

I think I confirmed it might be the image or image processing. When I manually grayscale the image (the lower one), it looks better. Not perfect, but better. Using the exact same settings but with the normal image, it generates that weird pattern (top three) despite the grayscale preview looking perfect.

IDK if its because of some compression creating weird artifacts that were removed when making it grayscale, some weird bug with large images, or if the hardware decided to finally work right (definitely possible with the ender 3's stock mainboard) but it looks like progress.

Any suggestions for getting a cleaner image?

— Reply to this email directly, view it on GitHub https://github.com/nebarnix/img2gco/issues/10#issuecomment-1119947428, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE5BRB6IASKAUOVOIWNIADVIVXDRANCNFSM5VI2SN3A . You are receiving this because you commented.Message ID: @.***>

AOsmankic commented 2 years ago

Thanks for offering to take a look!

While editing and shrinking the image, I kept getting varying results. It seems that using a simpler and smaller image may impact the result?

I kept playing with the settings and the actual image size and found the smallest file size where you can still clearly see the issues. They are not as evident in these results as they were in the ones I shared earlier, but you can still see a bunch of extra dots. I will continue testing tomorrow and update with any results.

As for the speed of the print, the image I shared above was at ~300 cut and 3000 travel. When lowering it to 100 cut and 2000 travel, the issue was still there, but darker and a little blurrier. I can try again tomorrow since I didn't have the patience today to wait for more of it to finish 🙂

broken_image.zip

AOsmankic commented 2 years ago

Just remembered, here is the result from a print I tried a few days ago where I had the cut speed at 700. Looks similar to the 300 one, just lower quality.

IMG_20220506_184403

nebarnix commented 2 years ago

I have a hunch -- I wonder if the decimal places aren't playing well. I removed the decimal S values from the M106 command. I didn't round then, i just truncated because its just a test.

Report back. From a quick glance it looks ok!

On Fri, May 6, 2022 at 4:48 PM AOsmankic @.***> wrote:

Just remembered, here is the result from a print I tried a few days ago where I had the cut speed at 700. Looks similar to the 300 one, just lower quality.

[image: IMG_20220506_184403] https://user-images.githubusercontent.com/43686181/167228527-46229c71-2669-41ca-a484-2bd1e92debd9.jpg

— Reply to this email directly, view it on GitHub https://github.com/nebarnix/img2gco/issues/10#issuecomment-1120080053, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE5BRCW2ZBNT3VLR4WOCWLVIWVWPANCNFSM5VI2SN3A . You are receiving this because you commented.Message ID: @.***>

--

Jasper Nance - K7PHI Creative and Scientific Imagery http://www.nebarnix.com/

AOsmankic commented 2 years ago

Update: Removing the decimal points in the m106 commands didn't seem to do anything.

If anyone is struggling with this exact issue and can't seem to get rid of it, I was able to make the fill pattern almost completely disappear by using these exact settings and using a smaller image (I went from a > 1 mb png to a .6 mb png) and made sure to export the alpha channel as whitespace. I printed with the grain on the wood and tried to print very dark. I then used some sand paper and sanded the entire image to lighten it up a bit. That seemed to get rid of some of those tiny dots seen in the "manual grayscale" image above. I then used a tiny bit of sandpaper to get rid of the darker dots and it turned out looking pretty good.

I will continue to play around with the images I used, the settings on the site, and manipulate the gcode a bit and will update this issue if I find anything.

Thanks for all the help!

image