Houdini 20.5 Nodes VOP nodes

Point Loop VOP node

Only available in Image3D VOP networks.

On this page

This operator is only available in Image3D VOP networks. It contains other VOP operators, and executes the code for the contained operators once for each metaball or particle that contains the position passed in.

If the distance is specified, all metaballs and particles within the distance of the point specified will be iterated through. The distance parameter is optional and may result in slower execution of the shader.

Inside the point loop, the Metaball Density and Metaball Attribute operators may be used to query the contribution of the current point instead of getting a blended value. The Metaball Space operator can be used to transform the points into the local space of the metaball.

Any value that you wish to modify inside the point loop must be provided as an input. The outputs of the Point Loop operator will contain the modified versions of the inputs once the loop exits. The actual values wired into the Point Loop inputs are never modified, and so can be connected to other operators in the network; but remember that the values from these operators will always be the values unmodified by the Point Loop operator.

Here is a pseudocode example of how to compute the point color of the metaball which contributes the maximum weight to the point in space:

float  crt_distance = 0;
float  max_distance = 0;
vector max_color;
for_all_points( P )
{
    crt_distance = metaball density of P;
    if (crt_distance > max_distance)
    {
        max_color = metaball attribute "Cd" of P;
        max_distance = crt_distance;
    }
}
vector blended_color = max_distance * max_color;

Inputs

All connected inputs mimic the properties of the output wired into them. They adopt the same help label and name as the output connected to them. If multiple outputs with the same name are connected, the names of the inputs are automatically incremented to make them unique.

Position

Vector representing the position of a point in space. If no no input is connected, the default is the global P.

Distance

If specified, all metaballs particles within the distance of the point specified will be iterated through.

Next Input

Up to 64 inputs can be connected here. Each time an input is connected, a new input slot is added.

Outputs

The list of outputs depends on the inputs connected to the Subnet Output operator contained in this operator. The data type and name of each output will match the corresponding input of the Subnet Output operator.

See also

VOP nodes