Merge by distance produces unexpected results #78916

Open
opened 2020-07-14 14:06:54 +02:00 by Andrii Mykhailov · 17 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.48

Blender Version
Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-07-12 09:05, hash: f319eec881
Worked: N/A

Short description of error
Merging vertices of a few straight edgeloops produces jagged edgeloop instead of straight one.

Exact steps for others to reproduce the error

  1. Open attached blend file
  2. Select vertices of three edgeloops in the middle.
  3. Apply Merge by distance and increase threshold until they collapse into single edgeloop.
  4. Check attached image to compare results of same operation in other editors.

by_distance.blend
merge_by_distance_bug.jpg

**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.48 **Blender Version** Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-07-12 09:05, hash: `f319eec881` Worked: N/A **Short description of error** Merging vertices of a few straight edgeloops produces jagged edgeloop instead of straight one. **Exact steps for others to reproduce the error** 1. Open attached blend file 2. Select vertices of three edgeloops in the middle. 3. Apply Merge by distance and increase threshold until they collapse into single edgeloop. 4. Check attached image to compare results of same operation in other editors. [by_distance.blend](https://archive.blender.org/developer/F8693512/by_distance.blend) ![merge_by_distance_bug.jpg](https://archive.blender.org/developer/F8693513/merge_by_distance_bug.jpg)

Added subscriber: @zelfit

Added subscriber: @zelfit

#98438 was marked as duplicate of this issue

#98438 was marked as duplicate of this issue

#83273 was marked as duplicate of this issue

#83273 was marked as duplicate of this issue

Added subscriber: @Diogo_Valadares

Added subscriber: @Diogo_Valadares

I never noticed it, it doesn't merge "at center", it merges on one of the vertices "randomly".

image.png image.png

I never noticed it, it doesn't merge "at center", it merges on one of the vertices "randomly". ![image.png](https://archive.blender.org/developer/F8693626/image.png) ![image.png](https://archive.blender.org/developer/F8693628/image.png)

Yes exactly. It is kinda unpredictable and can create unnecessary problems when i simplify lowpoly for example.

Yes exactly. It is kinda unpredictable and can create unnecessary problems when i simplify lowpoly for example.

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Added subscribers: @ideasman42, @JacquesLucke

Added subscribers: @ideasman42, @JacquesLucke
Member

This might be a feature request, will let @ideasman42 decide.

This might be a feature request, will let @ideasman42 decide.

Added subscriber: @mont29

Added subscriber: @mont29

Would call that a known issue/TODO. Current behavior is clearly not desired one, but code is behaving as expected (one vertex can only have one detected double, so depending on their order in the mesh both side ones will have center one as double, and merge into it, or the middle one will have one of the side ones as double and merge into it, and then the other side one will merge later when distance is further increased).

This likely needs quiet some refactor of the merge BMesh code...

Would call that a known issue/TODO. Current behavior is clearly not desired one, but code is behaving as expected (one vertex can only have one detected double, so depending on their order in the mesh both side ones will have center one as double, and merge into it, or the middle one will have one of the side ones as double and merge into it, and then the other side one will merge later when distance is further increased). This likely needs quiet some refactor of the merge BMesh code...

Added subscribers: @mano-wii, @Stan_Pancakes

Added subscribers: @mano-wii, @Stan_Pancakes

Added subscriber: @thinsoldier

Added subscriber: @thinsoldier

Any chance of this being fixed this year?

Any chance of this being fixed this year?

Added subscribers: @Rigoletto, @OmarEmaraDev

Added subscribers: @Rigoletto, @OmarEmaraDev

I understand that it is by design, snapping to the first found vertex in the threshold,
but when i visually snapping to a vertex for merge, and then it is merged with another vertex is bad. You expect to merge what you see.

It should merge to the nearest in the threshold, to take randomize away and make it predictable.
If "Snap" is turned on it should use the snapping target instead.

I understand that it is by design, snapping to the first found vertex in the threshold, but when i visually snapping to a vertex for merge, and then it is merged with another vertex is bad. You expect to merge what you see. It should merge to the nearest in the threshold, to take randomize away and make it predictable. If "Snap" is turned on it should use the snapping target instead.
Philipp Oeser removed the
Interest
Modeling
label 2023-02-09 15:29:05 +01:00
Contributor

Since the Merge by Distance geometry node has the desired behavior (i.e. merging to the average position), the addition of node-based tools in Blender 4.0 makes it trivial to create your own operation as a workaround:
Screenshot 2023-11-18 at 3.57.17 PM.png

Since the Merge by Distance geometry node has the desired behavior (i.e. merging to the average position), the addition of [node-based tools](https://docs.blender.org/manual/en/4.0/modeling/geometry_nodes/tools.html) in Blender 4.0 makes it trivial to create your own operation as a workaround: ![Screenshot 2023-11-18 at 3.57.17 PM.png](/attachments/dc45dd9c-0381-40eb-9eee-18fdcbf8fb79)
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
9 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#78916
No description provided.