working on slicer in blender

Powder and inkjet printing
User avatar
mark use blender
Posts: 13
Joined: Mon Aug 01, 2022 2:54 pm
Location: Hong Kong
Contact:

working on slicer in blender

Post by mark use blender »

hay people,
i am working on making a slicer in blender to enable access to full-colour 3D printing. i am having trouble deciding what output format should be used, further down the road, I may want to test it out on an actual machine to validate the slicer, Happy printing.
User avatar
dragonator
Site Admin
Posts: 595
Joined: Fri Aug 14, 2015 4:48 pm
Location: The Nethelands
Contact:

Re: working on slicer in blender

Post by dragonator »

Hello,

What type of printers are you aiming at writing a slicer for? Depending on the answer it really changes what the output should be. If you are trying full color on FDM like machines you want a different format from 3DP type machines.

Since I mostly deal with 3DP and dislike complex standards, I prefer a type of format that would actually contain all the actual to be printed images in a bitmap type format. This would essentially be what DLP printers use, with multiple layers of svg files, or what gcode is for FDM printers. It will be printer specific, but will be the most usable format, as it also allows for the printer to parse the image itself. Any format that requires even more parsing in other software would sort of defeat the purpose. In the image can then be encoded actual colors, and maybe also different binder densities as is common with commercial 3DP printers. Each "image" in the file can hold specific information regarding layers, layer thickness and other metadata.

Let me know if this is information that is useful, and if there are other ideas floating around.
User avatar
mark use blender
Posts: 13
Joined: Mon Aug 01, 2022 2:54 pm
Location: Hong Kong
Contact:

Re: working on slicer in blender

Post by mark use blender »

dragonator wrote: Fri Aug 12, 2022 2:50 pm
Each "image" in the file can hold specific information regarding layers, layer thickness and other metadata.
i was planning to build a full colour version of oasis, i already had the core slicer in blender pumping out .png file flawlessly and had finished coding a python script to separate CMYK from the original PNGs, with alpha channels as four separate PNGs.

is it possible to chain four oasis boards together to achieve full colour 3d printing?

should i put a txt file in a zip file together with the png or have g code embedded in the png file name?

happy printing.
User avatar
dragonator
Site Admin
Posts: 595
Joined: Fri Aug 14, 2015 4:48 pm
Location: The Nethelands
Contact:

Re: working on slicer in blender

Post by dragonator »

You might need a fifth printhead for clear binder, or make the K (black) by combining CMY. From what I heard this actually works well enough to get good black.

It is possible to chain 4 controllers together. Each controller is a separate piece of hardware that can run on its own. The encoder signal can be share across the printheads to synchronize positions. A more elegant but more laborious system would be to make a single 3, 4 or 5 headed controller. A lot of the hardware on the controller is only needed a single time. To print 5 printheads without slowing the controller down would need a redesign, but if you want to control 2 or 3 printheads with a Teensy 3.5, you can do that if you accept a slight slowdown of the print speed. A better solution would be an FPGA, but that would be difficult.

As for the format, I am not the right person to ask this question. I prefer simple formats, so either zipped or even just png files in a folder work fine for me, with a txt file for metadata (image size, location, layer height, color and what image goes where). It is however a bit more of a hassle to manage than putting everything in a single file.
User avatar
mark use blender
Posts: 13
Joined: Mon Aug 01, 2022 2:54 pm
Location: Hong Kong
Contact:

Re: working on slicer in blender

Post by mark use blender »

blender slicer v0.0.0 is ready for download:
https://markytblender00.gumroad.com/l/blender_slicer
User avatar
mark use blender
Posts: 13
Joined: Mon Aug 01, 2022 2:54 pm
Location: Hong Kong
Contact:

Re: working on slicer in blender

Post by mark use blender »

dragonator wrote: Sat Aug 13, 2022 12:29 pm
As for the format, I am not the right person to ask this question. I prefer simple formats, so either zipped or even just png files in a folder work fine for me, with a txt file for metadata (image size, location, layer height, color and what image goes where). It is however a bit more of a hassle to manage than putting everything in a single file.
i am now working on the Oasis controller software, while reading the code, i encountered some questions, which would be great if you can answer some of them:

1. any advice on where in the pipeline I should play with and are there any easier ways to interface with the Oasis controller software
2. are there things that I should not touch
3. how does the Oasis controller software work
User avatar
dragonator
Site Admin
Posts: 595
Joined: Fri Aug 14, 2015 4:48 pm
Location: The Nethelands
Contact:

