Blender 2.79b bevel in holes a bit odd #62649

Closed
opened 2019-03-16 12:30:58 +01:00 by Cyp · 10 comments

System Information
Operating system: Gentoo Linux

Blender Version
Broken: 2.79b

Short description of error
From left to right:

  • Bevel disabled
  • Bevel width 0.5
  • Bevel width 0.4999

bevelbug.png

The one with bevel width 0.5 looks a bit odd. The one with bevel width 0.4999 looks as expected.

Exact steps for others to reproduce the error
Make a hole somewhere and bevel it so the vertices should touch. For fun and surprising results, the first bevel should be ≥ 50% of the width, and the second bevel can be anything. Also, try changing the first bevel to 1 segment for a more symmetric and unconventional result. Endless possibilities!

bevelbug.blend

**System Information** Operating system: Gentoo Linux **Blender Version** Broken: 2.79b **Short description of error** From left to right: * Bevel disabled * Bevel width 0.5 * Bevel width 0.4999 ![bevelbug.png](https://archive.blender.org/developer/F6834076/bevelbug.png) The one with bevel width 0.5 looks a bit odd. The one with bevel width 0.4999 looks as expected. **Exact steps for others to reproduce the error** Make a hole somewhere and bevel it so the vertices should touch. For fun and surprising results, the first bevel should be ≥ 50% of the width, and the second bevel can be anything. Also, try changing the first bevel to 1 segment for a more symmetric and unconventional result. Endless possibilities! [bevelbug.blend](https://archive.blender.org/developer/F6834079/bevelbug.blend)
Author

Added subscriber: @cyp-2

Added subscriber: @cyp-2
Howard Trickey was assigned by Brecht Van Lommel 2019-03-16 18:02:12 +01:00

Added subscriber: @mont29

Added subscriber: @mont29

Please try with latest blender 2.8 build, 2.79 is not maintained anymore (besides critical issues), and code has evolved since that release…

Please try with latest blender 2.8 build, 2.79 is not maintained anymore (besides critical issues), and code has evolved since that release…

Hrrm, actually, can confirm the issue with blender 2.8 here…

Hrrm, actually, can confirm the issue with blender 2.8 here…
Member

I confirm too for 2.8. Oddly, it only happens for the modifier, not the tool (oddly because the code for the core bevel is the same). And the second bevel doesn't have to have 0.5 width -- any width will show the problem as long as the first one had width 0.5. I will investigate further.

I confirm too for 2.8. Oddly, it only happens for the modifier, not the tool (oddly because the code for the core bevel is the same). And the second bevel doesn't have to have 0.5 width -- any width will show the problem as long as the first one had width 0.5. I will investigate further.
Member

OK, this was mysterious, but I understand the problem now. It is that vertex groups are getting mixed up in a way that is likely unexpected to users: there are weights associated with each vertex in a group and the bevel modifier considers each vertex to be part of the bevel if the weight is >= 0.5.

The problem is that when new vertices are made, their custom data is interpolated between the custom data of all of the vertices in the face that they are created in. What is happening in the example blend is that when you do a bevel on vertex group Bevel1 with width 0.5 then the interpolation causes the new end vertices to have 0.5 for weight in Bevel1 group and also 0.5 for weight in Bevel2 group (which wasn't involved in the first bevel, but is adjacent so the interpolation causes Bevel2 group to "leak over" onto new adjacent vertices. This means that the second bevel modifier, on group Bevel2, now operates on more vertices than the user intended when setting up the groups Bevel1 and Bevel2. When you use width 0.4999 the interpolated weight for Bevel2 group on the new vertices is just shy of the magic 0.5 value I use to decide whether or not to have those vertices participate in the bevel.

The root problem is that we are using vertex group weights to indicate membership in a set instead of boolean values. If they were boolean values, we wouldn't even be trying to interpolate the values in the face, but rather they would be set from the example vertex (the one that the bevel verts are being created around) and all would be well. I wonder if this problem shows up elsewhere in Blender where vertex groups are using for membership semantics?

I am not sure how to fix this and would appreciate comments from users and other devs. Here are some possibilities:

  1. Have bevel go back and "fix" the interpolated values for the newly created vertices so that the entire weight comes just from the vertex that the new vertices are created around. This is a bit messy, needing more code, and might not be the right solution if we want to fix the general problem of "weights shouldn't be interpolated if they are being used for membership semantics". Also, what if the weights are being meaningfully used for something other than group membership, so that interpolation semantics are what is needed? Right now, there is no way for bevel to know which groups should be "fixed" and which should be left interpolated.

  2. Make a separate kind of vertex group that is only used for membership, so has boolean values, and doesn't get interpolated. This could/should also be done for edge and face selection groups, something that has long been asked for by users. The problem here is mainly that this is a significant amount of work, probably not possible before the 2.80 release, At least, if done properly, with good UI support, documentation, tests, etc.

  3. Have a bevel modifier option to be the threshold to use for deciding membership (instead of hard-coded 0.5). I doubt this really solves the problem, because if you bevel beyond 0.5 in our example case, the interpolation will actually move membership more towards adjacent vertex bevel groups and there probably won't be ways of manipulating the threshold properly to get the intended effects.

In my opinion, option 2 is the only workable one, but as I said there, kind of difficult to implement on short term.

A workaround for the particular case in the bug report would be: use Bevel1 vgroup for the first bevel limit, but instead of Bevel2 for the second, specify that group using Bevel Edge Weights = 1.0 and the weight limit method. I realize there are many similar cases for which such a workaround won't be possible, sorry. I hope we can fix the bigger problem eventually.

OK, this was mysterious, but I understand the problem now. It is that vertex groups are getting mixed up in a way that is likely unexpected to users: there are weights associated with each vertex in a group and the bevel modifier considers each vertex to be part of the bevel if the weight is >= 0.5. The problem is that when new vertices are made, their custom data is interpolated between the custom data of all of the vertices in the face that they are created in. What is happening in the example blend is that when you do a bevel on vertex group Bevel1 with width 0.5 then the interpolation causes the new end vertices to have 0.5 for weight in Bevel1 group and also 0.5 for weight in Bevel2 group (which wasn't involved in the first bevel, but is adjacent so the interpolation causes Bevel2 group to "leak over" onto new adjacent vertices. This means that the second bevel modifier, on group Bevel2, now operates on more vertices than the user intended when setting up the groups Bevel1 and Bevel2. When you use width 0.4999 the interpolated weight for Bevel2 group on the new vertices is just shy of the magic 0.5 value I use to decide whether or not to have those vertices participate in the bevel. The root problem is that we are using vertex group weights to indicate membership in a set instead of boolean values. If they were boolean values, we wouldn't even be trying to interpolate the values in the face, but rather they would be set from the example vertex (the one that the bevel verts are being created around) and all would be well. I wonder if this problem shows up elsewhere in Blender where vertex groups are using for membership semantics? I am not sure how to fix this and would appreciate comments from users and other devs. Here are some possibilities: 1) Have bevel go back and "fix" the interpolated values for the newly created vertices so that the entire weight comes just from the vertex that the new vertices are created around. This is a bit messy, needing more code, and might not be the right solution if we want to fix the general problem of "weights shouldn't be interpolated if they are being used for membership semantics". Also, what if the weights are being meaningfully used for something other than group membership, so that interpolation semantics are what is needed? Right now, there is no way for bevel to know which groups should be "fixed" and which should be left interpolated. 2) Make a separate kind of vertex group that is only used for membership, so has boolean values, and doesn't get interpolated. This could/should also be done for edge and face selection groups, something that has long been asked for by users. The problem here is mainly that this is a significant amount of work, probably not possible before the 2.80 release, At least, if done properly, with good UI support, documentation, tests, etc. 3) Have a bevel modifier option to be the threshold to use for deciding membership (instead of hard-coded 0.5). I doubt this really solves the problem, because if you bevel beyond 0.5 in our example case, the interpolation will actually move membership more towards adjacent vertex bevel groups and there probably won't be ways of manipulating the threshold properly to get the intended effects. In my opinion, option 2 is the only workable one, but as I said there, kind of difficult to implement on short term. A workaround for the particular case in the bug report would be: use Bevel1 vgroup for the first bevel limit, but instead of Bevel2 for the second, specify that group using Bevel Edge Weights = 1.0 and the weight limit method. I realize there are many similar cases for which such a workaround won't be possible, sorry. I hope we can fix the bigger problem eventually.
Member

Added subscriber: @ideasman42

Added subscriber: @ideasman42
Member

Added Campbell to get his opinion too on how to solve this problem with vertex groups being used for membership and interpolation.

I thought of another possible fix for bevel:
4) add an option for user to say whether or not vertex groups should ALL be treated as membership groups and therefore not interpolated. This would solve the problem that I can't tell the purpose of a group. But yucch.

Added Campbell to get his opinion too on how to solve this problem with vertex groups being used for membership and interpolation. I thought of another possible fix for bevel: 4) add an option for user to say whether or not vertex groups should ALL be treated as membership groups and therefore not interpolated. This would solve the problem that I can't tell the purpose of a group. But yucch.
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Member

Even though the behavior is surprising, even to me, I am closing this bug for now as "working as intended", since the semantics of vertex groups and weights being interpolated is indeed as intended. I will add a point in my general bevel improvements request bug, #48583, to eventually fix this.

Even though the behavior is surprising, even to me, I am closing this bug for now as "working as intended", since the semantics of vertex groups and weights being interpolated is indeed as intended. I will add a point in my general bevel improvements request bug, #48583, to eventually fix this.
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
3 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#62649
No description provided.