1

I am trying to take three grayscale PNGs and turn them into an ASCII file for a CNC machine to mill them out. To get an idea of my project, here are some links:

This guide is the basic premise of what I'm trying to do. Except instead of creating a mural of states, it will be a three part mural of this image that I took on a vacation.

This video is very similar to what I'm doing, except he doesn't show much of the tech process behind it. Here is a timestamp of the finished product in that video.

These are the grayscale images I have photoshopped.

Here are the basic steps of what I'm doing.

  1. Open QGIS
  2. Drag a png file in
  3. Raster>Conversion>Translate(Convert Format)
  4. Get an error about 4 bands and it only allowing 1 band

I don't particularly understand how to go about doing this. I just want to make a nice birthday gift for my mother by milling out an artpiece of a photo from our vacation together.

I'm completely open to trying other programs as well.

  • 2
    I'm a bit unclear on what you're hoping your final product will look like. Both of the projects that you referenced are creating a 3-d model of the land surface by using elevation data to control the z-axis (vertical axis) in the milling process, so that the mountains are bumps and the valleys are depressions in the final product. Your photo is a not elevation data, so I want to clarify what it should look like in the end... should the dark areas be left high and the light areas cut deeper into the material? – cmrRose Jan 2 '18 at 23:09
  • Yes, that's exactly it. In the video referenced, he took a photo of Mount St. Helens and then turned that into elevation data. How you described it is exactly what I am looking to do. – Jacob Otto Jan 3 '18 at 2:18
  • As I understand it, the photo of Mount St Helens was a reference to lay out the different colors of wood comprising the block of material. The elevation data for the terrain was downloaded separately, probably from Earth Explorer as described in the Make Magazine article. Do you have a particular geographic area that you want to carve, like a mountain or a canyon? Or are you just trying to do a mosaic of wood that looks like your photo (basically just the beginning part of the youtube video- with a final product like at 9:19 - youtu.be/Z0A03jskWVg?t=9m19s)? – cmrRose Jan 3 '18 at 17:18
1

You can't convert your photo to actual elevation data, but you can convert your PNGs to Ascii Grids.

In your image editor (I used GIMP, but PS should be similarish, Can also do this in QGIS but it's more complicated):

  1. Flatten each of your PNG images from RGB to greyscale (In GIMP: Image menu > Mode > Greyscale);
  2. Remove your alpha channel/layer transparency, ensuring that the previously transparent areas have either a 0 (black) or 255 (white) values
  3. Export as TIFF file

enter image description here

enter image description here

In QGIS: 1. Use Raster > Conversion > Translate tool to convert each of the new TIFFs to ArcInfo Ascii Grid format. Because my previously transparent areas were white, I set 255 as the NoData value.

enter image description here

  • Thank you so much! Your suggestions have been more than invaluable and simply getting to the step I am at now is a huge relief. There does appear to be a small issue and I was hoping you could shed some light on it, but if not I perfectly understand. (Apologies for formatting, the internet has gone down all day so I cannot hit return without it posting the comment) It appears that it is recording the edge of my selection as a black value in ascii, resulting in this: imgur.com/pBQy0AJ (I have feathered the edges with white in PS and the same thing happens). Any ideas? – Jacob Otto Jan 4 '18 at 3:24
  • @JacobOtto I don't use PS, but have had similar issues in GIMP. Resolved by turning off feathering selection and then expanding/buffering the selection. Can't use newlines in comments. See also gis.stackexchange.com/help/someone-answers – user2856 Jan 4 '18 at 3:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.