query a maya nurbs curve for its basis / interpolation style

26 views
Skip to first unread message

katisss

unread,
Mar 4, 2018, 4:05:54 PM3/4/18
to Python Programming for Autodesk Maya
I want to query a maya nurbs curve for its basis / interpolation style but nothing in the api looks like it
http://download.autodesk.com/us/may...urbs_curve.htmlI seem unable to find anything about it
In the end I need to match it up with the renderman ones:

A Bezier basis generates a 3D curve that passes through every third control vertex. The remaining control vertex positions are used to
determine the incoming and outgoing tangent of the curve of the adjacent
vertex that the curve does pass through. When using a Bezier basis with
curves that contain multiple segments (that is, more than 4 control
points), some care should be taken to ensure that incoming and outcoming
tangents line up at vertices that are on the rendered curve, or there
will be a discontinuity in the smoothness of the curve where it suddenly
changes direction.

B-Spline - While a B-Spline basis function can be somewhat less intuitive to use in that it generates a curve that typically only
approximately comes close to passing through the given control vertices,
an advantage is that this basis function tends to yield very smooth
curves. Discontinuities in the smoothness of the curve are possible if
multiple control vertices are repeated consecutively.

Catmull-Rom - This basis function generates a curve that is guaranteed to pass through every interior, non-endpoint control vertex,
and it tends to generate smooth curves, although there can sometimes be
unexpected "wobbles" in areas of high curvature with this basis function
choice (see images below for an example). Using a B-Spline basis
instead can smooth out the wobbles, although a B-Spline basis typically
produces a curve that does not pass through the control vertices
exactly, unlike the Catmull-Rom basis (for non-endpoint control
vertices).

Hermite - The Hermite basis function generates a curve that passes through every other control vertex; the remaining control "vertices" are
actually vectors that determine the tangent of the curve. The length of
the tangent vectors determines the amount of curvature; longer tangent
vectors yield more curvature along the spline than shorter vectors. A
Hermite basis function tends to produce smooth curves, although using a
B-Spline basis can often yield qualitatively a more "natural" or uniform
smoothness along the curve with comparatively less specification
effort.

Linear - Specifying linear curves yields straight line segments, which can result in gaps or other geometric artifacts when close to the
camera (this may be acceptable for distant and/or very thin curves).

Michael Boon

unread,
Mar 4, 2018, 6:11:14 PM3/4/18
to Python Programming for Autodesk Maya
I've never dealt with NURBS in Maya at all, but I know the BS at the end of NURBS stands for B-Spline.

Angelo Sta. Catalina

unread,
Mar 4, 2018, 6:59:36 PM3/4/18
to python_in...@googlegroups.com
NURBS stands for non-uniform-rational-b-spline. Its very similar both in appearance and implementation. There's a really good book out there called "The Nurbs Book" which goes in depth into nurbs curve and surface creation/manipulation. I has C style snippets which you can reference to to write your own nurbs functions (Must have especially if you plan on writing a threadsafe custom nurbs implementation).

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d42d0657-52f0-48ad-8f74-8b82725d8959%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages