Wednesday, April 17, 2019

Using Blender to take a 2D image into a 3D cutout

One of the easiest and most magical things, is the speed at which you can turn an image into a 2D mesh object with depth. Calling it 3D is...tough — it doesn't turn a cutout image into a full-formed velociraptor!


This is a phone stand, remixed from a phone holder on Thingiverse — although I also added an extra piece below the holder, to make it more stable. The cutout of the velociraptor is from an image that looked like this:


Once you have the image (jpeg, png, whatever), take it to a (free) website that converts images to SVG - scalable vector graphics format. There's also techniques where you use Inkscape or Adobe Illustrator, but the free websites are pretty much drag-drop-convert.

In Blender, use File>Import to import the SVG.  It will be a microscopic "curve". I typically scale it in x/y about by *40. Important next step: Object>Apply>Scale. If you skip this, it will do crazy things to your object. Object>Convert to "Mesh from Curve/etc". This will turn the curve into a regular mesh. Next, Add Modifier>Solidify>Thickness = 1, and apply it. This gives the mesh depth, instead of just being a plane. It's solid black, which is hard to see details...under Materials, I used the slider to make it gray.



At this point, your image is now a 2D object with depth. If you weren't doing this project in your main blender file, save it, open your main blender file, and then Append>[filepath/file]>Objects>[objectname]. It should be listed in your Scene now, as a mesh object.

I thickened it to about 5mm, Object>Transform>Snap>Origin to Geometry, and then in Orthographic mode, clicked through keypad 1/3/7, adjusting the orientation and rotation of the cutout piece. (For example, in the phone stand, rotated it 90 degrees while looking from above. From the side of the stand, rotated it 55 degrees to match the plane of the upper part of the stand. Once you have your object aligned, scaled, and rotated...I usually hide it, then select the primary object. Add Modifier>Boolean>Difference, then apply.

You're stamping through the main object - make sure nothing is left hanging. For example, if you look at the capital letter "A", If you stamp an "A" through an object, that triangle in the upper half is going to be hanging in mid-air. (Maybe you have your stamp go halfway through the wall of the primary object.) An example of this is another stand, using a Zelda-based image:


Part of the FDM printing process, behind the Zelda icon...the back wall was not a clean print. Probably because the stamp almost went through the wall. A thicker wall, or a shallower boolean could have eliminated it. Not really a problem, as people aren't going to see that back wall, but an imperfection.





No comments:

Post a Comment