3

Given a Blender file with one BSpline/NURBS surface (for example, Add -> Surface -> NURBS Sphere), I'm interested in exporting its control polygon (the 3D points which define it) and its Knot vector.

The exact format is less important, as long as it is text. (I tried exporting to OBJ, but got a triangulated approximation to the sphere, in stead of coefficients and points.)

Any help/hints would be greatly appreciated.

user1071136
  • 15,636
  • 4
  • 42
  • 61
  • I just stumbled upon this. However, it seems that only univariate NURBS (i.e. curves, paths) are supported. One would have to tick the **Write Nurbs** option during export. – Sebastian Sep 26 '14 at 14:42

1 Answers1

0

If the "Endpoint" option is unchecked, the knot vector is a linear interpolation between zero and one. For example, a 7 point curve with degree 3 has a knot vector of [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.8, 1.0].

If the "Endpoint" option is checked, then the knot vector starts with D+1 values of 0.0, end with D+1 values of 1.0, and the remaining values linearly interpolated between zero and one, where D is the degree of the curve. For example, a 7 point curve with degree 3 has a knot vector of [0.0, 0.0, 0.0, 0.0, 0.4, 0.5, 0.6, 1.0, 1.0, 1.0, 1.0]

If "Circular" is checked, Blender acts as if the first D points are appended to the end of the curve, where D is the curve degree, and the "Endpoint" option has no effect.


Found this out by exporting the curves to Wavefront OBJ with the "Curves as NURBS" option checked. The knot vector is represented as the param u directive.

Colonel Thirty Two
  • 23,953
  • 8
  • 45
  • 85