polymesh

Class

Shape

Synopsis
A polygon mesh.

 


 

nsides
An unsigned int array that defines the number of sides per face.
vidxs
An unsigned int array of indices to vertices.
nidxs
An unsigned int array of indices to normals.
uvidxs
An unsigned int array of indices to UV coords.
crease_idxs
An unsigned int array of hard crease edges. An edge is defined here with the indices for its two vertices. Because of this crease_idxs always has an even number of elements.

Vertex normals can't be creased, so even though you can get a hard crease in the silhouettes, the shading normals will still "smooth" over the crease.

shidxs
A byte array of shader indices. Arnold supports up to 256 different shaders per object.
vlist
A point array of vertices. Multiple keys are supported to obtain deformation motion blur.
nlist
A point array of vertex normals. Multiple keys are supported to obtain proper deformation motion blur.
uvlist
A point2 array of UV coordinates.
smoothing
This boolean defines if the normals will be faceted or smooth.
subdiv_type
This enum. Defines the subdivision rule that will be applied to the polymesh at render time. Possible values are catclark (catmull clark) and linear.

None

Ignores any subdivision and renders the mesh as it is.

Linear

Linear subdivision puts vertices in the middle of each face.

 

The Catmull–Clark algorithm is used to create smooth surfaces by recursive subdivision surface modeling. The resulting surface will always consist of a mesh of quadrilateral faces.


subdiv_iterations

The maximum number of subdivision rounds applied to the mesh. When subdiv_pixel_error is 0 the number of rounds will be exact instead of a maximum. 

subdiv_adaptive_error
The maximum allowable difference in pixels or object space (if subdiv_adaptive_space = object) between the adaptively chosen subdivision level and the "limit" subdivided surface. Either a "flatness" or "edge_length" metric can be used, depending on polymesh.subdiv_adaptive_metric. It refers to the acceptable tessellation error as seen from the camera, in pixels. If there's no displacement, then the pixel error represents the distance (in pixels) from the subdivided mesh to the "true" or "limit" surface -- sort of a "flatness" heuristic. The smaller the error, the closer to the limit surface a mesh will be and the less inter-frame "popping" when the subdivision level jumps, at the expense of using more polygons. If displacement is enabled, then the pixel error represents the final size of the subdivided quads (again, in pixels). A value of 0 disables adaptive subdivision, reverting to uniform subdivision, which sometimes is more stable in animation.
subdiv_dicing_camera
The camera to use when determining subdivision levels of patches during adaptive subdivision.
subdiv_adaptive_metric
The metric used to determine the amount of error between a given subdivision level and the limit surface. Can be either "flatness" where the curvature of the mesh in pixels is the feature used to choose the adaptive subdivision level, "edge_length" where the length of the polygonal edges in pixels is used, or "auto" which uses "flatness" when no displacement map is applied and "edge_length" when a displacement map is applied to the polymesh.


subdiv_uv_smoothing

The face-varying "limit" dPdu and dPdv vectors computed during subdivision are stored and used for shading instead of computing face-constant dPdu and dPdv vectors on the fly during shading. This can be useful for anisotropic shaders but has a storage cost. This option is not supported yet for adaptive subdivision. Choose between linear, pin borders, pin corners,  or smooth.

disp_map
An array of nodes pointing to the displacement shader or shaders in the case of per-face shader assignment (it will use the same assignations as shidxs)
disp_height
A value used to scale the effect of the displacement shader applied to the mesh.
disp_zero_value
Offset applied to the displacement effect. This allows for example a texture mapped displacement shader returning values in the 0 to 1 range to displace both inwards and outwards in a -0.5 to 0.5 range when set to 0.5.
disp_autobump
Automatically converts any high frequency detail in the displacement shader that could not be represented in the subdivided & displaced geometry into bump map detail that will at least affect the shading normal. When turned on this option will usually allow displaced meshes to use lower subdivision levels and still look virtually indistinguishable from higher subdivision levels with the option turned off.
visibility

