从 Blender 导出 BSpline/NURBS 控制多边形和结向量
给定一个带有一个 BSpline/NURBS 曲面的 Blender 文件(例如,Add -> Surface -> NURBS Sphere
),我有兴趣导出其控制多边形(定义它的 3D 点)及其结向量。
确切的格式并不重要,只要它是文本即可。 (我尝试导出到 OBJ,但得到了球体的三角近似值,而不是系数和点。)
任何帮助/提示将不胜感激。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果未选中“端点”选项,则结向量是零和一之间的线性插值。例如,次数为 3 的 7 点曲线的结向量为
[0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.8, 1.0]
。如果选中“Endpoint”选项,则结向量以
D+1
值 0.0 开始,以D+1
值 1.0 结束,其余值呈线性在零和一之间插值,其中 D 是曲线的阶数。例如,次数为 3 的 7 点曲线的节点向量为[0.0, 0.0, 0.0, 0.0, 0.4, 0.5, 0.6, 1.0, 1.0, 1.0, 1.0]
如果“Circular”为选中后,Blender 的行为就好像第一个
D
点附加到曲线的末尾,其中D
为曲线度数,“Endpoint”选项不起作用。通过将曲线导出到 Wavefront OBJ 并选中“曲线为 NURBS”选项,发现了这一点。结向量由 param u 指令表示。
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 withD+1
values of 1.0, and the remaining values linearly interpolated between zero and one, whereD
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, whereD
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.