Distance Map Boolean: merge or subtract two distance maps

Combine or subtract two distance maps pixel by pixel

3 min read
In the app
  • Distance MapsDistance Map Boolean

Distance Map Boolean (Distance Maps › Distance Map Boolean) makes a new distance map from two others by comparing their values pixel by pixel: the larger value, the smaller value, or the difference. A typical use is Subtraction of two maps of the same part, before and after a change, to see only what changed.

Distance Map Boolean: Where to Find

Prepare two matching maps

The tool pairs pixels by their position in the grid; it does not align or resample the maps. Make both maps the same way:

  1. Place both meshes in the same position.
  2. Set the same camera view, for example Top.
  3. Convert each mesh with Mesh to Distance Map using the same Pixel Size, so that both maps get the same resolution.

This gives matching grids only when both meshes also have the same outline in that view: each map covers the bounding box of its own mesh, so a part that is larger or shifted gets a map that starts elsewhere or has more pixels, and the result shows differences that are not there. Before you subtract, check that both maps have the same resolution in pixels and cover the same area.

Run the operation

  1. Select exactly two Distance Map objects in the Scene tree. With any other selection the tool is not available.
  2. Click Distance Map Boolean. The panel has three buttons.
  3. Click the operation you need. You can click several buttons in turn; each click adds one more map.

Distance Map Boolean panel with two distance maps of a part, before and after engraving text, selected in the Scene tree

Button Result in each pixel New object
Merge Max The larger of the two values. Where only one map has data, its value is used. Distance Map Max
Merge Min The smaller of the two values. Where only one map has data, its value is used. Distance Map Min
Subtraction The value of the first map minus the value of the second one. Pixels where either map has no data stay empty. Distance Map Sub

The first map is the upper one of the two in the Scene tree. The new map gets the resolution and position of the first map and is added at the top level of the Scene tree; the two source maps do not change. In a map made with Mesh to Distance Map, a larger value means a point farther from the camera.

Example: what changed after engraving

Two maps were made from the same part before and after engraving text, with the Top view and Pixel Size 0.13 (1,216 × 239 pixels each). Subtraction gives a map that is flat (zero) wherever the part did not change, and only the engraved text stands out. The four through-holes have no data in both maps and stay empty.

Distance Map Sub: the result of subtracting the after-engraving map from the before map is flat except for the MeshInspector lettering

Merge Max and Merge Min

The two merge operations combine maps of different shapes into one. Here are the results of Merge Max and Merge Min for one pair of maps, with the source maps hidden:

Distance Map Boolean: Merge Max

Distance Map Boolean: Merge Min

To continue with the result as a mesh, use Distance Map to Mesh; to save it as a picture, use Distance Map to Image.

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