3D Scan to SVG to Plotter (by way of Blender)

FreestyleScratchboard

I recently learned that Blender has built-in SVG output capabilities using the Freestyle line rendering tool, which is awesome since I can now combine my love of 3D with my awesome AxiDraw plotter. In the course of playing with different models and the myriad options in the Blender Freestyle panel, I found some cool settings that create a very abstract, exaggerated style that looks great plotted. In the example above, I used the output from this technique to scratch the image into a scratchboard using a swiveling craft blade. It looks super cool both on-screen and on-board.

Here are the very simple steps to recreate this technique. Note I’m using Blender 2.78b with the built-in “Render: Freestyle SVG Exporter” add-on enabled.

Step 1

Start with a model. Here I’m using a scan of my head I’ve had laying around for a few years. This came from my Occipital Structure Sensor. Really, you can use any model for this, as each will result in interesting output.

001

Step 2

Enable “Freestyle” in Blender’s Render panel.

B002

Expand the “Freestyle Line Set” in the Render Layers tab, then create a new line set by clicking the little “+” icon next to the empty.

B002b

If you render now, you’ll see an outline around your model, as well as a few internal lines.

002

Step 3

You’ll need to change the color of the stroke to be able to see it after the next step. So in the Freestyle Line Set you created, expand the “Freestyle Line Style” group, then select “Color” and set the color from black to something not black. Here, I’ve chosen a light-blue color.

B003a

003

Step 4

We really just want to render the lines, not the model itself, so expand the “Layer” group in the same panel, and turn OFF “Use Environment”, “Use AO”, “Use Surfaces”, and “Use Hair”. Render and you’ll see a black background with your colored lines. (I couldn’t find a way to get a non-black background, thus the changing the color. If there’s a way to get a white background or something, I’d love to hear it)

B004a

004

Step 5

As it stands, the rendering may not look all that thrilling; it’s still cool, and there’s a lot you can do as-is, but it’s not what we’re going for. So let’s make the model a bit more interesting. We’re going to a “Remesh” modifer to our model, setting the Mode to “Blocks” and the Octree Depth to “8”.

B005a

The model now looks like millions of tiny cubes.

B005b

Rendering now already takes things up a notch.

005

Step 6

We now need to add a few modifiers to the lines. These are done in the Freestyle Line Style “Geometry” tab. We’re going to add “Guidelines” and “Backbone Stretch” via the Add Modifier dropdown.

B006a

And the render is taking shape!

006

Step 7

From here it’s a matter of tweaking some numbers, though the exact values are up to your aesthetic preferences. I picked “20” for Guidelines, and “50” for Backbone Stretch.

B007a

007

Step 8

This looks good, but a little heavy to me. So let’s change the line thickness to be thinner. In the Freestyle Line Style “Thickness” tab, set the Base Thickness to “1”.

B008a

Much better!

008

Step 9

The last thing to do is save the SVG. This is as easy as checking a checkbox, but also a little more convoluted than it needs to be, as you’ll see.

First, the checkbox to check is in the Render panel way at the bottom. Again, you’ll need to enable the Freestyle SVG Export add-on to see this.

B009a

Easy! Now, however, you’ll want the exported SVG file to go somewhere you can actually get to it! By default the exporter uses Blender’s temporary file path, which is normally a temp folder deep in the bowels of your computer. Let’s change that to something more accessible.

Scrolling up in the Render panel, find the “Output” section, and note that there is a folder in the textfield, something like “/tmp”. Click the little folder icon to the right and select a folder you’d like to save your SVG to.

B009b

That’s it! Next time you render your image, you’ll have a SVG file in the path you specified. Note that it takes the name of the frame you are working on, so most likely “0001.svg” if you are working on a single frame.

009

Important Final Step

From here I take the SVG into Inkscape, ungroup all of the lines until they are individual lines. With all the lines still selected (they should be selected after ungrouping), choose the “Simplify” menu option from the “Path” menu.

While all the lines look like single lines between two end points, they are made up of many, MANY individual points along the line. Doing the Simplify pass will reduce those down to two points and make your plotting go much smoother.

