Boolean problem with vertex group #52763

Closed
opened 2017-09-15 10:07:21 +02:00 by Serge Lyatin · 12 comments

System Information
Win7 64bit

Blender Version
Broken: 2.79
Worked: 2.77a

Short description of error
Carve solver clears vgroup. Bmesh is trying to preserve it, but doesn't interpolate.
2.77a
2.77.png
2.79 Carve
2.79.png
2.79 Bmesh This one displaces only part of mesh, but I guess vgroup should be interpolated after the cut, should it?
2.79_interpolate.png

Exact steps for others to reproduce the error
Boolean_vgroup.blend

**System Information** Win7 64bit **Blender Version** Broken: 2.79 Worked: 2.77a **Short description of error** Carve solver clears vgroup. Bmesh is trying to preserve it, but doesn't interpolate. **2.77a** ![2.77.png](https://archive.blender.org/developer/F802367/2.77.png) **2.79 Carve** ![2.79.png](https://archive.blender.org/developer/F802369/2.79.png) **2.79 Bmesh** This one displaces only part of mesh, but I guess vgroup should be interpolated after the cut, should it? ![2.79_interpolate.png](https://archive.blender.org/developer/F802372/2.79_interpolate.png) **Exact steps for others to reproduce the error** [Boolean_vgroup.blend](https://archive.blender.org/developer/F802378/Boolean_vgroup.blend)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @SergeL

Added subscriber: @SergeL

Added subscriber: @Sergey

Added subscriber: @Sergey

In fact, bmesh is behaving correct here. The unfortunate thing is that we can not interpolate such attributes: what if one vertex of edge was in groups A,B,C,D and second vertex of edge was in groups A,D what groups midpoint of edge should belong to? Or should those groups be copied from vertices of second object? Not only it's not trivial to do currently, but it's still ambiguous because new vertex might be created by a midpoint of edge from second operand. So at the end of a day there is no solution to this problem, so we just don't put new vertices to any of groups.

Blender 2.77 only appeared to work with Carve, while in fact it was removing all groups all together, which made deform modifier to ignore group and apply deformation to the whole mesh.

Will commit fix for carve which handles groups in the same way as bmesh.

P.S. By groups i meant vertex groups in this comment.

In fact, bmesh is behaving correct here. The unfortunate thing is that we can not interpolate such attributes: what if one vertex of edge was in groups `A,B,C,D` and second vertex of edge was in groups `A,D` what groups midpoint of edge should belong to? Or should those groups be copied from vertices of second object? Not only it's not trivial to do currently, but it's still ambiguous because new vertex might be created by a midpoint of edge from second operand. So at the end of a day there is no solution to this problem, so we just don't put new vertices to any of groups. Blender 2.77 only appeared to work with Carve, while in fact it was removing all groups all together, which made deform modifier to ignore group and apply deformation to the whole mesh. Will commit fix for carve which handles groups in the same way as bmesh. P.S. By groups i meant vertex groups in this comment.

This issue was referenced by 1a9217e222

This issue was referenced by 1a9217e2228c523c6f5341d36abcd01bc22719b4

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Added subscriber: @zeauro

Added subscriber: @zeauro

Carver solver does not clear vertex group.
Assign Cube vertices to a vertex group. Carver Solver will use it and displace the Cube.

Bmesh solution is preserving Vertex Groups of mesh that use the boolean modifier. Carve Solution is preserving Vertex Groups of mesh that is the target of the boolean modifier.

None of this solution is satisfying.
Ideally, vertex groups sharing same name on each mesh should be merged inside the result.
And additionnal vertices weights at intersections should be interpolated.

That way, following modifiers, like a vertex group weight modifier, could modulate the whole mesh instead of just one part.

what if one vertex of edge was in groups A,B,C,D and second vertex of edge was in groups A,D what groups midpoint of edge should belong to?

It is easy to answer it should belongs to A,D.
Because a user always have ability fix this by assigning second vertex to B,C groups with a weight equal to zero.

IMO, it is better to cover the whole reulting mesh by editing two operands instead of covering only one part of the resulting mesh.

Carver solver does not clear vertex group. Assign Cube vertices to a vertex group. Carver Solver will use it and displace the Cube. Bmesh solution is preserving Vertex Groups of mesh that use the boolean modifier. Carve Solution is preserving Vertex Groups of mesh that is the target of the boolean modifier. None of this solution is satisfying. Ideally, vertex groups sharing same name on each mesh should be merged inside the result. And additionnal vertices weights at intersections should be interpolated. That way, following modifiers, like a vertex group weight modifier, could modulate the whole mesh instead of just one part. > what if one vertex of edge was in groups A,B,C,D and second vertex of edge was in groups A,D what groups midpoint of edge should belong to? It is easy to answer it should belongs to A,D. Because a user always have ability fix this by assigning second vertex to B,C groups with a weight equal to zero. IMO, it is better to cover the whole reulting mesh by editing two operands instead of covering only one part of the resulting mesh.
Author

