Is there a way in Blender to compare two pieces of mesh or two meshes to its similarity? Maybe with some script or an addon.

What I mean: there is a stone or brick broken into half for example: example

This is a kind of forensic or architectural task. The goal is to prove that those 2 pieces have similar surfaces and may be connected to each other with some threshold or they were a one piece before. I know of "select similar" in Blender, similar face area in this case, but it doesn't work quite well for such a task.

I am not a coder so I can't figure out a possibility of solving this.
So what is the way to do it?

  • 3
    $\begingroup$ The bmesh python module has calc_volume which could be a quick test to see if you need further testing. I would look at the normal baking code, it measures distance between two meshes, maybe you could bake a normal map - the bigger the colour difference the bigger the variation in surface. $\endgroup$
    – sambler
    May 5, 2015 at 15:05
  • $\begingroup$ The problem is you aren't really measuring the similarity of two meshes but rather how well they fit together. If they were similar you could just use something like iterative closest point to align them and then compare them . For your current problem, you have to compare one mesh in every orientation over the entire surface of the other mesh. You could try manually setting a best guess position and then get some minimisation function to tweak the transform until the points of the mesh are as close as they can be without any severe intersections. $\endgroup$
    – user14175
    May 5, 2015 at 17:34
  • $\begingroup$ @sambler Great idea! Why not writing this as answer? I would like to upvote it :) $\endgroup$
    – p2or
    May 8, 2015 at 9:38
  • $\begingroup$ I've been noticing that this is a problem everywhere-- robotics and industry cad stuff to mention a couple. I'm thinking about using the automated bio molecule docking software like ftdock or gramm or something. Those people REALLY do NOT mess around. The only issue there is you have to turn your meshes into proteins for a bit. $\endgroup$ Apr 25, 2016 at 3:03
  • $\begingroup$ This is generally an NP-hard computer science problem (graph isomorphy), meaning that even for small meshes, the work to be done in order to solve this problem quickly becomes prohibitive. However, it would be possible to solve this fairly efficiently if the user helped by selecting a few vertices that are known to match in both meshes. $\endgroup$
    – Pascal
    Jan 3, 2018 at 1:33

3 Answers 3


This is actually a not so trivial problem. You might be better off asking this question on the maths stack exchange as it will require more than just Blender knowledge.

This will require coding skills as well, I fear.


You may consider using other better suited software for your purposes. MeshLab has several functions to compare meshes or clouds of points. Another choice would be CloudCompare. Both are open source projects with a large user base.

  • 1
    $\begingroup$ Can you elaborate? Comparing vertices (point cloud) is also possible via python api. $\endgroup$
    – p2or
    Jun 10, 2015 at 20:26

Another approach in Blender would be to use the physics engine while in Blender Render mode. You could orient the first half of the broken object such that its broken face was facing upward in the positive Z direction. Select the physics tab in the tool bar and add it as a passive object. Orient the second half of the broken object above it, with the candidate face facing downward. Set this half to active. The default rigid body world gravity settings will pull the second half into the first and try to settle the pieces together. Make sure the collision boundaries are using the 'mesh' setting to get good fidelity of the contact surfaces. Once it is settled, you might use some of the other answers regarding measuring the distance between meshes to come up with a root mean squared metric to decide how well they fit.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .