Dissolve can create duplicate faces / invalid geometry (leading to crashes on further modeling operators such as Subdivide Edges) #70977
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
8 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#70977
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system:
Graphics card:
Blender Version
Broken: 2.81 R970d7ed all the way back to 2.70a
Worked: likely never
Short description of error
Using the dissolve tool it's possible to create faces sharing the same boundary edges.
Exact steps for others to reproduce the error (using Dissolve Faces):
Based on the default startup .blend file,
See also #120143 for a example of .blend file that crashes
Exact steps for others to reproduce the error (using Dissolve Vertices):
You should be left with a "plane" that has 4 vertices, 4 edges, and 2 faces. None of the options for the Dissolve Selection (the ctrl+x) tool seem to help against it. I don't think that any of the built-in clean up helpers can detect these either, at least directly. Select Non-Manifold can be of some small help, if there's some adjacent geometry, but if there isn't (as in this example), it won't select anything.
Exact steps for others to reproduce the error (using Limited Dissolve):
F
A
andX
> Limited DissolveThen try to dissolve one vertex with
X
> Dissolve Vertex. One face gets deleted.Added subscriber: @Stan_Pancakes
#103482 was marked as duplicate of this issue
Sorry, the commit hash isn't meant to imply that commit broke the tool (i.e. the 'mention'). It's simply the hash of the beta build used.
Added subscriber: @RodDavis
More info is needed.
Click "Report a bug" from blender. A template will be autofilled with the Operating System, Graphics card, and Broken build. Copy this info and paste it in this bug report.
@RodDavis, unless you mean to tell me that on your system and graphics card (which are irrelevant in this case) you're not able to reproduce the issue, the report shall stay as is, thank you very much.
Added subscribers: @mont29, @ideasman42, @lichtwerk
Can confirm.
Not quite sure if this would be considered a bug [I guess so though], confirming for now.
Note you can always run
ob.data.validate()
[this will correct those kind of issues]There is code detecting this in the corresponding part of
BKE_mesh_validate_arrays
(BM_mesh_validate
doesnt catch this), but not sure if this is really desired? (could be slow?) Are there alternatives? implement something likeIS_FACE_FACE_DUPE
inbmesh_elem_check
?CC @ideasman42
CC @mont29
AFAIK, it has been like that since... pretty much since dissolve existed, I guess. So it could be dubbed a historical notabug :) Joking aside though, this kind of geometry is rather nasty, so if user-facing tools can be made to avoid creating it, IMHO it should be done.
Dissolve can create lamina facesto Dissolve can create duplicate facesAdded subscriber: @dr.sybren
Updated the task description to simplify it a bit. The issue is still the same, though.
bpy.object.data.validate()
indeed fixes the issue, but IMO such a step should be done after the dissolve operator has run.I tested with Blender 2.65a and there it produces completely wrong geometry. 2.70a already had this duplicate face bug.
I've marked this as a known issue as it's been in Blender for so long, there is a workaround (albeit a oneliner of code), and I don't know when this will be fixed.
Fair enough, I've edited as well to make repro even simpler.
Added subscribers: @Harry-Kunz, @mano-wii
Added subscriber: @vasiln
I would like to make the case that this is not a bug. This is important not just for this particular issue, but as part of a wider philosophy. I am coming here from a discussion at https://blender.stackexchange.com/questions/282322/is-having-2-or-more-faces-with-all-shared-vertices-a-bug-or-valid-geometry/282325#282325 , and I'll try and offer a synopsis of my arguments there.
Blender regularly allows users to make "bad" meshes. If the user has a problem with bad meshes, then the solution is for the user to not make bad meshes.
It is expected and unavoidable that 3D tools work in an expected context and have unusual behavior outside those contexts. Automatic weights don't work well on meshes with holes; unwrapping can't figure out how to handle 3 faces connected by a single edge. That's okay.
Additionally, what makes a mesh "bad" is dependent on the context of how that mesh is going to be used. Is that 3-face, 1-edge mesh "bad"? It's not good for a lot of purposes, but it interacts differently with a smooth modifier, and it can be followed up with a mask modifier to make it "good" again. Non-manifold geometry is often "bad" for rendering but useful for other purposes, and I give the examples of physics meshes where I regularly use non-manifold geometry to create the forces that I want.
I do not use doubled faces; the behaviors I mentioned above can be done with loose edges rather than any faces. But there are conceivable situations where a user would need doubled faces to get some technique. After all, they can't have face or corner attributes for use in GN without having faces. They can then "fix" their geometry by deleting the bad stuff when they're done with what they needed those attributes for.
Again, the solution to bad geometry is for the user to not make bad geometry if they don't want it, not to take away the users' power to make it when they want it.
In some cases, we can find that a tool can be improved to work in contexts broader than it was originally intended for. For example, a merge by distance could be made to be more aware of the potential for non-manifold geo and doubled faces. In these cases, it's appropriate to adjust the specific tool (also, appropriate to say, "Then don't use it that way.") But it's part of life that Blender's operations act on expectations, and when they behave strangely in unanticipated contexts, it is not the context that is the bug.
the solution to bad geometry is for the user to not make bad geometry if they don't want it > This is an assumption that this type of doubled-face geometry only happens when the user chooses to create it. Unfortunately that is not always the case. This type of bad geometry is not always intentionally created. There is a discussion for example in this thread where the users were confused on what was going on and how they could fix their dilemma. I am sure there are many more of these confusing cases. Fortunately there is a workaround
for m in D.meshes: m.validate()
but you need to know about it first and it isn't exactly easy to discover the solution. Also if you dissolve just 1 vertex, all the faces merge into 1 face which meant that Blender detected this as bad geometry and fixed it. If the double-faced geometry was desired then Blender should not have merged these faces.I would also vote for blenders tools/operators to not result in something that
mesh.validate()
would deny as valid.Also: this kind of geometry can easily lead to crashes afterwards, as reported in #116217
Dissolve can create duplicate facesto Dissolve can create duplicate faces / invalid geometry (leading to crashes on further modeling operators such as Subdivide Edges)I have a model with duplicate edges. 2 vertices shared by 2 edges. So this is apparently also possible with edges, not just faces. I have attached a blend version 4.0 file where you can reproduce it. Just select the object and run the script in the blend file. You will see an orange line appear in object mode. Go into edit mode and delete all the other edges one by one until you are left with the last doubled edge sharing same 2 vertices.