POV-Ray : Newsgroups : povray.binaries.images : 3-D printing any type of POV-ray object : 3-D printing any type of POV-ray object Server Time
8 May 2024 17:43:10 EDT (-0400)
  3-D printing any type of POV-ray object  
From: Kenneth
Date: 15 Nov 2023 15:25:00
Message: <web.655527ca7165e2419b4924336e066e29@news.povray.org>
Very recently, I bought my first 3D-printer-- a 'Creality Ender 3 v3 SE' desktop
model. It's an easy-to-use and nicely-made inexpensive machine at about $200 US,
for printing with the usual PLA plastic. Of course, one of my main reasons for
getting it was to finally print some of my POV-ray models.

And that presents a problem: 3-D printers need the model to be converted to the
...stl file format (or .step format, which is similar.)  These are triangle-mesh
representations of one kind or another. POV-ray does not have an in-built .stl
converter-- and there is no app (that I know of?) that can import a POV-ray
model constructed from its mathematical primitives-- boxes, spheres, cylinders,
torii, etc-- and convert it to triangles and then to .stl.

But there IS a way around this bottleneck, which works very well! A
medical-grade CT-scan viewing app called '3D slicer' is the key to the process--
 for converting a series of 'sliced' images of the object (rendered in POV-ray)
to a reconstructed 3-D model and then to an .stl file for 3-D printing. (The
rather generic name of this app is unfortunate, which kind of complicates the
explanation of the entire process.) I briefly mentioned the basics of the idea
in an earlier off-topic post. Please read it first...

https://news.povray.org/povray.off-topic/thread/%3Cweb.652f11c459a094fa9b4924336e066e29%40news.povray.org%3E/

This 'slicing' idea occured to me in a strange way: I had a medical emergency
earlier this year and a CT-scan was required, the first one I have ever had. I
was shown the scan, which is essentially a series of 2-D image slices that play
back in depth. Curious person that I am,  I had the idea of wanting to view this
 scan on my home computer if I could get the file from the hospital. So I
started researching the various medical-grade viewing apps for CT scans that
might be available to the public and that would run on my Windows machine.

I came across this  very complicated-looking professional '3D slicer' app, which
is supposed to be one of the easier ones to use... for radiologists and hospital
techs, at least!  Amazingly, it's FREE  to download, for Windows, Mac OS and
Linux.  The one thing that caught my eye was the list of file formats that it
can import-- including a series (or 'stack') of .png or  .jpeg images, which was
a surprise; and it can export an .stl file for 3-D printing. Take a brief
look...

https://www.slicer.org/

(This app is not to be confused with the 'slicing' software that 3-D printers
use, like Ultimaker Cura; such apps are the required last step before printing,
to convert the .stl file into .gcode instructions for the printer motors.)

This '3D slicer' app's capabilities immediately gave me the idea of
'pre-slicing' a complex POV-ray model as a series of rendered slice images via
animation (using an intersection of a thin box object), to import into the app
to see what the results might be. I chose to make solid white object-slices
against black, which seemed to be the intuitive way to do it. I am sure that
other users here have had the same general thought of such a slicing process,
but 'putting all the processes together' was perhaps difficult or mysterious to
work out. And this  app is not exactly user-friendly, along with a somewhat
non-standard menu interface. The online user manual does not explain the exact
steps required either. But once I got everything to work together, the results
turned out to be quite spectacular! Only a very few of the app's features need
to be used.

Simply stated: Any complex object that can show up in the intersected slices can
be printed.  This eliminates the need for using the alternative
trace/point-cloud approach, and also reproduces features that such an approach
might miss. Much to my surprise, the POV-ray slicing process is not very
demanding: I have gotten *very* good printed-model results with 400 slices at
800 X 800 pixels. And the great thing about POV-ray primitive shapes is that
they have 'infinite' resolution, unlike mesh or mesh 2 objects.

You might think that this slicing technique would introduce oddities or moire
patterns in the final printed model, when combined with the 3-D printer's final
'slicing' software; but that does not happen (in general)-- because '3D slicer'
interpolates between the slice images to create voxels, producing smooth
connected surfaces. Its own 3-D preview does not show that very well though.

The image collage posted here is just a demonstration, to show that it works. I
chose a model that I made years ago, composed of all kinds of different parts--
including some bicubic patch objects made in an *old* program called sPatch that
did not reproduce well as POV-ray slices; that's probably the one limitation of
the process. Those parts show up as infinitely-thin shells.

I would not actually attempt to 3D-print this model as-is. It would need many
'supports' to hold up the overhanging sections, and the initial slice images
were made too low-rez (my mistake). So, I re-sliced and printed just a part of
the model at 1200 X 1200 rez, 400 frames or slices-- which was actually
overkill! This section of the  model was constructed of primitive shapes only,
and shows how successful the process can be. (By the way: The processing in '3D
slicer' results in a HUGE model when it shows up in the Cura printer software;
it has to be scaled down to fit even my printer's max volume-- which has the
excellent effect of reducing the size of the triangles in the .stl triangle
mesh, greatly improving the printed quality.)

I am presently working on a a step-by-step guide to the '3D slicer' settings
required, which I will post, probably as a series of screenshots with
explanations. The process is actually NOT complicated, once the few steps are
learned. Most of  the app's  many specialized and mysterious features can be
ignored.


Post a reply to this message


Attachments:
Download 'pov_to_3d_printer_demo_kw.jpg' (1402 KB)

Preview of image 'pov_to_3d_printer_demo_kw.jpg'
pov_to_3d_printer_demo_kw.jpg


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.