Page MenuHome

Fix unexpected twist and asymmetry in curve using tangent mode
AbandonedPublic

Authored by Miguel G. (ghaspias) on Jul 21 2021, 4:04 AM.

Details

Summary

As reported in T89828, using tangent mode on a curve may result in unexpected twists and produce asymmetric geometry
for a symmetric curve.
The twists were mainly due to the use of the tangents instead of the normals when trying to correct the twist angles larger than 90 deg (bevel_list_flip_tangents).
The asymmetry is due to the use of a forward method for the computation of the 'tangent' (in forward_diff_bezier_cotangent). This patch computes the tangents using central differences, thus producing the expected symmetric output.
This also includes some mitigation of the issues arising from colinear segments, as illustrated below:

Before:

After:

I will include some more screenshots in T89828.

Diff Detail

Repository
rB Blender

Event Timeline

Miguel G. (ghaspias) requested review of this revision.Jul 21 2021, 4:04 AM
Miguel G. (ghaspias) created this revision.

Would you be interested in finishing the work started here: https://developer.blender.org/D11621?vs=on&id=38398#toc to implement a proper tangent normal mode to the new curve code for geometry nodes?

I'm closing this patch since it's been quite a while and the curve code has moved (the equivalent is in curve_poly.cc now). Thanks for contributing.