NURBS Curve

NURBS curves and surfaces are defined by number of four dimensional control points where the first three components define position in 3D space and the fourth component acts as a weight parameter. Increasing the weight pulls the curve towards the control polygon. Thanks to this property, NURBS curves can be used for representing quadric surfaces accurately.

Non-uniform parametrization allows representation of standard curves and surfaces. For example, one can use NURBS to represent standard Bezier and B-spline surfaces.

Realsoft 3D uses a very standard NURBS representation. Only the 'Closed' attribute needs some special attention for example when exporting Realsoft 3D NURBS objects to other applications. Many applications support only open NURBS curves and surfaces.

A NURBS curve is defined by the following attributes:

  • Control Points

  • Order: Order is degree + 1. For example, the order of a quadric curve is three. Order defines the minimum number of control points.

  • Closed If true, the curve is closed. Realsoft 3D makes the curve periodic internally by extending the knot sequence and using a modulo operator.

  • Knots: Knots define a set of parameter values in increasing order.

NURBS Curve Property Gadget

Point Count: The amount of control points defining the curve. Reducing the point count usually changes the shape.

Selected point: The index (0, 1, 2 ...) of the currently selected point.

Position: The location of the selected point in 3D space.

Weight: The weight of the selected control point(s). Increasing the weight pulls the curve towards the selected control points.

Parametrization: Curve parametrization type. Parametrization affects curve shape significantly, and is relevant also in path animations. Uniform parametrization means that all point intervals represent an equal parameter interval. The chord length parametrization makes the parameter division using point distances.

End condition: Max Multiplicity end condition pulls an open curve to the first and the last control points. Phantom end condition uses a similar parametrization for the end points as for the interior points.

Min: The start parameter value for curve evaluation. With this and the next 'max' value, you can limit a suitable sub section from the curve.

Max: The end parameter value for curve evaluation.

Order: The order of the curve. The higher the order, the smoother the curve. Order = 2 produces a polyline. The most usual smooth NURBS curve type has order 4.

The Rendering frame includes settings which control NURBS curve rendering in the photorealistic render engine. The curve can be made visible in the final rendering using the Gen tab's visibility options.

Max. Displacement: The maximal amount of curve displacement defined either by moving the curve points or by changing the radius in a 'Scanline' shader.

Head radius [mm]: Thickness of the curve start (in millimeters).

Tail radius [mm]: Thickness of the curve end (in millimeters).

Radius Channel: An optional channel defining the curve diameter. If set, replaces the start and end radius values. The thickness values can be defined by creating a VSL material, where a scanline type shader assigns the values to the selected channel, and mapping the material to the curves. For example:

    Material_for_Curves
        Scanline
            my_diameter_channel = Noise(map coords)

Quality: Rendering quality for curves. A smooth NURBS curve is drawn using short segments in the scanline or ray trace rendering. This value defines how densely the curve is subdivided to intervals. The higher the value, the smoother the result appears. The value is used per control point interval, so the same quality value works as well with a 5 point curve as with a 100 point curve.

[Note] Note

The NURBS curve supports also curve displacement by materials the same way as the thickness control presented above:

    Material_for_Curves
        Scanline
            coordinates += Noise(map coords)

Ray Trace: If set, the curve is rendered using a ray traced geometry which casts shadows, is visible in reflections etc. The geometry type used in this context is quite memory efficient, and tens of thousands of curves can be included in the scene. The curve is procedurally refined towards a smooth shape during the rendering. The Quality value defines the computation accuracy. The minimal quality is usually sufficient for simple curves. High quality values may be necessary if a material is applied to deform the curve shape densely.

Hair created using ray traced NURBS curves

A ray traced curve defines the following geometry information that is available for VSL shaders:

  • UV Coords: The first U component runs along the curve - head=0, tail=1. In all shaders except the Scanline V runs cylindrically around the curve, and the third component is the distance from the curve center. Scanline shader evaluates only the curve axis points, hence V & W are irrelevant in that context.

A spiral pattern mapped around curves using the native UV coordinates

Scanline: If set, the curve is rendered using scanline geometry. This rendering method is often quicker than the ray trace approach, but scanline curves are invisible in reflections and do not cast ray traced shadows. The curve shape controls are the same as in ray tracing.

Post Process: Draws the curve in post processing phase, which is the last step in the rendering pipeline. Post processed curves do not react with lights or cast shadows, and do not show up in reflections. Due to the simplicity of the rendering method, they usually render quite fast. With this method, you can add for example text labels or rain effects into the image.

The curve shape can be controlled the same way using VSL materials as in ray tracing and scanline rendering. To define a color for a post processed curve, use a Post Particles shader. Color, Alpha and Fade channels defined in that shader control the rendering. Fade defines transparency.

[Note] Note
It is often impossible to add new post processed depth layers to an antialiased image from the ray tracer without getting some antialiasing errors. For example, a red sphere in front of a white background has some pink edge pixels, and rendering a post processed object between the red and white objects happens 'too late'. Such artifacts can be reduced by turning ray trace antialiasing off and by using image resolution down scaling after post processing.
Colored NURBS curves rendered in post processing