There is a way to do a simplification pass inside Blender, but I found that it merges lines in a way that I don’t care for.

From here

You can, of course, use any model you want, and play with values as you desire. There are quite a few Freestyle Line Style geometry modifiers including adding noise to the lines, warping with Perlin noise, or turning the lines into Bezier curves. Play around and have fun!

Printing the unprintable

candle_holder_3In the world of 3D printing, you’ll sometimes end up with models that — for one reason or another — just don’t want to be printed.

These models can come from anywhere: bad scans from Kinect or other DIY scanning solutions, objects made in 3D software that weren’t combined into a solid, or from code that creates 3D objects that were never intended to be made physical. This is a quick walk-through of how I was able to print one of these unprintable objects using a new, (currently) free app.

Continue reading

Steps to Stones, or, Generating Nature

One of the things we love about living in the Pacific Northwest is the abundance of rocks and stones unlike any we have seen elsewhere. I know it sounds strange, but the variation of color, texture, pattern, and shape always provides inspiration and enjoyment. We have collected a fair number from beaches, fields, streams, rivers, and our own land as we dig holes for plantings.

Our front living room is being decorated in a “natural history library” style, with our bookcases, our antique prints of bats, frogs, sea creatures, and of course a collection of rocks placed nicely in an old printer’s letterpress tray and hanging on the wall.

Seven generationsLooking at the rocks recently, I thought that it would be interesting to create my own stones using a generative approach to their design — morphing from rock shape to perfect cube shape — that I could 3D print and put with the real rocks. Having recently done a fair number of designs utilizing Blender’s various deformation tools, I knew this was not going to be a difficult project to model.

Rocks in blender

Seven generations in Blender

Continue reading

Decimated Decor Decorum

Finial UnfinishedOr, finials finally finished.

The Pacific Northwest has proven to be amazing, and as we felt it was worth putting down roots here, we purchased a house! Of course, with any house comes the “to do” list. This time, though, I have my trusty 3D printer to help out.

Immediately there were two things that needed my attention, one mechanical, one ornamental. First was a sliding door guide — nothing terribly interesting, but easy to recreate, 3D print, and have it work like nothing was ever wrong. You can view and download this guide piece on Thingiverse.

Second, the ornamental, were some finials—you know those things at the end of the curtain rods—for the dining room curtains. The ones there were not ugly, just not our style. My wife looked around online and found some that she liked, but they were rather pricey. She said they were on Restoration Hardware’s site, so I went snooping. I found a few that were nice, but I saw some “hand forged” ones that were in the $50 range for two, and looked like something I could recreate and 3D print. So for fun I modeled one, 3D printed it, and showed it to my wife who replied “great – we need three more”. So I got busy.

This post will focus on how to create the “hand hammered” style using various tools, and my choice for finishing it the way I did; a bit of design process, and a bit of crafty craft.

Continue reading

Make your own antiques

Every weekend, my wife and I try to get out of town and visit some neighboring city, island, mountain, or valley. This past weekend was no different — we hit up the 170+ antique stores in Snohomish, WA. While looking through the items from days gone by, I saw two “things” together in a case that made me immediately think of my Makerbot, and I had one of those “I can make that” moments. Or, rather, “I can remake that”.

Continue reading

Mundane Item Number 3 – IKEA shelf clip

Img_2695So we have these metal “lockers” we got from IKEA that we use as media storage. When we moved recently, the movers lost one of the little clips in one of the units and that meant we couldn’t use the shelf inside. As I was thinking about small things to fix around the house, I remembered we were missing this clip and figured it would be a good experiment since A) it was smaller and thinner than anything else I’ve printed, and B) it had a challenging shape — it was curved and had a narrower section that would have to be an overhang.

Pretty Thing Number One

So once I started printing things, my sci-fi loving wife’s eyes sparkled (more than normal) and she had a “we can replace every plastic piece in the house with something custom” moment. What I love about her is this was immediately followed by “you could drive someone mad with real subtle changes, too”. Yes. Indeed.

Continue reading