|On this page|
The pciterate VOP will either start a point iteration or advance to the next iteration point. The pciterate VOP should normally be used as input to a while loop condition, with Point Cloud Import operations inside the loop to gather iteration point information. The pciterate VOP corresponds to the pciterate VEX function.
You should usually iterate through all points in the point cloud. If you don’t iterate over all points, it is necessary to use the Point Cloud Close VOP to close the point cloud before other operations are performed in the shader.
The point cloud handle to be used for iteration.
Returns 1 when the iteration was successful, in which case point data can be queried using pcimport.
This example shows how the pciterate vop can be used to average together points returned by pcopen. First, a point cloud is generated with a floating point "check" channel initialized to 1 inside a circle in the x-z plane. Then, the points are filtered in a shader by looping using the pciterate vop and averaging the value of the "check" channel. The point cloud used in the example is stored inside the asset as points.pc.