mental ray Approximation Editor nodes
 
 
 

The following settings appear when an approximation node is selected in the Approximation Editor, or when an object to which an approximation node has been assigned is selected in the scene view. The attributes that appear may differ depending on the approximation node that you selected.

Presets

This drop-down list provides many useful preset tessellation settings.

You can select an item from this list to load the preset values for the approximation node's attributes. You can use these settings as-is, or as a starting points for tweaking. By default, the Presets tab is set to Custom, which means that you have control over all approximation attributes.

Parametric Grid (Low/Mid/High) Quality

Uses the Parametric approximation method to tessellate a surface into triangles. With this method, each patch (area between isoparms) is subdivided into a fixed number of triangles.

Use this preset to produce tessellations where triangles are distributed roughly according to the spacing of isoparms on the surface, with closer isoparms producing higher triangle densities.

Regular Grid (Low/Mid/High) Quality

Uses the Regular Parametric approximation method, where the surface as a whole is subdivided into a fixed number of triangles (instead of each patch, as is the case with the Parametric method).

Use this preset to ensure an even triangulation over surfaces where the spacing of isoparms is uneven.

Angle Tolerance (Low/Mid/High) Quality

Uses an adaptive tessellation method in which more triangles are added to areas of high curvature. The goal of this method is to add triangles where they are needed to capture sharp features, while at the same time using just a few triangles in large, flat areas where they are not needed.

Pixel Length (Low/Mid/High) Quality

Tessellates surfaces based on their size (in pixels) in the final rendered image. Surfaces that are close to the camera will be tessellated heavily, while surfaces that are far away from the camera will receive coarser tessellations. The goal of this preset is to focus the most attention on surfaces that are more significant to the final image.

Approximation method

Parametric approximation

Subdivides each patch of the surface into equal-sized pieces in the U direction and V direction.

Regular parametric

Curves are subdivided into equal pieces by the parametric approximation and into subdiv equal pieces by the regular parametric approximation.

For displacement mapped polygons and displacement mapped surfaces with a displace statement regular parametric has the same meaning as parametric in the approximation. For displacement mapped polygons the u_subdiv constant specifies that each edge in the triangulation of the original polygon is subdivided for the displacement 2u_subdivtimes. If a displace approximation is given for a displacement mapped surface, the initial tessellation of the underlying geometric surface is subdivided in the same way as for polygons. For example, a value of 2 leads to a fourfold subdivision of each edge. Non-integer values for the subdivision constant are admissible. Nothing is done if the expression above is smaller than 2 (if u_subdiv < 1). The v_subdiv constant is ignored for the parametric approximation of displacement maps.

Length/distance/angle (LDA) approximation

Specifies curvature-dependent approximation according to the criteria specified by the Length, Distance, and Angle attributes.

Spatial approximation

A special case of an LDA approximation that specifies only the length attribute and optionally the view attribute.

Curvature

A special case of LDA approximation, equivalent to the distance attribute, the angle attribute, and optionally the view attribute statement.

Approximation Style

Tree, Grid, and Delaunay approximation algorithms are available for surface approximation only; they have no effect on curve approximations. Parametric approximation always uses the Grid algorithm; all other Approximation methods can use any style but Tree is the default.

Grid

Tessellates on a regular grid of isolines in parameter space.

Tree

Tessellates in a hierarchy of successive refinements that produces fewer triangles for the same quality criteria.

Delaunay

Creates a successive refinement that maximizes triangle equiangularity. Delaunay triangulation creates more regular triangles but takes longer to compute.

U Subdivisions, V Subdivisions

These values are used by the Parametric approximation and subdivides each patch of the surface into equal-sized pieces in the U direction and V direction. Regular parametric approximation methods specify how many times each patch (for Parametric) or surface (for Regular Parametric) should be subdivided in the U and V directions.

Min, Max

When using the Length/distance/angle (LDA) approximation adaptive approximation method, these attributes can be used to control the minimum and maximum number of times that triangles in the tessellation are subdivided. The Max Subdivisions parameter is especially useful for preventing runaway situations where the approximation method wants to add many triangles to an area where they will not greatly improve the quality of the tessellation.

You can obtain good results with a Max Subdivisions value as low as 3. Generally, each subdivision level can increase the triangle count by a factor of 4, so raising the Max Subdivisions from 3 to 4 can produce 4 times as many triangles. Raising it to 5 can produce 16 times as many triangles, raising it to 6 can produce 64 times as many triangles, and so on.

Max triangles

This setting only applies to the Delaunay approximation type. It determines the maximum number of triangles that the final tessellation may contain.

Grading

Applies only to Delaunay approximation style.

Varies the density of triangles around the border of the surface, allowing for a smooth transition between a fine curve approximation and coarser surface approximation. It prevents a large number of tiny triangles at the trimming or hole curve to abruptly join very large triangles in the interior of the surface.

