Share

Nearest Points - Arnold User Guide

The nearest points shader samples point clouds from OpenVDB points files, or the vertices from points, curves, and polymesh nodes. The shader can output the number of points found, average distance, or an average of a custom user-data attribute from the points.

The count, distance, or position outputs are always available, but if you want to use one of outputs like out_float or out_rgb, you must set output_attribute to the channel or user data from the point cloud you want to get.

The shader generates an average of the particular output (except for count, which is always just the number of points it found).

Note: nearest_points does not support displacement yet.

Max Points

Maximum number of points to find.

Search Radius

The maximum distance to look for the nearest points in the point cloud.

Pointcloud Name

When pointcloud mode is set to file, this is the name of the points grid within the file to query.

Output Attribute

Attribute or user data on the point cloud to query. The shader output used (out_*) must match the attribute type from the point cloud.

Average by Max

If true, the computed average is divided by the maximum number of points, not the found number of points.

Normalize Distance

If true, the average distance to the nearest points is divided by the search radius to normalize the distance. So it will go from 0 to 1 instead of 0 to the search radius. It only affects the distance output.

Outputs

This shader has multiple outputs, and you select which one to use by setting the output_attribute parameter (a string). Alternatively, you can use the "count", "distance", or "position" outputs without specifying output_attribute.

Was this information helpful?