Monkeyprint DLP slicer update — performance and features
In my last post I mentioned the redesign of Monkeyprint’s slicer code to fix some bugs, namely frequent crashes and high memory usage. The work is done now and it does not only fix the issues but also comes with some nice improvements!
Slicing of intersecting objects
3D artist Vaughan Ling asked me about slicing STL files which contain intersecting objects. This seems to be commonplace in (mesh based) 3D modeling for 3D print and rendering. Of course it is easier to assemble a complex model by “simply” throwing together some objects that overlap than to actually unifying them. A render engine doesn’t care anyways…
However, my slicer code did choke on the intersecting parts. It correctly sliced the multiple parts into a list of polygon contours. But when each of the contours was converted into an actual slice image and the slice images were combined, the overlapping regions were rendered black instead of white.
Why did this happen? As the slice contours were created correctly, the issue had to be with the conversion of the 3D slice contours into the 2D black and white slice image. Specifically, the step where slice images from the single objects are merged into one final slice image proved to be tricky. Check out the diagram below…
The new Monkeyprint slicer can now do both: separate and intersecting objects. If you have intersecting objects, simply check the “Multi object slicing” option in the settings dialog 🙂
Apart from the intersecting object stuff, the major improvement is the slicer speed. As mentioned before, the old slicer took several seconds to generate a single slice in complex models. This is history now! I’ve been able to replace the VTK code that transfers the slice contour polyline into an image by some OpenCV code.
The speed-up is quite noticable. I’ve run some tests using stl files of varying complexity. See the results below.
See you next year
In the end, just a quick animation running through the slices of all models. Always nice to see how good the hollow and fill pattern option works 🙂
That’s it for this year. Have a Merry Christmas (if you care about such things) and see you next year!
As always, subscribe for updates and if you like this (or if you don’t), comment below!