The angle constant specifies a lower bound related to the degree of the minimum angle of a triangle. Values from 0.0 to 30.0 can be specified. Small values up to 20.0 are recommended. The default is 0.0. High grading values require you to specify a maximum number of triangles (see Max triangles) to prevent too many triangles or endless mesh refinement.

Length

Subdivides the surface or curve so that no edge length of the tessellation exceeds the edge parameter. Edge is given as a distance in the space the object is defined in, or as a fraction of a pixel diagonal in raster space if the view keyword is present. Small values such as 1.0 are recommended.

For Tree and Grid approximation, the Min, Max values (if specified), specify the minimum and maximum number of recursion levels of the adaptive subdivision. Min enforces a minimal triangulation fineness with no tests. Edges are further subdivided until they satisfy the given criterion or the max subdivision level is reached.

The defaults are 0 and 5, respectively; 5 is a very high number. Good results often occur with a maximum of 3 subdivisions.

For Delaunay approximation, Min, Max specifies the maximum number of triangles of the surface tessellation. This number is exceeded only if required by trimming, hole, and special curves because every curve vertex must become part of the tessellation regardless of the specified maximum.

For displacement mapped polygons and displacement mapped surfaces, length limits the size of the edges of the displaced triangles and ensures that at least all features of this size are resolved. Subdivision stops as soon as an edge satisfies the criterion or when the maximum subdivision level is reached.

Distance

Specifies the maximum distance between the tessellation and the actual curve or surface. The value of dist is a distance in the space the object is defined in, or a fraction of a pixel diagonal in raster space if the view statement is present.

As a starting point, a small distance such as 0.1 is recommended. For Tree and Grid approximation the min and max parameters, if present, specify the minimum and maximum number of recursion levels of the adaptive subdivision. For Delaunay approximation, the number max following the keyword max specifies the maximum number of triangles of the surface tessellation.

For displacement mapped polygons and displacement mapped surfaces with a displace approximation statement the distance criterion cannot be used in the same way because the displaced surface is not known analytically. Instead, the displacements of the vertices of a triangle in the tessellation are compared. The criterion is fulfilled only if they differ by less than the given threshold. Subdivision is finest in areas where the displacement changes. For example, if a black-and-white picture is used for the displacement map the triangulation will be finest along the borders between black and white areas but the resolution will be lower away from them in the uniformly colored areas. In such a case one could choose a moderately dense parametric surface approximation that samples the displacement map at sufficient density to catch small features, and use the curvature-dependent displace approximation to resolve the curvature introduced by the displacement map. Even if the base surface is triangulated without adding interior points, as if its a trim curve defined a polygon in parameter space, it is still possible to guarantee a certain resolution by increasing the min subdivision level. Only the consecutive subdivisions are then performed adaptively.

Angle

The angle statement specifies the maximum angle in degrees between normals of adjacent tiles of a displaced polygon or the tessellation of a surface or its displacement or between tangents of adjacent segments of the curve approximation. Large angles such as 45.0 are recommended. For tree and grid approximation the min and max parameters, if present, specify the minimum and maximum number of recursion levels of the adaptive subdivision. For Delaunay approximation, the number max following the keyword max specifies the maximum number of triangles of the surface tessellation.

View dependent

Controls whether the edge argument of the length and spatial statements and the dist argument of the distance and curvature statements are in the space the object is defined in or in raster space.

Turn this on to express the Length and Distance attribute values in pixels instead of object-space units (the default). The advantage of using view-dependent values is that objects that are close to the camera receive many triangles, while objects that are far away (or not visible at all) are approximated much more coarsely.

Length

If the View Dependent attribute is turned on, this value is specified in pixels, otherwise it is specified in object-space units. The Length criterion is especially useful in conjunction with view dependency. For example, a view-dependent value of Length = 0.5 means subdivide until all triangles are no bigger than half a pixel in the resulting image. If the Length attribute is set to 0.0, this criterion is ignored by the tessellator.

Distance

If the View Dependent flag is turned on, this distance is expressed in pixels, otherwise it is expressed in object-space units. The lower the value, the more closely the tessellated surface will match the exact NURBS surface. Small values such as 0.1 work well (with view dependency disabled). If the Distance attribute is set to 0.0, this criterion is ignored by the tessellator.

Spatial

The Spatial approximation method is the same as the Length criteria from the Length/Distance/Angle method. Using this method, the mesh will be subdivided until all triangles are less than a certain size, determined by the Length attribute. This value is expressed in either pixels or object-space units, as determined by the View Dependent flag. This method is the only one available when using the Fine approximation type.

Sharp

Controls normal-vector calculations. If set to 0.0, mental ray for Maya uses the interpolated normal, as specified by the base surface, modified by displacement if available. If set to 1.0, mental ray for Maya uses the geometric normal to achieve a sharp faceted look.