Houdini allows you to create both Bezier and NURBS curves and surfaces (for the purposes of this discussion, however, we’ll only be referring to curves). Spline curves and polygons are collectively termed “faces”, while grids and spline surfaces are termed “hulls”. As opposed to polygonal types, NURBS and Bezier entities are inherently smooth primitives known as splines. It isn’t necessary to master the mathematics behind what differentiates the two spline types. It is, however, useful to understand some of the concepts that arise from the mathematics of computer-generated curves because they affect your choice of curve type when you start creating in Houdini, and they influence the way you draw that curve.
NURBS and Bezier curves in Houdini are piecewise curves made of a number of connected curve segments. The main difference between NURBS and Bezier curves is the level of continuity at the points where the curve segments touch. A NURBS curve will typically be very smooth at these joints (the higher the degree of the blending function, the smoother the connection). Bezier curves have a discontinuity every degree plus one points.
The “degree plus one” formulation is often referred to as the order of the curve. A cubic curve, for example, has a degree of three and, therefore, an order of four.
The degree of the spline in given by the degree of the underlying blending functions. Houdini supports splines whose degrees vary from 1 to 10. The upper bound was chosen for practical reasons and efficiency.
You’ll find that cubic splines are sufficiently smooth and well behaved for most applications. You will seldom need to use other degrees.
From this illustration, we can see that the minimum number of points needed to build a curve equals the order of that curve, unless the curve is closed, in which case only degree CVs will suffice, since the remaining CV is taken to be equivalent to the first CV.
Breakpoints, Knots, and Spline Basis
The point where curve segments come together is called a breakpoint. It is important to stress that this breakpoint is on the curve itself, not away from the curve like the CVs, which make up the hull.
Breakpoints are images of special values, called “knots”, in what is known as the parametric space or the domain of the spline. The domain, which is simply a sequence of knots in ascending order, together with the spline order and the spline type define a spline basis.
Imagine the domain of a curve as a segment going from zero to one or (for example) -12.7 to 83.2, whose size and origin are given by the values of its two end-knots. Similarly, a surface is defined by two knot sequences forming a rectangular (U,V) domain. The knot sequences must always be sorted in ascending order.
Since knots are the ingredients of the domain, they divide a curve’s domain segment and a surface’s domain rectangle into smaller pieces whose size relative to each other is often more important than the total size of the domain. Similarly, in world space, the areas delimited by breakpoints divide a curve into curve segments and a surface into patches.
Depending on the type of spline, the relative knot distances usually determine the shape of the spline given a fixed set of control vertices. The size and the origin of the domain are relevant when identifying a surface’s texture space with its parametric space. Then, if the texture is expected to cover the entire surface only once, the domain of the surface must be a unit square. Mapping a domain to a new range and origin does not affect the shape of the spline primitive because the knot ratios are preserved.
The knots need not be evenly spaced in the domain. The more knots there are in one area, the smaller the spline segments and, therefore, you have a greater degree of control over the spline in that area. If several knots are placed at one value, something called a multiplicity is produced. Not all spline types allow multiplicities to occur.
Houdini supports two types of rational splines: NURBS, and Bezier. Each CV of the curve has X, Y, and Z coordinates that determine its position in world space. There is also a fourth component for each CV called W. The W component determines a CV’s weight. The weight determines the “pull” (like a magnet) of a CV on the spline curve. The value of the W component makes a spline rational or non-rational. A non-rational spline has only equal weights (typically, W=1), while a rational spline contains at least one different weight. While non-positive weights (where W is less than or equal to zero) make sense in theory, they tend to generate un-intuitive shapes and cause the spline to break away from its convex hull. For practical reasons, Houdini supports only positive weights (W > 0).
The higher the weight of a CV, the sharper the spline around that CV. For large weight values, the spline will almost go through the CV. Similarly, weights smaller than one tend to flatten the spline in the area influenced by that CV.
However, it isn’t simply the size of the weight that causes a fluctuation in sharpness. An equally, if not more, important element is the relative difference between weights. The more equal the neighboring weights, the smaller their influence over the given region and, consequently, the less rational the spline. For example, if all the weights of a spline curve are one thousand, the shape of the curve will be identical to a non-rational curve.
In Houdini, certain models, like the perfect NURBS circles, are normally built rationally. Although you can create rational models yourself in the modeler and elsewhere, we recommend that you use weights sparingly because they increase the complexity of the model (which may result in decreased system performance) and they may also lose their effectiveness when applied to neighboring curve regions.
Of the spline types supported in Houdini, NURBS curves give you a greater degree of control over local portions of the curve and over its smoothness.