You can selectively disable an object's visibility for the various types of rays in the renderer. By default, objects are visible to all types of rays. Camera - Camera rays (i.e., primary or view rays). Shadow - Shadow rays fired in the direct lighting calculations. Reflected - Mirror reflection rays. Refracted - Refraction rays. Diffuse - Indirect diffuse rays (i.e. global illumination, hemi, or GI rays). Glossy - Indirect specular rays (i.e. glossy reflection rays).

autobump_visibility
You can selectively disable an object's bump mapping from autobump for the various types of rays in the renderer.  The ray types are the same as the 'visibility' parameter. This defaults to all rays except for rays that have undergone diffuse bounces. By disabling it for more ray types (like reflection, refraction, glossy), rendering can be made faster with little degradation in image quality.
sidedness

Just like you can disable the visibility for specific ray types, you can also change an object's sidedness depending on the ray type. By default, objects are double-sided for all rays. By unclicking any of these checkboxes, the object will become single-sided, which means that those parts of the object whose normal vector points away from the incoming ray direction will not be rendered.

receive_shadows

Determines whether or not the object picks up shadows from other objects.

self_shadows

Determines whether or not the object casts shadows on itself.


invert_normals

Invert normals (so that normals face inwards and not outwards).

ray_bias

Raytrace bias value specified for the object.

matrix

Transformation matrix. This can be either a single matrix or an array of matrices that define the SRT motion of the object for the current frame. (The matrices define the motion for the full frame, not just between the shutter open - close time.)

shader

An array of nodes pointing to the shader or shaders in the case of per-face shader assignment.

opaque

The opaqueness (transparency) of the object. By default all objects are marked as opaque, because that speeds up the rendering considerably. Note that this flag is not set automatically by adding a transparent material to the object, it has to be set manually!

use_light_group

A boolean to enable selective light linking

light_group

An array of nodes pointing to the lights that will affect the node if use_light_group is enabled.

use_shadow_group

A boolean to enable selective shadow linking.

shadow_group

An array of nodes pointing to the lights that will not cast shadows on the polymesh, if use_shadow_group is enabled.

trace_sets

An array of strings each of which names a trace set. A custom shader must be used to make an effective use of these strings via the AiShaderGlobalsSetTraceSet and the AiShaderGlobalsUnsetTraceSet API calls.

transform_time_samples

    Excerpt not found
The page: shapes was found, however the excerpt named: transform_time_samples was not found. Please check/update the excerpt name.

deform_time_samples

    Excerpt not found
The page: shapes was found, however the excerpt named: deform_time_samples was not found. Please check/update the excerpt name.

id

Unique ID for a node in the Arnold scene. 

subdiv_adaptive_space 

Adaptive subdivision in raster space is problematic when instancing: A tessellation that is good for one instance will not be good for another further away. Using object space subdivision will ensure that all instances will subdivide to the proper level.
Raster

Corresponds to adaptive subdivision in raster space.  

Object 

This method corresponds to adaptive subdivision in object space. This is useful for instances or when adaptive tessellation is desirable regardless of a specific camera. Arnold will warn when raster-space tessellation is used on more than one visible instance.

 

 

subdiv_smooth_derivs

You may notice faceting appear in specular highlights when using anisotropy. It is possible to remove the faceted appearance by enabling smooth subdivision tangents (via Arnold subdiv_smooth_derivs parameter). Take into account this requires a subdivision iteration of at least one in the polymesh to work.

Below is an example consisting of a sphere with an anisotropic highlight. On the left image, polygon faceting is noticeable in the specular highlight. On the right image, the specular highlight is much smoother because Smooth Subdivision Tangents has been enabled for the mesh.

If enabled, it will compute smooth UV derivatives (dPdu and dPdv), which is the reason you need a UV map associated to the object).

When the option is disabled, these derivatives are constant per triangle, which results in a faceted appearance whenever dPdu and dPdv (like in the anisotropic computations from the Standard shader).

 

 

  • No labels