curves

Class

Shape

Synopsis
Represents a set of curves that can be either flat (ribbon-like) or thick. This is useful for modeling hair or other objects consisting of long thin strands. The curves can be specified using various basis functions (Piecewise-linear, Bezier, B-Spline, or Catmull-Rom).

 

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 (AA) rays (i.e., primary or view rays). Shadow - shadow rays fired in the direct lighting calculations. Specular - specular reflection rays. Transmission - Transmission rays. Diffuse - Indirect diffuse rays (i.e. global illumination or GI rays). Specular - Indirect specular rays (i.e. specular reflection rays).

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

As of Arnold 5.3, this flag is set automatically by changing the opacity or transmission on a material.

Determines whether the object is considered opaque (transparent). By default, Arnold built-in shaders set the opaque flag automatically, based on whether or not the shader settings would require disabling the opaque flag on the object to render correctly. For example, it's no longer necessary to manually disable the opaque flag to get transparent shadows for a glass shader.


Exceptions are curves and points when min_pixel_width is in use, and OSL shaders.  


 

matte

The matte option enables you to create holdout effects by rendering the alpha as zero.

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 effective use of these strings via the AiShaderGlobalsSetTraceSet and the AiShaderGlobalsUnsetTraceSet API calls.

It is possible to tag objects to be part of one or many trace sets. The trace_set shader tags specific rays with an inclusive or exclusive trace set. Both geometry and rays can be tagged with trace sets:

  • A piece of geometry can have none or any number of trace set tags.
  • A ray can optionally have one trace set tag, and it can be exclusive or inclusive.

 

The way those two tags interact makes it possible to control visibility for specific rays:

  • A ray with no trace set will hit all geometry.
  • A ray tagged with an inclusive trace set will only hit geometry which has that trace set tag.
  • A ray tagged with an exclusive trace set will only see geometry that does NOT have that trace set tag.

motion_start

The time at which the first motion key of the shape is sampled. Other motion keys must be uniformly spaced within this range. Times can be absolute or relative as long as shutter and motion times use the same convention. By convention, the times are frame relative. For example, start and end times -0.5 to 0.5 indicate that two motion keys will be sampled midway between the previous and current frame, and the current frame and next frame. This is applied to cameras, lights, and shapes.

motion_end

The time at which the last motion key of the shape is sampled. Other motion keys must be uniformly spaced within this range. Times can be absolute or relative as long as shutter and motion times use the same convention. By convention, the times are frame relative. For example, start and end times -0.5 to 0.5 indicate that two motion keys will be sampled midway between the previous and current frame, and the current frame and next frame. This is applied to cameras, lights, and shapes.

id

Unique ID for a node in the Arnold scene.  

num_points

An unsigned integer array of the number of control points (CVs) per curve. Depending on the basis, only a certain number of points is allowed per curve. For linear at least two points per curve are required, but the number of points can be anything beyond that minimum. For bezier at least four points are required, and then subsequently there must be three more points added in turn to form a valid curve: bezier curves thus require 4, 7, 10, 13, 16, 19, 22, ... points to be valid.  For the other bases, b-spline and catmull-rom, there must also be at least 4 points, but there can be any number of points beyond that: 4, 5, 6, 7, 8, 9, etc. If a curve is degenerate, e.g. it has at least two points, but still has too few or an invalid number of points, Arnold will issue a warning and attempt to disable the degenerate curves while preserving the valid ones.

If just one entry is supplied in the num_points array, Arnold assumes that all curves in the set have that same number of points.  This allows a shorthand if the number of points per curve matches for all curves. 

The effective number of curve segments for a given number of control points depends on the basis used, as illustrated in the table under basis.

points

A 3d vector array of the control points (CVs) for all curves.
radius
A float array of radii.  This array may have one entry (in which case all curves have the same radius), or the same number of entries as curves (each curve having its own radius, but the width of each individual curve is constant), or otherwise the entry count per curve is the number of varying values for each curve (as illustrated in the table under basis).
orientations
A 3d vector array of orientation vectors, for oriented mode. Orientations are vectors specifying which direction the curve faces at each point, and must be specified per-point.  Note that these are only usable when the mode is set to oriented.

 

