Page MenuHome

Incorrect twist in bevel/extrusion using curve tangent mode
Needs Triage, NormalPublic


System Information
Operating system:
Graphics card:

Blender Version
Broken: present in 2.83.3, 2.91.0, and 3.0.0 alpha
Worked: ?

Short description of error

Both open and closed curves exhibit a "sausage effect" when a bevel is applied. This is not visible when the curve is closed and 'ResolutionU' is below 4. The issue is somehow attenuated by applying large amounts of smoothing (twist_smooth).
Below is a flat and symmetric curve showing this issue.

Exact steps for others to reproduce the error

Delete default cube. Create a Bèzier Circle. Enter Edit Mode, select all vertices, subdivide once.
In Object Data Properties, select Shape->Twist Method-> Tangent, and Geometry->Bevel->Depth: 0.2.
Toggle the Active Spline->Cyclic->U, and change the Active Spline->Resolution U between 4-5.
Your smooth symmetric curve will turn into sausages!

The effect is slightly different depending on the type of handles.

Event Timeline

Thanks for the report. However, if this isn't a regression (which it doesn't seem it is, I don't think it's necessarily a bug. The different twist algorithms each have strengths and weaknesses, and the tangent method will have these inflection points. That's why the smooth input was added originally I think.

I'm not sure about that, but again, I would personally only consider this a bug if it was a regression.

Thanks for the feedback, @Hans Goudey (HooglyBoogly).
As a user, I see it as a bug. It is extremely undesirable to have the geometry change drastically by just changing the level of interpolation. That is why code to (supposedly) prevent it was included (function bevel_list_flip_tangents in curve.c). The smoothing doesn't fix it, it just maskerades it to some extent. Anyway, I think I have a fix for this, which I am currently testing. It does introduce some other changes in the behaviour, though, besides fixing (most of) the sharp twists.
I am convinced however that this has other, deeper, root causes, but it has been very difficult to follow the code, as I couldn't find a description of the intended behaviour or algorithms.

I submitted a patch (D11984) that fixes the issue presented here. It also addresses an asymmetry even in the absence of twists, and some issues with colinear edges.
I am aware that the curve handling is being re-worked in a new code base, so this may be useful only as some pitfalls to avoid in the new implementation.
I think the new behaviour with this patch is much more reasonable (perfectly symmetric about the x-axis and without unexpected twists):

For comparison, below is the screenshot from the same file as in the original report: