1. Concepts

1.1 Basic Nurbs Support
  1.1.1 Nodes
  1.1.2 Tessellation Strategies
  1.1.3 Automatic Level of Detail

1.2 Trimmed NURBS

1.3 NURBS and Animation

1.1 Basic NURBS Support

This section describes the proposed VRML nodes and some of the basic characteristics of NURBS. The proposed nodes comprise a basic set of NURBS types that allow to describe arbitrary shapes. There are many surface construction techniques. To name a few:
  1. special cases of NURBS surfaces such as sphere, cylinder or Bezier surfaces
  2. Extrusion / swept surfaces, constructed given a spine and a cross section curve which both can be NURBS curves
  3. surfaces of revolution, constructed given a circle/arc and a NURBS cross section curve
  4. skinned surface constructed from a set of curves
  5. Gordon surfaces interpolating two sets of curves
  6. Coons patches, a bicubic blended surface constructed from 4 border curves
  7. Surfaces interpolating a set of points
For now we assume that creation of such surfaces is only a construction step at authoring time and that the surface will be represented as a general NurbsSurface for VRML runtime delivery. 

1.1.1 Fields of NURBS Nodes

The characteristics of a NurbsSurfaceand a NurbsCurve are basically determined by a set of control points (control vertices, CV) similar to an ElevationGrid. These points are approximated to a certain degree, that is defined in the weight value of every CV. The whole surface can be seen as the weighted average of all control points with the control points having only strong influence in their periphery. The range of the influence is determined by the knot vector. From a mathematical point of view, a spline is defined by polynomials of  a certain degree. Higher degrees are smoothing the curve since more control points gain influence on a certain point. These properties can be found throughout all definitions of the NURBS related nodes:  

order defines the order of the spline which is degree+1. The order of the curve must be greater or equal to 2 to have a valid degree. The number of control points must be at least equal to the order of the curve. The order defines the number of adjacent control points that influence a given control point. An implementation may limit the order to a certain number. The most common orders are 3 (quadratic polynomial) and 4 (cubic polynomial), which are sufficient to achieve the desired curvature in most cases.

controlPoint defines a set of control points which must be equal to the number of knot values plus the order. The basic shape of the spline is controlled by these points. As a result of the lack of  4D Coordinate field type in VRML the control points and the corresponding weight values are held in separate fields. This separation also allows independent animation of the controlPoint fields using a CoordinateInterpolator node.

A weight value that must be greater than zero is assigned to each controlPoint. The ordering of the values is equivalent to the ordering of the control point values which means that the first weight value is assigned to the first control point. If the weight of a control point increased above 1 the point is closer approximated by the curve. The number of values must be identical to the number of control points. If the length of the weight vector is 0, the default weight 1.0 is assumed for each control point.

knots define the knot vector. The number of knots must be equal to the number of control points plus the order of the curve. The order must be non-decreasing. By setting successive knot values equal the degree of continuity is decreased, which implies that the surface gets edges. If k is the order of the curve, k consecutive knots at the end or the beginning of the vector let converge the curve to the last or the first control point respectively. Within the knot vector there may be not more than k-1 consecutive knots of equal value. If the length of a knot vector  is 0,  a default uniform knot vector is computed.

For a 2-dimensional parameter space as in the NurbsSurface case we need additional information to extract the control points in correct order. Two dimension fields define the size of the patch set up by the control points. 

1.1.2 Tessellation strategies

Because low-level real-time rendering API's currently can handle only planar triangles, a NURBS surface needs to be broken down, or tessellated into an set of triangles approximating the true surface.

Tessellation can be done in different coordinate spaces :

  1. Tessellation in object space and the internal computation of the equivalent to an VRML IndexedFaceSet.
  2. Transforming the control vertices to screen space, and tessellation in screen space
There are different methods to determine tessellation points on the surface
  1. fixed tessellation based on a absolute number of subdivisions.
  2. adaptive tessellation based on chord length
  3. adaptive tessellation based on the angle between two triangles
  4. view dependent tessellation, fine tessellation near silhouette edges
As a first step we choose to implement 1/1.
In the second step we implement 2/1. Because of the transformation of the control vertices from object space to screen space, the computed tessellated vertices need not to be transformed. Tessellation in screen space requires the ability to pass already transformed vertices to the rendering API. This is possible using the Microsoft Direct 3D IM-API. However passing data at this level requires the application to already light the vertices (see VRML Lighting model) and pass the resulting color and specular RGB values for each vertex of a triangle.
In order to avoid cracks at the junction of two surfaces tessellation values of a whole set of surfaces can be specified in the NurbsGroup.

A specific goal of this implementation is to study new NURBS animation techniqes by dynamical altering of the controlPoint and weight field of a NurbsSurface. Using fixed tessellation the NURBS blending function at the evaluation point could be cached and need not to be recomputed on an animation.

The tessellation field give hints to the curve tessellator. A value> = order sets an absolute number of subdivision step, 0 lets the browser choose an suitable tessellation. Interpretation of values below 0 are implementation dependent.

For an implementation subdividing the surface in a equal number of subdivision steps tessellation values could be interpreted in the following way:
if a tessellation value is greater 0, the number of tessellation points are tessellation+1;
if a tessellation value is smaller than 0, the number of tessellation points are (-tessellation * dimension)+1
if a tessellation value is  0, the number of tessellation points are  (2 * dimension)+1

For implementations doing tessellations based on choord length tessellation values <0 could be interpreted as the max choord length deviation in pixels. 

1.1.3 Automatic Level of Detail

Taking advantage of the totally flexible tessellation of NURBS models new ways of  LOD will be explored. Dependent on various parameters the output of the tesselation process is adapted in every frame. This trade off between quality of the rendered model and the frame-rate must take account of

1.2 Trimmed NURBS

(not yet implemented)

The trimming curve specifies a NURBS-curve that limits the NURBS surface in order to create NURBS surfaces that contain holes or have smooth boundaries. Trimming curves are curves in the parametric space of the surface. An implementation approach can be based on the OpenGL trimming definition:

A trimming region is defined by a set of closed trimming loops in the parameter space of a surface. When a loop is oriented counter-clockwise, the area within the loop is retained, and the part outside is discarded. When the loop is oriented clockwise, the area within the loop is discarded, and the rest is retained. Loops may be nested, but a nested loop must be oriented oppositely from the loop that contains it. The outermost loop must be oriented counter-clockwise.
A trimming loop consists of a connected sequence of NURBS curves and piece wise linear curves. The last point of every curve in the sequence must be the same as the first point of the next curve, and the last point of the last curve must be the same as the first point of the first curve. Self intersecting curves are not allowed.

The following Nodes sketch a trimmed NURBS surface extension.

Thereby the TrimmedSurface contains a NurbsSurface and a set of Contour2D nodes describing the trimming loops. The trimming loops are sets of curve segments defined with Polyline2D and NurbsCurve2D.

1.3 NURBS and Animation

Basically NURBS can be simply animated by alteration of single control vertices. Thereby the NURBS surface will always keep its smoothness. With the order of the surface the impact of the cv-animation on adjacent control points and so the range of the animation can be changed.

NURBS are also applicable for the animation of values using smooth curves expressed in NURBS format. An adaption of the VRML PositionInterpolator node to a NURBS description leads to the NurbsPositionInterpolator. Using a VRML PositionInterpolator it is not possible to specify a smooth movement like a path along a circle until the curve is sampled to a very fine stepping. In many existing VRML content the data for Interpolators take up a serious amount of   the total size of the VRML file. Using Spline (NURBS) based interpolation the amount of data can be reduced considerably.

Extending the concept NurbsCurve (one Parameter), NurbsSurface (two parameters) to the parametric dimension 3 results in a NurbsVolume. So given a (u,v,w) parameter as input a 3D (x,y,z) output can be computed. The CoordinateDeformer defines a volume and applies a space warp to this volume. Any given conventional VRML node can be deformated by this node. This concept can also be found in programs like 3D Studio Max in form of a Free From Deformation (FFD).