Re: working on slicer in blender

Post by dragonator »

Oasis controller is and has always been a temporary tool to control the Oasis printer. It is not that refined, and is very sub optimal. It is the typical temporary solution that became permanent.

1. That really depends on what we want to do here. Do you want your files to be printed using Oasis controller or do you want to modify it so it to glue it on top of blender. If you do not want to deal with the control of the printer, but do want to send you images, the ideal place is as close as possible to the print layer. This would essentially mean that Oasis controller opens the files blender makes, and prints those. Especially with bitmap images this should be fairly doable.
2. Most of it, depending on what you want. All libraries and functions have a purpose. Most libraries will handle stuff on their own, and the main tab handles everything together. I do not know what exactly you want to do, so I have a hard time pointing at things not to touch.
3. On what level do you want an explanation? It is a python program that controls Oasis (both a GRBL motion controller and an HP45 standalone controller). It can read bitmap images to print single layers, and special svg files made by slic3r to print in 3D. It also allows the operator to control all motion aspects, and control and adjust the inkjet controller. On every aspect I can go into further detail, but a general 'how does it work' would be an essay of several pages.
User avatar
mark use blender
Posts: 13
Joined: Mon Aug 01, 2022 2:54 pm
Location: Hong Kong
Contact:

Re: working on slicer in blender

Post by mark use blender »

thanks for your information, that helps a lot, I'll choose the "call library from blender" route. again, thanks a lot.
Wonko
Posts: 110
Joined: Sat Aug 15, 2015 8:13 pm

Re: working on slicer in blender

Post by Wonko »

tl;dr

I wrote a voxel based slicer that handles surface color and converts it into a shell of arbitrary thickness along the point normals. It outputs RGBA image for ink jet printers and G code for FDM. It's 25% done: https://github.com/MatthiasWM/IotaSlicer

Long version:

I have been dreaming of a UV voxel printer ever since the SIggraph trade show in 1994(?) where Z-corp were showing the single color powder printer. I really wanted to know, how to add color to their printouts. They offered that 5 years later, but I wanted to it myself with my own software. The Xaar printhead driver that is also in this forum s a result of that work.

When printing in ink/binder/powder, you need at least four channels, three base colors, and one channel for binder, so you can bind portions without giving them a color. Additional inks, black, white, etc. , can be derived from the base colors.

My approach supports triangular meshes with textures and UV coordinates (not everything is implemented entirely in the source code, but the math behind all this is already there). The .obj format supports that, and some other formats as well, but not .stl . I decided to build a standalone app, but the math can of course also be integrated into Blender.

So first the model is load and converted into only triangles. All vertex normals are calculated, and a copy of the vertex is moved along the norma to create a smaller model inside the original model. Now if you look at that mathematically, for every triangle you have now a triangular extrusion, in geometry, that would be a prism, IIRC. The texture colors are extruded along that prism, given the color data a depth that is needed to make colors solid and not let the infill shine through.

Now for the slicing: for every layer, you have to find all intersections with any of the prisms. You then draw the cut through the prism using the texture UV coordinates, giving you a perfect shell depth, no matter from which direction the texture was projected onto each triangle. The rest is infill, and in the case for FDM, supports and other trickery.

Iota is written as a voxel slicer, so the render results map perfectly onto the inkjet slices. I'd store image slices in a lossless RGBA format first, and use a second run over those images to convert RGBA into motion and ink firing commands. This step should also include some 3D dithering if you aim for photorealism.

Iota is OpenSource, as described on the GitHub page. It's only 25% percent implemented, but it does deliver on the shell depth and texture projection (may not be enabled in the current source because was more into getting voxels back into G-Code).

Hope that helps,

- Matthias
User avatar
mark use blender
Posts: 13
Joined: Mon Aug 01, 2022 2:54 pm
Location: Hong Kong
Contact:

Re: working on slicer in blender

Post by mark use blender »

Wonko wrote: Wed Aug 31, 2022 7:40 pm
i am using the boolean and data transfer approach, while it is pretty inefficient (slow unless you have a supercomputer), blender supports a wide range of file formats and is my personal go-to when it comes to 3D modelling and general 3D work, also the blender python API allows me to program the slicer in a day still actively working on the slicer, I'll look into your code for inspiration, hope you don't mind if I steal some of the code.
Post Reply