Bevel weird behaviour when using bevel weights #75383

Closed
opened 2020-04-04 17:21:59 +02:00 by Henrik D. · 13 comments
Member

System Information
Operating system: Linux (Debian bullseye)
Graphics card: Nvidia GTX 1070

Blender Version
Broken: current master (2.83.11)
Worked: never (tested from 2.79 up)

Short description of error
I don't know how to put the behavior in words. It happens when 3 edges come together in a vertex and two of them have low bevel weights and one has high bevel weight. It will create some very messy geometry and flatten the bevel in a weird way. This is no technical limitation I think, because there is a clear solution how the bevel should work in this case.

I know this report could be closed as known issue, but I would rather like to see that fixed to have a more stable bevel modifier.

Exact steps for others to reproduce the error
testbevelbug.blend

**System Information** Operating system: Linux (Debian bullseye) Graphics card: Nvidia GTX 1070 **Blender Version** Broken: current master (2.83.11) Worked: never (tested from 2.79 up) **Short description of error** I don't know how to put the behavior in words. It happens when 3 edges come together in a vertex and two of them have low bevel weights and one has high bevel weight. It will create some very messy geometry and flatten the bevel in a weird way. This is no technical limitation I think, because there is a clear solution how the bevel should work in this case. I know this report could be closed as known issue, but I would rather like to see that fixed to have a more stable bevel modifier. **Exact steps for others to reproduce the error** [testbevelbug.blend](https://archive.blender.org/developer/F8448092/testbevelbug.blend)
Author
Member

Added subscriber: @HDMaster84

Added subscriber: @HDMaster84
Hans Goudey was assigned by Henrik D. 2020-04-04 17:22:43 +02:00
Author
Member

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly

Added subscribers: @howardt, @AnthonyEdlin

Added subscribers: @howardt, @AnthonyEdlin

Hi, thanks for the report.

I can confirm that it works as you describe. I'm not sure on intended behavior, prolly ask @howardt

Only other report I found was:#73028 (bevel modifier not working really well with bevel weights)

It seems that with a low bevel weight on a single edge of a cube makes it really bulge out.
bevel_modifier_low_bevel_weight.png

Hi, thanks for the report. I can confirm that it works as you describe. I'm not sure on intended behavior, prolly ask @howardt Only other report I found was:#73028 (bevel modifier not working really well with bevel weights) It seems that with a low bevel weight on a single edge of a cube makes it really bulge out. ![bevel_modifier_low_bevel_weight.png](https://archive.blender.org/developer/F8449023/bevel_modifier_low_bevel_weight.png)
Hans Goudey removed their assignment 2020-04-05 00:09:50 +02:00
Member

We're not supposed to assign reports to people unless they are currently working on them. I don't have the headspace to work on this right now so I'm removing myself.

I agree this doesn't look like the best solution though. It would be helpful to see people create what they think the modifier should do though, because I don't think the behavior you'd like is as straightforward as you might think. It's not clear to me what direction I'd pursue to solve the problem.

Miter options might help mitigate this.

We're not supposed to assign reports to people unless they are currently working on them. I don't have the headspace to work on this right now so I'm removing myself. I agree this doesn't look like the best solution though. It would be helpful to see people create what they think the modifier should do though, because I don't think the behavior you'd like is as straightforward as you might think. It's not clear to me what direction I'd pursue to solve the problem. Miter options might help mitigate this.

For reference, I'm guessing the desired behavior is more like this: bevel_modifier_low_bevel_weight_desired.png

Done by first beveling the 2 edges and then using a second bevel modifier with a vertex group of the other edge. I'm not sure how or if this can be done internally though.

For reference, I'm guessing the desired behavior is more like this: ![bevel_modifier_low_bevel_weight_desired.png](https://archive.blender.org/developer/F8449205/bevel_modifier_low_bevel_weight_desired.png) Done by first beveling the 2 edges and then using a second bevel modifier with a vertex group of the other edge. I'm not sure how or if this can be done internally though.
Member

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

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

Interesting. It looks like the middle point of the profile is being placed incorrectly, but I haven't looked into the code yet.

Interesting. It looks like the middle point of the profile is being placed incorrectly, but I haven't looked into the code yet.
Hans Goudey self-assigned this 2020-05-19 16:13:24 +02:00
Member

@howardt
I've been looking into this, and it looks like a problem with the cube corner special case.

With Special Case Cube Corner Special Case Off
image.png image.png
/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c
index d1ddceb00b0..0d753eca675 100644
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@ -4167,6 +4185,9 @@ static int tri_corner_test(BevelParams *bp, BevVert *bv)
   if (bv->vmesh->count != 3) {
     return 0;
   }
+
+  const float offset = bv->edges[0].offset_l;
+
   totang = 0.0f;
   for (i = 0; i < bv->edgecount; i++) {
     e = &bv->edges[i];
@@ -4178,6 +4199,11 @@ static int tri_corner_test(BevelParams *bp, BevVert *bv)
     else if (absang >= 3.0f * (float)M_PI_4) {
       return -1;
     }
+
+    if (e->is_bev && !compare_ff(e->offset_l, offset, BEVEL_EPSILON)) {
+      return -1;
+    }
+
     totang += ang;
   }
   if (in_plane_e != bv->edgecount - 3) {

But the VMesh has some other issues when using the generic VMesh:
{F8543780}From the bottom

Would you agree that it makes sense to disable the cube-corner special case when the offsets aren't the same on every edge?
That doesn't feel like a complete solution by itself, but I feel like we might be running into the limitations of the ADJ method. Maybe it's time to test out another VMesh method idea I had..

@howardt I've been looking into this, and it looks like a problem with the cube corner special case. |With Special Case|Cube Corner Special Case Off | -- | -- | |![image.png](https://archive.blender.org/developer/F8543775/image.png)|![image.png](https://archive.blender.org/developer/F8543782/image.png) ```lines=5 /bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index d1ddceb00b0..0d753eca675 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -4167,6 +4185,9 @@ static int tri_corner_test(BevelParams *bp, BevVert *bv) if (bv->vmesh->count != 3) { return 0; } + + const float offset = bv->edges[0].offset_l; + totang = 0.0f; for (i = 0; i < bv->edgecount; i++) { e = &bv->edges[i]; @@ -4178,6 +4199,11 @@ static int tri_corner_test(BevelParams *bp, BevVert *bv) else if (absang >= 3.0f * (float)M_PI_4) { return -1; } + + if (e->is_bev && !compare_ff(e->offset_l, offset, BEVEL_EPSILON)) { + return -1; + } + totang += ang; } if (in_plane_e != bv->edgecount - 3) { ``` But the `VMesh` has some other issues when using the generic `VMesh`: {[F8543780](https://archive.blender.org/developer/F8543780/image.png)}*From the bottom* Would you agree that it makes sense to disable the cube-corner special case when the offsets aren't the same on every edge? That doesn't feel like a complete solution by itself, but I feel like we might be running into the limitations of the ADJ method. Maybe it's time to test out another VMesh method idea I had..
Member

Yes, makes sense to me that the cube-corner case only makes sense if the offsets are the same on every edge.

Yes, makes sense to me that the cube-corner case only makes sense if the offsets are the same on every edge.

This issue was referenced by 20c30534aa

This issue was referenced by 20c30534aafc4a97803d9e72ae765b5415fb1359

This issue was referenced by c554f4e14f

This issue was referenced by c554f4e14fce679e047fd8ee75368548de70d0cb
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
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
5 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#75383
No description provided.