Image to Distance Map: turn an image into a distance map or relief

Turn a grayscale image into a relief, as a distance map or a mesh

2 min read
In the app
  • Distance MapsImage to Distance Map

Image to Distance Map (Distance Maps › Image to Distance Map) reads a grayscale image and turns its brightness into height: a distance map or, with one checkbox, a mesh. Use it to make a relief from a height map, a logo or a depth image, including one saved earlier with Distance Map to Image.

Images do not open with Open Files; load them with this tool.

Image to Distance Map command in the toolbar.

Load an image

  1. Click Image to Distance Map. A file window opens.
  2. Choose a PNG, JPEG or TIFF file and click Open. The Image to Distance Map panel opens.

File picker for importing an image into the distance-map tool.

Brighter pixels become higher points: white gets the full Max Height. Color images are converted to brightness first.

Image to Distance Map panel with a depth image exported from MeshInspector loaded back: two percentage sliders, the value histogram, Max Height 100, Pixel Size 1 by 1 and Import as Mesh

Panel settings

Setting What it does Default / tip
File path and Load Image The loaded file; click Load Image to choose another one. —
Info Collapsible block with the image resolution. —
Upper slider Pixels darker than this percentage of white become empty (no data). 0.392%: pure black pixels are empty
Lower slider Pixels lighter than this percentage of white become empty. 100%: nothing is cut
Histogram How many pixels have each brightness; two vertical markers show the slider positions. Use it to place the sliders between the background and the part
Max Height Height given to white. Other gray levels get a proportional height. 100
Pixel Size Size of one pixel in scene units, along X and Y (two fields). Sets the width and length of the result. 1 × 1
Import as Mesh Creates a mesh instead of a distance map. Off

Click Import to create the object. It is named after the image file and appears in the Scene tree; the panel stays open, so you can change the settings and import again.

Example: a depth image loaded back

The image below was exported with Distance Map to Image from a map of a part with engraved text, then loaded back with Pixel Size 0.13 × 0.13 (the pixel size of the original map) and Max Height 5. The image does not carry the real size, so these values were set by hand.

Distance map created from the exported depth image: the part outline, four holes and the engraved MeshInspector text are restored as a 5 mm high relief

To get a mesh from a distance map you imported, use Distance Map to Mesh, or turn on Import as Mesh before Import.

Customize Consent Preferences

We use cookies and similar technologies, such as local storage. You will find detailed information about all of them under each consent category below.

To learn more about how Google processes personal information, visit: Google privacy policy

Always Active