Scan Deviation
Requirements and installation
- Blender 4.2 or newer (tested on 4.2 through 5.1).
- Pure Python add-on. No extra libraries to install.
Install
- Download
scan_deviation.zip. Do not unzip it. - In Blender, open Edit > Preferences > Add-ons.
- Open the small dropdown arrow at the top right of the Preferences window and choose Install from Disk... (in older 4.x layouts this is the Install button).
- Select
scan_deviation.zipand enable Scan Deviation. - In the 3D Viewport, press N and open the Deviation tab.
Quick start
- Put both meshes in the same scene and make sure they are already aligned. Stay in Object Mode.
- Check your scene units in Scene Properties > Units so that Blender units match your real size. The panel shows a line such as
1 BU = 1000 mm. - In the Deviation tab, set Reference Mesh (the truth: CAD, original, high-poly) and Scanned Mesh (the mesh you want to see colored).
- Click Calculate Deviation.
- Set your tolerance (for example 0.1 mm) and the Min / Max range (for example -0.5 to +0.5 mm). The colors update instantly, with no need to recalculate.
- Read the Statistics. Click Clear Analysis when you are done.
The one concept to remember: Reference and Scanned
- Reference Mesh is what you compare against. It is not colored, not changed and can keep all of its modifiers.
- Scanned Mesh is the mesh that receives the heat map. Every vertex of this mesh gets a deviation value.
The heat map is always painted on the Scanned mesh. That is by design. If you want to see the colors on the other object instead, simply swap the two slots and calculate again.
Panel reference
Reference Mesh / Scanned Mesh. Pick from meshes that exist in the current scene. Objects you deleted from the scene do not appear in the list.
Calculate Deviation. Measures every vertex of the Scanned mesh against the Reference surface and paints the result. You must be in Object Mode.
Stable Sign Far From Surface. Where the scan is far from the reference (or past the reference's edge), deciding "above or below" is ambiguous and can produce random red and blue patches. With this on, those vertices take the sign of reliable neighbors, so a distant area gets one consistent color. Leave it on in most cases. It is applied when you click Calculate.
Tolerance
- Units. Millimeters, centimeters, meters, inches or Blender Units. The real size comes from Scene Properties > Units > Unit Scale. Changing the unit converts your tolerance and range values for you.
- Positive (+) / Negative (-). The accepted deviation above and below the reference. Anything inside is green.
Color Map
- Min / Max. The range of the color map. Deviations beyond Min or Max are shown in gray, so out-of-range areas are obvious. A common starting point is a range of 5 times the tolerance (tolerance 0.1 mm, range ±0.5 mm).
- Color Steps. 0 gives a smooth gradient. A value from 1 to 64 turns the gradient into that many discrete color bands.
- Display. Shows or hides the color scale in the viewport. The dropdown next to it moves it to the Left or Right side (default: Left).
Statistics
- Minimum / Maximum. The most negative and most positive deviation found.
- Average. The signed mean. Positive and negative areas can cancel each other out, so read it together with RMS.
- RMS. The root mean square of the deviation. A single number for "how far off is the scan overall", with no cancelling.
- Within / Outside tolerance. Percentage of the surface inside and outside your tolerance.
- Area-Weighted Statistics. When on, each vertex is weighted by the surface area around it, so dense areas do not dominate the numbers. This only affects the averages, RMS and percentages, never the colors, and the difference is small on evenly dense meshes.
Clear Analysis. Removes the heat map and the stored deviation values from the Scanned mesh and restores the color attribute that was active before.
Reading the color map
- Green: inside tolerance.
- Yellow to red: above the positive tolerance. Yellow is just outside, red is at the Max value.
- Cyan to blue: below the negative tolerance. Cyan is just outside, blue is at the Min value.
- Gray: beyond the Min / Max range.
Positive means the scan is on the side the reference's normals point to (outside, for a closed model with outward normals). Negative means the opposite side.
The color scale in the viewport shows the Max, the + tolerance, the - tolerance and the Min with their values and unit, with the tolerance zone marked.
Disclaimer
Scan Deviation is a visualization and analysis aid for Blender. Results depend on the quality of your meshes, their alignment, your scene unit settings and the direction of the reference normals. The add-on is not a certified metrology or quality-assurance tool, and it is not intended as the sole basis for safety-critical, legal, contractual or production-release decisions. Verify critical measurements with calibrated instruments and certified inspection software.
The add-on is provided "as is", without warranty of any kind. The author is not liable for any loss or damage resulting from its use.
Changelog
1.0.0 — Initial release
- True surface-to-surface deviation using BVH trees
- Heat map projected on the scanned mesh, non-destructive
- Tolerance and range in mm, cm, m and inches
- Gray out-of-range, optional color steps
- Viewport color scale (left or right)
- Statistics: min, max, average, RMS, within and outside tolerance
- Stable sign for areas far from the reference