Curves: Enhance tesselation of NURBS with corners
Current NURBS evaluation handles corners or sharp angles poorly. Sharp edges appear when a knot vector value is repeated `order - 1` times. Users can make sharp corners by creating NURBS curve with `Bezier` knot mode or by setting `order` to 2 for legacy curves. The problem occurs because current algorithm takes all the curve's definition interval, divides it into equal parts and evaluates at those points, but corners are exactly on repeated knot's. To hit those, the resolution has to be increased higher than required for the rest of the curve. The new algorithm divides non zero length intervals between two adjacent knots into equal parts. This way corners are hit with a resolution of 1. This does change the evaluated points of NURBS curves, which is why some test results have to be updated in this commit. Pull Request: https://projects.blender.org/blender/blender/pulls/138565
This commit is contained in:
committed by
Hans Goudey
parent
e9bb58e6df
commit
3c407ebeaa
@@ -936,7 +936,7 @@ class USDExportTest(AbstractUSDTest):
|
||||
|
||||
# Contains 2 NURBS curves
|
||||
curve = UsdGeom.NurbsCurves(stage.GetPrimAtPath("/root/NurbsCurve/NurbsCurve"))
|
||||
check_nurbs_curve(curve, False, [4, 4], [6, 6], 10, [[-1.75, -2.6898, -1.0117], [3.0896, 1.9583, 1.0293]])
|
||||
check_nurbs_curve(curve, False, [4, 4], [6, 6], 10, [[-1.75, -2.6891, -1.0117], [3.0896, 1.9583, 1.0293]])
|
||||
|
||||
# Contains 1 NURBS curve
|
||||
curve = UsdGeom.NurbsCurves(stage.GetPrimAtPath("/root/NurbsCircle/NurbsCircle"))
|
||||
|
||||
Reference in New Issue
Block a user