Page MenuHome

Fix numerical instabilities of Solidify Modifier Complex Contraints Mode from D5766
ClosedPublic

Authored by Henrik Dick (weasel) on Fri, Jan 10, 6:49 PM.

Details

Summary

Sometimes on flat open vertices the thickness would suddenly start to be jumping in powers of 2, also when bending a plane there is a noticable jump in the geometry. When offset is set to -1 or 1 weird glitches happen.
These things are now fixed with this revision.

This file shows the issues, steps to create below:

Steps to reproduce the three most critical bugs:

    • Add a plane
    • Add the modifier with options complex, constraints, offset = 0, thickness = e.g. 0.3, visible in editmode
    • in edit mode, inset the plane face, by pressing I
    • there should be some weird jumpiness while dragging the mouse for the inset operator
    • Add a plane and make a cut down the middle (e.g. with Ctrl+R)
    • select one face and flip its normals (Alt+N)
    • add the solidify modifier with options complex, constraints, offset = 0, visible in editmode
    • in editmode select one of the long outer edges
    • from sideview, zoom in very close to the center
    • move the selected edge (pointing out the screen, but outside of the current visible area)
    • you will notice, that at the bending point there will be some jumpiness just when starting to move the edge.
    • if you change the offset you will also notice, upon closed examination, that in this bended case thickness is not preserved when moving the offset slider
    • Add a cube, select an edge, hit delete vertices
    • select the inner edge and hit Ctrl+B for bevel
    • add solidify with option complex mode, angle clamp and clamp to some value, offset = 0.0
    • notice how the open borders (vertices with two edges/one face) are reduced in thickness

Diff Detail

Repository
rB Blender
Branch
arcpatch-D6559 (branched from master)
Build Status
Buildable 6348
Build 6348: arc lint + arc unit

Event Timeline

Henrik Dick (weasel) planned changes to this revision.Sat, Jan 11, 12:22 AM

I want to make offset = 1 and offset = -1 also more consitent before this lands, but there its a bit more involved than changing a number

Henrik Dick (weasel) updated this revision to Diff 20721.EditedSat, Jan 11, 3:02 PM
Henrik Dick (weasel) retitled this revision from Fix a geometry error when Solidify Modifier Complex has offset 0 to Fix numerical instabilities of Solidify Modifier Complex Contraints Mode.
Henrik Dick (weasel) edited the summary of this revision. (Show Details)

now it can be reviewed

quick refractor to make the code a bit more beautiful and awesome before commit (clang, order of operations, 1 less if-condition)

Henrik Dick (weasel) retitled this revision from Fix numerical instabilities of Solidify Modifier Complex Contraints Mode to Fix numerical instabilities of Solidify Modifier Complex Contraints Mode from D5766.Wed, Jan 15, 7:25 PM
Henrik Dick (weasel) added a reviewer: Modeling.
Henrik Dick (weasel) added a reviewer: Modifiers.
Henrik Dick (weasel) edited the summary of this revision. (Show Details)Mon, Jan 20, 9:51 PM
Henrik Dick (weasel) edited the summary of this revision. (Show Details)

Added one more fix for angle clamp in complex mode to this revision. I don't know though if it's so smart to put everything in one revision... (anyway)

Campbell Barton (campbellbarton) edited the summary of this revision. (Show Details)

Minor update, correct assert

Campbell Barton (campbellbarton) requested changes to this revision.EditedTue, Jan 21, 10:29 AM

Generally seems fine, one change in behavior is negative thickness no longer works.

In F8291646 notice how the selected object changes behavior before/after this patch.

source/blender/modifiers/intern/MOD_solidify_nonmanifold.c
1406

Was BLI_assert(face_nors < 2), assume face_nors_len is meant, now updated.

This revision now requires changes to proceed.Tue, Jan 21, 10:29 AM
  • fix negative thickness
This revision is now accepted and ready to land.Tue, Jan 21, 5:51 PM