mental ray supports free-form curves and surfaces in non-uniform rational B-spline (NURBS), Bézier, Taylor (monomial), cardinal or basis matrix form. Any of these forms may be rational and may be of degree up to twenty-one. [2] Surfaces may be trimmed.
Internally, free-form surfaces are triangulated (approximated) before rendering. A variety of approximation techniques is available, including uniform and regular parametric, edge length, distance, angle, and combined methods. All versions of mental ray support a large range of methods:
In addition, mental ray supports a specialized method called fine approximation that is much easier to control and works very well with high-detail displacement maps. The view-dependent fine length method is now recommended for all high-detail tessellations; regular parametric can be used for low-detail objects or the base surface of finely displaced objects. This greatly simplifies the choice of methods and parameters.
The length, distance, and angle criteria can be combined; in this case refinement continues until all criteria are met. The any keyword changes this so that refinement stops when any criterion is met; this is useful to stop the angle criterion from adding more triangles when the triangle edges become smaller than the limit specified by the length criterion, for example.
View-dependent subdivision, enabled by the view keyword, changes the length and distance criteria to work in raster space, interpreting the parameters in pixels instead of 3D units. Effectively, closer objects are tessellated more finely. This means that objects that are instanced more than once must be triangulated in multiple ways. A tradeoff between the additional memory required to store multiple objects and the reduced total number of instanced triangles must be evaluated to achieve optimal speed.
The length, distance, and angle approximation techniques use a recursive subdivision process that can also be controlled by two additional parameters, specifying the minimum and maximum number of recursion levels. The subdivision can be forced to proceed at least as far as the given minimum level, and refinement can be halted at the maximum level.
All subdivisions of a free-form surface apart from the regular parametric technique and the Delaunay technique begin at the patch level. (A patch is the smallest unit of a surface.) If, for example, a plane is modeled with ten by ten patches it will be approximated by at least two hundred triangles, although two triangles might be adequate. If mental ray seems to be producing a large number of triangles in spite of a low approximation accuracy, this is often due to the selected patch subdivision algorithm.
Free-form curves (trimming curves) may also be approximated by any of the above described methods using a technique and tolerances which are distinct from those of the surface which the curve trims. The definitions are essentially the same if one considers a curve segment to correspond to a surface patch.
[2] Although the user-settable degree is currently limited to 21, mental ray has no inherent limit.
Copyright © 1986-2008 by mental images GmbH