Page MenuHome

Bevel weird behaviour when using bevel weights
Closed, ResolvedPublic

Description

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

Event Timeline

Hi, thanks for the report.

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

Only other report I found was:T73028: 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.

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:

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.

Hans Goudey (HooglyBoogly) changed the task status from Needs Triage to Confirmed.Apr 5 2020, 5:24 AM

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

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

With Special CaseCube Corner Special Case Off
/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:

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..

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