Page MenuHome

Bevel modifier generates vertex group weight > 1.0 once applied (geometry is flagged as invalid inside BKE_mesh_validate)
Confirmed, NormalPublicBUG

Description

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 1070 with Max-Q Design/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 441.66

Blender Version
Broken: version: 2.83 (sub 8), branch: master, commit date: 2020-03-14 00:31, hash: rBacab7450784a
Worked: Sorry, not sure. However 2.79 is also affected in a similar setup so if it's ever worked it's been years

Short description of error
The bevel modifier (at default settings) seems to generate vertex group weights beyond 1.0. In fact it looks like it's exactly 1.0 + FLT_EPSILON in the debugger. This causes calls to BKE_mesh_validate to flag the geometry as invalid.

Exact steps for others to reproduce the error

  • Open the attached .blend
    • Contains a cube, sub-divided in edit-mode, and with a vertex group weight of exactly 1.0 applied to 9 verts all along 1 side of the cube
  • Apply the Bevel modifier (uses default settings)
  • Run the script that's provided in the text editor window already (bpy.context.active_object.data.validate(verbose=True))
  • Check the terminal for output

On my various windows machines, with the official blender build and self-compiled, I receive something like the following:

ERROR (bke.mesh): c:\b\win64_cmake_vs2017\win64_cmake_vs2017\blender.git\source\blender\blenkernel\intern\mesh_validate.c:794 BKE_mesh_validate_arrays:         Vertex deform 70, group 0 has weight: 1.000000
ERROR (bke.mesh): c:\b\win64_cmake_vs2017\win64_cmake_vs2017\blender.git\source\blender\blenkernel\intern\mesh_validate.c:794 BKE_mesh_validate_arrays:         Vertex deform 78, group 0 has weight: 1.000000
ERROR (bke.mesh): c:\b\win64_cmake_vs2017\win64_cmake_vs2017\blender.git\source\blender\blenkernel\intern\mesh_validate.c:794 BKE_mesh_validate_arrays:         Vertex deform 79, group 0 has weight: 1.000000

Why did I find this:

  • I'm attempting to remove an older array modifier test in favor of placing it inside the new modifiers tests recently developed. As part of ensuring the test is carried over, I need to call Mesh.validate. After adding this call to the new test suite (bonus: we would now get validation coverage for all the new tests afterwards!) 1 particular test fails. The above is the smallest repro I could find of the problem -- Bevel modifier being applied on an object containing a vertex group weight of 1.0

Event Timeline

Germano Cavalcante (mano-wii) changed the task status from Needs Triage to Confirmed.Tue, Mar 17, 4:03 PM
Germano Cavalcante (mano-wii) changed the subtype of this task from "Report" to "Bug".

Thanks for the example. Will look at it in the next couple of days, I hope.

I tried it on my Mac machine and it didn't have the problem described. I do have a Windows setup too, so will try there next,

I tried on my Windows machine and it also didn't happen. I don't have an idea about how to proceed at this point.

I can redo the problem every try.
I tested on Debug build.
Remember to apply the modifier before running the script.

Thanks for the reminder. That was indeed my problem - I was not applying the modifier. I can reproduce now (on my Mac),