STL to heightmap with Blender workflow


The max and min settings are quite sensitive. I am working with nearly-flat objects, so the two settings are quite close. I’m not sure why they don’t default to the actual max and min depths of the object, and instead makes you scrub very slowly until you find the points where depth changes from white or black to grey. But I’ve managed it with a dozen objects, now.

The “cylinder all white” meant that the min depth was past the middle of the cylinder, so everything you could see was close than the minimum depth, and thus white which is the closest color, and when it’s all black that means that the max depth is closer than the front of the cylinder so everything is further away than max, and thus is black, which is the furthest color.

Yes, far from obvious.

I’m using Meshlab 2016.12 on a Mac running MacOS 10.12.6.

1 Like

Yeah, whoever programmed their depth mapping shader didn’t make it dynamic enough. If I have time I’ll go back and write one that adapts to the size of the object only, and give more options as to how the sliders work etc.

1 Like

In case it wasn’t posted already, you toggle between orthographic and perspective view in Meshlab using View/Toggle Orthographic View.


And I gave this a shot again today with success. I am not sure why I was having issues previously–of course I didn’t really document my process. But I was able to successfully create a depthmap with Meshlab on the Mac and cut a job that came out amazing. I just need to figure out how to clean it up and I’ll post a separate thread.


sweet! looking forward to seeing it! love me some 3d engraves!

1 Like

I think the key is definitely pushing the object back behind the plane. I think maybe if it’s in front of it, in orthographic view it’s considered negative depth, and the sliders just don’t let you get it into range. Maybe?

Just for reference:

  • Turn on the Background Grid under Render.
  • Left click and drag to get a side-ish view.
  • Move the plane in front of the object: click the manipulator icon (three colored lines meeting at a point), type T for translate, X Y or Z for the axis you want, then click and drag the plane. Return to accept. Click on the manipulator again to get out of manipulator mode. Also turn off the background grid.
  • Select a straight on view from, of all places, the Window menu, View From.
  • Select Orthographic (“5” to toggle).
  • Now, do the business with Render->Shaders.
  • When you go to save the snapshot, you can specify a white background if you haven’t set the background gradient colors in Preferences.

If you manipulate the plane while in orthographic view from a side angle after you’ve got the sliders all set up, you can see that it looks fine as soon as it clears the plane, and bad in front of it.

Tutorial - Creating a Depth Map from a 3D Model for 3D Engraving!
closed #27