basis

Describes how the curve is formed from the control points. The available basis choices are Bezier, B-Spline, Catmull-Rom, or Linear:

bezier: the curve touches the first and last points, and then touches each interior and shared fourth point. That means a curve with 16 points will have the curve visually touch the 1st, 4th, 7th, 10th, 13th, and 16th points, where the 4th, 7th, 10th, and 13th points are shared between curve segments. Bezier curves thus form a new segment every 4th point, with the 4th point forming the first point of the next curve segment. Or more generally, Bezier curves have (npoints - 1)/3 segments.

b-spline: the curve likely does not touch any of the control points, unless you repeat a control point three times. These curves have 3 fewer segments than control points, where the segments are evenly distributed over the curve.

catmull-rom: the curve does not touch the first and last control points unless you repeat a control point three times, but it does cause the curve to pass through the other control points and swing wide if needed to do so. It has the same number of segments as b-spline, or three fewer segments than control points.

linear: the curve touches each point, and is a straight line in between points. Each point and its next point forms a segment.

 

As in other shapes, constant data has a single value for the entire curves shape. Uniform data has a single value per curve. But varying data for curves requires one value at the start of each curve segment, and one at the end, so that if a curve has 10 segments it will have 9 shared values, and then one value at the beginning and one at the end of the curve for a total of 11 values. For a linear basis, this is straightforward, as there is a single value per control point.

For Bezier basis this gets more complicated: each segment spans 4 points, with the fourth point shared with the next segment's first point, so a Bezier curve with four points has one segment and thus two varying values; a Bezier curve with 7 points has two segments and three varying values; a Bezier curve with 10 points has three segments and four varying values, and so on.

B-spline and Catmull-Rom are both the same; there are npoints-3 segments, and so there are npoints-2 varying values.


As described above, the effective number of curve segments for a given number of control points depends on the basis used, which is summarized in the table below. Note that the number of varying values (e.g. radii) is always equal to the number of segments plus one.


 

mode
There are three algorithms for rendering curves in Arnold.  

Ribbon

Ribbon mode is recommended for fine geometry such as realistic hair, fur or fields of grass. These curves are rendered as camera-facing flat ribbons. For secondary and shadow rays, they face the incoming ray direction. This mode doesn't look so good for very wide hairs or dramatic zoom-ins because of the flat appearance. This mode works best with a proper hair shader (perhaps based on a Kay-Kajiya or Marschner specular model).

Thick

Thick mode resembles spaghetti. It has a circular cross-section and a normal vector that varies across the width of the hair. Thick hairs look great when zoomed in, and are especially useful for effects work, but their varying normals make them more difficult to antialias when they are small. You can use any shader with this rendering mode, including lambert, phong, etc.

Oriented

Oriented mode allows the curves to face in a given direction at each point. This is more useful for modeling blades of grass, tape, and so on.

min_pixel_width

If this value is non-zero, curves with a small on-screen width will be automatically enlarged so that they are at least the specified size in pixels. The enlargement fraction is then used in the hair shader to adjust the opacity so that the visible thickness of the hair remains the same. For a given number of AA samples, this makes it a lot easier to antialias fine hair, at the expense of render time (because of the additional transparency/depth complexity). Good values are in the range of 0.2 to 0.7. Values closer to 0 are faster to render but need more AA samples. So if your scene already uses very high AA settings, you should use a low value like 0.1. For best results, you may need to increase the auto-transparency depth, and/or lower the auto-transparency threshold, but watch the effect on render times. Note that this parameter currently works with the ribbon mode only. 

shidxs
...
uvs
A 2d vector array of UV coordinates. The coordinates may be specified per curve (uniform) or curve point (varying). When rendering hair or fur, it is often useful to pick up a color from a texture based on where the hair is attached to the emitter geometry.

 

 

 

 
  • No labels