Generating 3D Objects from Heightfields

462
Downloads
382
Views
Published on March 28, 2010

Description

This is the result of a little processing sketch i wrote. It takes any
bitmap heightfields like the one in the images and turns it into a stl file
that can be printed on a makerbot

local-guru.net/blog/2010/03/28/generating-3d-objects-from-heightfields

Instructions

download and run the processing sketch from my blog post,
scale and rotate the stl object in blender
let blender remove the doublicate vertices to simplify the mesh
slice it using skeinforge
and print it on your 3D-Printer
Tags
This Thing has no tags.
Report as inappropriate

You must be logged in to post a comment.

I don't think this works anymore on the latest version of processing -
&
gt; I can't get the unlekker library to export STL files. Let me know if it still works for you or if you know how to fix it.

Sounds great! What program or environment do you run the sketch in?

Thanks

the sketch is in processing. its a javabased programminglanguage, you can get at processing.org

I love this, but I was wondering how I implement it with with any black and white image. I've been trying to follow the code, but to be frank, I'm an engineer not a programmer, so it's a little difficult to follow from scratch.

Think you could offer some advice on how to take our own black and whites and turn 'em solid?

Thank you so much guys, it works likes a charm. Now I've just got to work out blender.

My version of this is here: http://davemenninger.blogspot....

imports on image instead of using the graphics

open the pde file using processing, save it to your sketchfolder,
then select "Add File from the sketch Menu and add an image in
png, jpeg or gif format. look for the setup method and replace anything
between img.beginDraw and img.endDraw() by

PImage logo = loadImage("logo.png");
img.image( logo, 0, 0, 100, 100 );

(given your graphic has the name "logo.png")

the graphic should be square to work with the code without modifications
and will be scaled to 100x100 pixel other resolutions are possible , but not without changing the draw method

hope that helps

Excellent! My only regret is I found out about the .stl library AFTER writing a clumsy STL reader of my own...

Cool one, I'm liking it. I'll be giving this a try right quick.

Could you add the Processing sketch here, in case your blog ever becomes unavailable?

Excellent! So, it takes bitmaps and makes Makerbottable stuff.. this means easy braille, text and even curves if I don't miss my guess?

To what extent does it "smooth" edges? Are the soft edges in your model due to a soft colour transition in the heightmap, or the processing sketch's way of handling colour boundaries?

Thanks for sharing this!

exactly - in the examplesketch i generate the bitmap by using the processing drawing primitives but it could be generated using gimp etc

without the smoothing the edges would be much steeper (like the transitions between the black and the gray area) it generates triangle-fans for two neighbouring rows. A single white dot on a black image would result in a pyramid shaped spike for example