In #52763#459627, @zeauro wrote:
Carver solver does not clear vertex group.
Assign Cube vertices to a vertex group. Carver Solver will use it and displace the Cube.

But what if Cube will be dynamically changed via Remesh modifier, which will terminate all vgroups?

> In #52763#459627, @zeauro wrote: > Carver solver does not clear vertex group. > Assign Cube vertices to a vertex group. Carver Solver will use it and displace the Cube. But what if Cube will be dynamically changed via Remesh modifier, which will terminate all vgroups?

Remesh modifier is another problem.

Ideally, remesh modifier should kept ability to assign weights through vertex weight modifiers.
So, at least, a vertex group exists before Remesh -> all vertices after Remesh belongs to the vgroup with a weight equal to 1 or 0.

Ideally, vertices from remesh have an assigned weight relative to weight of closest vertex before remesh.

Remesh modifier is another problem. Ideally, remesh modifier should kept ability to assign weights through vertex weight modifiers. So, at least, a vertex group exists before Remesh -> all vertices after Remesh belongs to the vgroup with a weight equal to 1 or 0. Ideally, vertices from remesh have an assigned weight relative to weight of closest vertex before remesh.

Carver solver does not clear vertex group.

That is ambiguous statement.

In Blender 2.77 Carve will clear all vertex groups. Try removing some vertices from a group in the file and see that the whole object is deformed. This is because result of boolean has no vertex groups, which forces deform modifier to apply deformation to the whole object.

In Blender 2.79 Carve will preserve vertex groups for existing vertices, but will reset vertex groups of the new ones. Bug was that if mesh consisted of multiple manifolds, vertex groups would have been completely lost.

After fix from today Carve preserves vertex groups for all original vertices.

Bmesh solution is preserving Vertex Groups of mesh that use the boolean modifier. Carve Solution is preserving Vertex Groups of mesh that is the target of the boolean modifier.

This is wrong, Carve and BMesh are dealing with vertex groups same way now.

Ideally, vertex groups sharing same name on each mesh should be merged inside the result.

Think so, but currently it is not supported.

And additionnal vertices weights at intersections should be interpolated.

That's not what you always want. There are far too many corner cases which might (and will) work unexpectedly. There is simply no solution here which will always work.

But what if Cube will be dynamically changed via Remesh modifier, which will terminate all vgroups?

Afraid, you'll be doomed then :(

> Carver solver does not clear vertex group. That is ambiguous statement. In Blender 2.77 Carve will clear all vertex groups. Try removing some vertices from a group in the file and see that the whole object is deformed. This is because result of boolean has no vertex groups, which forces deform modifier to apply deformation to the whole object. In Blender 2.79 Carve will preserve vertex groups for existing vertices, but will reset vertex groups of the new ones. Bug was that if mesh consisted of multiple manifolds, vertex groups would have been completely lost. After fix from today Carve preserves vertex groups for all original vertices. > Bmesh solution is preserving Vertex Groups of mesh that use the boolean modifier. Carve Solution is preserving Vertex Groups of mesh that is the target of the boolean modifier. This is wrong, Carve and BMesh are dealing with vertex groups same way now. > Ideally, vertex groups sharing same name on each mesh should be merged inside the result. Think so, but currently it is not supported. > And additionnal vertices weights at intersections should be interpolated. That's not what you always want. There are far too many corner cases which might (and will) work unexpectedly. There is simply no solution here which will always work. > But what if Cube will be dynamically changed via Remesh modifier, which will terminate all vgroups? Afraid, you'll be doomed then :(

In #52763#459631, @Sergey wrote:

And additionnal vertices weights at intersections should be interpolated.

That's not what you always want. There are far too many corner cases which might (and will) work unexpectedly. There is simply no solution here which will always work.

I don't see where are the corner cases.
At least, if it results as a vertex with a weight, unexpectedly result can become fixable by the user by adding a vertex weight modifier or tweaking operands rejected vertices weight.
Boollean_Weight_Preserve_Proposal.blend

> In #52763#459631, @Sergey wrote: >> And additionnal vertices weights at intersections should be interpolated. > > That's not what you always want. There are far too many corner cases which might (and will) work unexpectedly. There is simply no solution here which will always work. > I don't see where are the corner cases. At least, if it results as a vertex with a weight, unexpectedly result can become fixable by the user by adding a vertex weight modifier or tweaking operands rejected vertices weight. [Boollean_Weight_Preserve_Proposal.blend](https://archive.blender.org/developer/F802819/Boollean_Weight_Preserve_Proposal.blend)
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
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
4 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#52763
No description provided.