Merge by distance to center
Well, it mostly in the title. I think it's logical at least to have an option to merge by distance to center, not to one of the vertices.
Well, it mostly in the title. I think it's logical at least to have an option to merge by distance to center, not to one of the vertices.
17 Comments
Wow, thats dissapointing as hell - I also always thought that Remove Doubles (or Merge by Distance in 2.8) merges vertices in the center. I don't see the reason why they even implemented it that way? :( Upvoted immediately! Thx
* @Jan Kadeřábek * Really! What a shame that Blender doesn't have this option in "Merge by Distance" in Mesh Editing mode. Maya has it, 3Ds Max had it for ages, Modo has it... But Blender... why? =|
Use newly added Weld Modifier, that works as expected - you can assign shortcut to create, and also to apply (by name of modifier).
* @jiri.pos * Thank you. It's the only option right now.
* @Yan Kansky * It's a question, why this option isn't in edit mode like other modifiers are. There is weld, but this does something else.
damn! you are right!! i was sure it works to center but its not..
The Array modifier merges vertices by distance of each instance in such random way too...
I think I have even a better example:
Let's say i want to rework the mesh to allow me to make a circular edge cut:
{attachment screenpng}
So, I select the vertices as I want to merge <b style="color: red;">BY DISTANCE</b> and <b style="color: red;">AT THEIR CENTER</b>. But I get this:
{attachment screen1png}
I noticed that they merge following 2 rules:
Obviously merge if the vertices are at the given distance.
<b style="color: aqua;">MERGE IN THE ORDER THE VERTICES WHERE CREATED</b> by checking in the "action history".
In other words, is a <b style="color: yellow;">merge to newer vertice with a distance restriction</b>. You cannot deny that would be more useful if they would merge at center; or even at first or last selected by checking the selection history, not the active vertice as it would break the iterative behaviour.
All this said, I suggest <b style="color: LawnGreen;">two options</b>, the easiest, and the hardest but more senseful:
Change the behaviour of the merge by distance to a "iterative merge at center with distance restriction". It sound worse that it really is:
Once the code knows which vertices has to be merged, instead of merging the vertices into the last created vertice, run a "merge at center"-ish action with this and only this, not all selected vertices.
{attachment screen2png}
A reasonable option is to REMOVE MERGE BY DISTANCE and add a distance restriction to this list with a boolean/toggle option. When the option is unabled, then it would behave as ususal.
When <b style="color: aqua;">collapse</b> or <b style="color: aqua;">at cursor</b> is used, this parameter would be <b style="color: LawnGreen;">HIDDEN/ALWAYS FALSE/ALWAYS UNCHECKED</b>.
When <b style="color: aqua;">at last</b> or <b style="color: aqua;">at first</b> is used, this parameter would be <b style="color: LawnGreen;">FALSE/UNCHECKED BY DEFAULT</b>.
When <b style="color: aqua;">at center</b> is used, this parameter would be <b style="color: LawnGreen;">TRUE/CHECKED</B> <b style="color: LawnGreen;"><b style="color: firebrick;">ONLY</b> WHEN THERE ARE VERTICES CLOSER THAN THE CURRENT DEFAULT DISTANCE (0.0001 m)</b>. Is a precondition, and there should be a precalculation before finishing the process.
The merge at center is not that used with high-poly models (when the merge by distance is mostly used), so when all vertices are selected, what the user most of the times want is to remove the doubles, and therefore the minimum distance.
It could look something like this:
{attachment screen3png}
In the case I first shown, with the first solution I just would have to click at "merge by distance" and scroll the maximum distance up.
With the second, click at "merge at center", check the toggle "mimimum distance" and set it to the wished value. Or press <b style="color: aqua;">SHIFT + R</b> to repeat the action. As the first round got ride of all doubles, the second one would do a current "merge at center".
The second one could seem to be overcomplicated, but it has <b style="color: LawnGreen;">more flexiblity</b>, as it let you to choice the behaviour you want to have the current "merge by distance".
Another very useful and quite underrated are the options with <b style="color: LawnGreen;">at first</b> and <b style="color: LawnGreen;">at last</b> .
<b style="color: aqua">For example:</b>
Let's say I want to create a <b style="color: yellow;">wave pattern</b> in a UV sphere. With this feature is very easy to do:
Make an edge cut in the UV sphere, select 2 equatorial edges and run a checker deselect (I would put an image, but it only allows 4 in a message).
Then reselect the edges and merge at last with some distance restriction.
{attachment screen5png}
This is quite a big one 😅, but I really wanted to pull it out as there has been may years without any key addition to the edit mesh.
This is a really interesting proposal imo, it would require keeping track of "groups" of vertices to merge, computing their centers, and merging all verts in a group simultaneously. Depending on how much of this infrastructure already exists (sorting verts into non-overlapping groups of maximum spatial size), this could be a difficult but not impossible programming task.
That's too subjective, please explain yourself a bit better, btw we already have that
* @Sebastian Villanueva * I know that blender has merge vertices at center, but I'm talking about Merge By Distance function. At the moment it merges close vertices at one of the vertex positions. What I'm suggesting is to add an option to merge them at center. Let me visualize what I mean.
Let's say I have some mesh, just for example:
I want to collapse this shortest edges (again, this is just for simplified example, I know about collapse edges function) . I'm setting the distance I want vetices to merge at and at the moment, I'm getting this result:
But what I'm proposing is to make an option to get this result instead:
I hope I made my thoughts clear.
* @Nekronavt * But then the "by distance" has nothing to do with what you are doing, it is a merge at center on a selection of two vertices.
* @-L0Lock- * this example is exaggerated for best visualization. when vertices are near same thing happens - one of them moves to another, but its wrong behaviour - it should be center distance of them ---find blender among this ... imgur.com/KucGiwu
* @-L0Lock- * By distance is usually used on multiple verts. Imagine having a total of 10 verts that you want to merge by distance, then imagine having 100, or 1000. It becomes impractical to select the groups you want and manually merge at center.
* @etufo2 * its perfect. But which vertex for offset among this 1000 will choose current blender algorithm?) M maybe this misunderstanding cause blender state doesn't allow to clean up really heavy geo... Who knows...
* @-L0Lock- * I think I clearly stated that it's just for example purpose. Okay, I'll try to make a more obvious one.
I have this test grid mesh here:
I want o quickly merge this crossed section like this:
At the moment I need to select them one by one (imagine if there is more than 3) and merge at center.
But I want a quicker way to do this. I'm trying merge by distance and getting completely random looking and inconsistent result:
Again, it's not some practical problem, it's just to show a flaw in function logic (in my opinion of course).
And by the way, as far as I know, weld by distance in Max working exactly as I'm telling - to the center.
I'm very disappointed this isn't the way it is already implemented. I ended up needing to merge by distance for non-microscopic things and picking a random side won't cut it here.