Distance Map

by 3D OPERATORS in Addons


HOW TO INSTALL

Start by downloading the .py file. In Blender, go to Edit > Preferences > Add-ons. Click Install in the top bar, search for the .py file and click Install add-on from file. Then, type "Distance Map" in the search bar. Enable the addon and click Save preferences. You are now able to use the addon!


READ ME

The Distance Map addon is visible in the Sidebar (hotkey N) > Distance Map. To generate a distance map, select two objects with mesh data. The distance map is built onto the last selected (active) object. The first selected (inactive) object serves as the target object, i.e. the object to which the distance is calculated. NOTE1: Modifiers are not applied before calculating the distance map. NOTE2: Color and text maps are not updated when an object is transformed after calculating the distance map. NOTE3: Editing the geometry of an existing distance map will lead to invalid measurements.

* Generate Distance Map
Generate a distance map of two selected mesh objects. A new DM (Distance Map) object is added in the Outliner. Multiple distance maps of the same objects will get a prefix DM_v1, DM_v2, etc. Upon generating a distance map, the viewport shading is set to studio lighting "paint.sl" and viewport color is set to "Vertex".

* Raycast Mode
There are two methods to calculate a distance map. The "Normals" mode searches for the shortest distance from the base object to the target object along the vertex normals. Whether a hit was found along the positive or negative normal direction determines the color. If no hit was found, the out of range color is used. The "Nearest" mode searches for the shortest distance to the target object in any direction. The terms "positive" and "negative" are ill-defined in this context; this method therefore only uses the positive color. In contrary to the "Normals" mode, this method yields results for every vertex, as it searches in any direction.

* Maximum Distance
This is the maximum search depth and hence, also the maximum distance for the color map. The out of range color is used for distances beyond the maximum search depth.

* Color Map Levels
Number of color levels that is used for the color map.

* Use Selected Geometry
If this box is checked, the distance map is calculated using only the selected geometry of the base and target objects. Make sure a selection is made on both objects in Edit Mode.

* Positive Color
Color that is used for positive distances.

* Negative Color
Color that is used for negative distances (disabled in "Nearest" mode).

* Out Of Range Color
Color that is used when no raycast hit was found (disabled in "Nearest" mode).

* Show Distances
Display the distances of the active DM object in the viewport.

* Show Color Map
Display the color map of the active DM object in the viewport.

* Font Size
The font size of the distances in the viewport.

* Decimals
The number of decimals of the distances in the viewport.

* Font Color
The font color of the distances in the viewport.

* Export Distances
Export the distances of the active DM object to a text file. The values can be copied to other software for further analysis. In the text file, row index corresponds to vertex index (both starting at 0). A "nan" value indicates that there was no raycast hit for this vertex.

Sales 30+
Customer Ratings 2
Average Rating
Dev Fund Contributor
Published over 4 years ago
Blender Version 2.8, 2.81, 2.82, 2.83, 2.9, 2.91, 2.92, 2.93, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6
License GPL
Have questions before purchasing?

Contact the Creator with your questions right now.

Login to Message