Epoxy river trivet [lots of pics]

I started playing around with this site that @Julien linked in his first post and started playing with the idea of making some coasters using those generated gray scale maps. I did not like the low resolution of the maps, or the border and crosshairs, so I forked the program and just edited out the stuff I didn’t want, and then increased the size from 512 x 512 to 1024 x 1024. Here’s that version if anyone is interested. If you want to make the map bigger, just go to the JS window
image
and edit the line:

5 this.width = width-1 || 1024;

By replacing the 1024 with whatever you want. EDIT: You’ll have to log in and fork it to work properly after changing the value. Sorry, I forgot. I know just enough to be dangerous.

I found a simple Java program on Thingiverse that once you follow the instructions installing Java and modifying the path, you just use the DOS command window (CMD) and the command:

java -jar heightmap2stl.jar ‘path to imagefile’ ‘height of model’ ‘height of base’

I created a directory 'C:\Random Height Maps. Then I put all my images in there. Don’t use spaces in the file name (directory name is fine though), the Java program doesn’t like it.

RHM_001.png
RHM_002.png
. . .
RHM_030.png

Then I put the ‘heightmap2stl.jar’ program in the same folder as my pictures. Then I ran the dos command window (CMD) and navigated to that folder and entered:

‘java -jar heightmap2stl.jar RHM_001.png 110 10’

image

Then it generates the STL from that image file. To do the next one is even easier.

  • Hit ‘F3’, which brings up your last command
  • Use left arrow to go back to the ‘1’ and use backspace to delete it and put in a ‘2’
  • Hit enter, and it generated the STL for RHM_002
  • Hit ‘F3’. . . .
    I processed 30 height maps in about 10 minutes like this.

Repeat that for all the gray scale height maps you created.

Then I used FastStone Image Viewer to create negatives of the original images with the batch command, and it processed all 30 pics in about 30 seconds., then I used the same process to make STLs of those as well.

Then, you get these:

The Java program makes the STLs 1mm per pixel it seems, so they come in at over 1,000mm, but using a proportional resize easily gets them down to a printable (or CNC-able) size easily.

7 Likes