In one of my previous posts, I examined the XY precision of the Elegoo Mars printer. If you are not aware of the “exposure bleeding”, please read the post first. There was one problem though; ChiTuBox does not support compensation for exposure bleeding. Therefore, your models can be slightly overgrown and most importantly, when you print directly on the build plate, there is en elephant foot – the first layer are roughly by 0.1-0.4 mm larger than they are supposed to be. This is due to the long exposure period of the first layers.
I wrote a simple command-line utility, which I call ElegooMarsUtility, in September. The utility can read an already sliced file and compensate for the exposure bleeding by eroding the image (imagine removing a few pixels on the edges of white areas). You can find the utility on its GitHub page.
I posted about this utility on the Elegoo FB Group, however, people seem to struggle with the usage of command-line tools. Finally, I found a little spare time, so I programmed a simple (and probably lame) GUI for the tool, so people can use it. I hope it will do the job. It is a single form window, where you enter your compensation values in pixels, specify the input and output files and hit the run button. After a while (depending on the size of the input file) you get a compensated file.
If you use Windows, you can download the utility here, if you use Pip. Unfortunately, the Windows version is bloated and takes few seconds to start, however, there is not much I can do about it – it is the price for having a single executable. If you install the tool on Windows using Pip, the startup will be instant.
Also, if you like the tool (or my other work) consider supporting me on Ko-FI. Supporting me allows me to buy hardware and resing which goes into my research and experiments.
Most importantly; the utility works with the anti-aliased files (thanks to fookatchu and his wonderful library for handling the sliced files) and allows you to specify compensation for the bottom layers and the normal layers. This allows you to get rid of the elephant’s foot.
What compensation values you should put in? It depends on your resin and exposure time. The best way is to experiment. Personally, for Elegoo Gray I use an exposure of 8 seconds, bottom layer exposure 30 seconds, the bottom layer compensation is 6 and the normal layer compensation is 1.
One last think about the compensation. Currently, the tool compensates only for exposure bleeding. However, there could be also an error caused by the UV-light rays not exposing the resing perpendicular to the build plate, but under a slight angle (as the light source is more a point than a surface). I was not able to measure the impact of this effect on the size of the components – in theory, the worst-case scenario is that the error is 0.02 mm on the sides (based on the light source geometry and the layer thickness). The error depends on the position of the object on a build plate – objects placed in the middle are effected less than the objects on the sides. If it proofs that this error is significant, I will implement it into the tool. However, as we are dealing with compensation less than a pixel, it requires some experimenting with partial exposure.
Recent news: My open letter to the 3D-printing community
I love the 3D-printing community, but I think there is room for improvement. Let's get better in 2023! Read the full letter.
Support my work!
If you like my work (these blog posts, my software and CAD models) and you would like to see more posts on various topics coming, consider supporting me in various ways:
- You can become my sponsor on Github.
- If you prefer, you can also become my Patreon.
- You can buy me a coffee on Ko-fi,
- or you can buy something from my Tindie store (also see below),
- Or you can just share my work!
If you are interested in knowing what I am up to and recent sneak-peaks, consider following me on social media (Twitter, Instagram, Facebook).
My store offers
I launched new tank cleaning kits for Elegoo Saturn, Saturn S, Mars 1, and Mars 3. You can find them in my store.>
Thanks for the great tool!
This definitively helps to get printed parts with higher precision.
I’m currently busy finding the optimal paras for the white Elegoo resin. Using 10 as compensation value for the bottom layers at 60s exposure time (default of the Chitubox default settinngs for the Elegoo white resin) and 4 as compsention value for the other layers as 8s exposure time, gives me pretty good results. Elephant foot almost completely gone (might need to go up to 11 or12 for the bottom layer compensation) and XY accuracy is very good as well (size was always approx .2-.25mm off and is now within .8-.02mm).
I hope this functionallity will make it into Chitubox one day.
I am glad the tool is useful for you!
I’ve used this to print a 10mm cube. Prior to using the xycompensation tool, my cube’s z height was 9.98mm, but after compensation 6 layers, my height for a cube is 9.56. Help?
Oops, not 6 layers. Compensation 6 on first layer.
Hi, could you share your model/sliced files? In principle, the compensation should not affect the height of the model – the number of layers stays the same. Also, note that the compensation is not applied to the first layer but to all bottom layers.
sure, check your FB messenger.
My z is luckily 20mm almost exactly, but i’m not sure how to compensate for a 20.2 bottom and 20.1 top on the x/y. Can you explain further?
Hi Jan, awesome testing, tinkering and articles. Been super useful to diagnose the layer height and hopefully I’ll fix it soon with an axial bearing.
FYI, trying to run your tool on Windows is telling me it cannot work on this version. Windows10, 64bit, 1909, build 18363.719. Compatibility options don’t do anything.
Also, you might want to specify required software versions. I tried building it with Python but Pillow libraries won’t work with Python 3.8 and the installation fails. So, using the gitHub release date, I reverted to building this on my RasPi on python 3.5. So far it’s missing so many dependencies it’s been an afternoon adventure.
For users trying to install this: Use python 3.5.X, Install numpy, scipy. Proper command from readme is : pip install git+https://github.com/fookatchu/pyphotonfile@v0.2.0_beta cause it won’t run on master anymore.
HI any plans on updating this so it would work with pip3 on ubuntu 20. and the mars pro format?
It already works on Ubuntu 20. I did not plan for the CTB file format as its specification is not available and it would require too much reverse engineering without any benefit for me. However, recently I saw that someone reverse engineered the file format, so I might consider implementing it. I can’t promise you it will be implemented and also do not expect it to be sooner than in September.
Thank you
I managed to install the packages but I can’t seem to find the xycompensate.py file anywhere? is there a guide somewhere for the tool?
Just install it via pip (as stated on Readme on github) and then just call `elegooMarsUtility xycompensate `
Is there way to make it work with anycubic photon files?
If you use the original Photon (not Photon S), then it should work.
As I understand it should rename the extension from .photon to .cbddp and then back again?
CLI does not check the file extension so no need to rename. GUI does.
I will use GUI. Thank you very much for your help and your work. I will “buy you coffee” 🙂