Convert Any 2D Image to a 3D Object Using OpenSCAD (and Only Free Software)

by R-I-H-A-M in Workshop > 3D Printing

109991 Views, 106 Favorites, 0 Comments

Convert Any 2D Image to a 3D Object Using OpenSCAD (and Only Free Software)

Final.png

I have recently become quite obsessed with 3D design and printing, since I have very little design experience I have been relying extensively on OpenSCAD, it makes designing 3D objects just too easy not to try, if you want to make 3D models from an image or SVG file, you can do it very easily - there are other ways to convert to other 3D formats, so this is only if you want to use SCAD.

If you need to remove the background image check my tutorial for removing background here: https://www.instructables.com/id/Remove-image-backg...

Please vote for me if you find this handy :) If I win a Form1Labs printer, I am hoping I will be able to open the first hackerspace \ makerspace in our area :)

Download Your Tools

tools.png

1- Download Inkscape from http://inkscape.org/download/

2- Download OpenScad from http://www.openscad.org/

3- Download the InkScape to OpenSCAD converter from http://www.thingiverse.com/thing:24808 - Follow the instructions to install the extension to InkScape

Convert Image to SVG

inkscape1.png
inkscape2.png
inkScape3.png

1- Pick an image and open the image with InkScape

2- Convert the image to path by selecting Trace Bitmap from the Path menu

3- Play around with the settings until you get the result you want, if you choose Edge Detection you can actually get a hollow 3D object, in this case I am looking for a solid object, so I chose to cut off based on color

Delete Image and Use Newly Created Path Instead

inkScape4.png

Now you can delete the image and keep the path you just created, select the original image and press delete. Move the path to the center of the window

Convert Paths to OpenSCAD

extrude.png

Go to the menu, choose "Generate From Paths"->"Paths to OpenSCAD"

If you do not see this option, make sure you closed and reopened InkSpace after pasting the extension

Choose the Height and Smoothing

menu.png

You will be able to easily adjust the height later in OpenSCAD, so don't worry too much about it

Edit & Export Your File With OpenSCAD

OpenSCAD.png
Export.png

Open the file in OpenSCAD, you can see that the objects are described in terms of Polygons and other basic objects, you can edit the object without much 3D design experience

- Edit your object as needed

- Press F6 to compile it

- Go to Design -> Export, and choose your file format

You Are Done! Print Your Object and Enjoy :)

Droid.jpg

Print your object if you have a printer, or send it to Ponoko, Shapeways or any other printing service!