Houdini 17.0 Nodes VOP nodes

While Loop VOP node

Runs the VOP nodes inside its subnetwork as long as a given condition is true.

On this page

This operator contains other VOP operators. The code for the contained operators is executed repeatedly in a loop until the input condition is no longer satisfied. At least one input must be connected to this operator.

Use this operator to repeat the same sequence of code many times. Be careful when using this operator to ensure that the condition will eventually fail. Otherwise an endless loop can result. Such endless loops can be interrupted within Houdini, but can result in renders that never finish.

If you know that the contents of the While operator would be executed at least once, it is easiest to use a Constant operator with an integer value set to 1 as the Condition Value input. Then within the While operator, set up the real comparisons and conditions that will lead to exiting the loop. If the While operator code may need to be skipped over entirely, there may be some duplication of operators inside and outside the While operator.

Any value that you wish to modify inside the While operator must be provided as an input. The outputs of the While operator will contain the modified versions of the inputs once the loop exits. The actual values wired into the While operator 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 While operator.

Parameters

Condition

Specifies the condition that must be met by the first input for the contained code to be executed. Either the input value must be False (equal to 0) or True (not equal to zero).

Inputs

Condition Value

This integer input must be connected. The value connected to this input is compared to the requirements of the Condition parameter. Usually this input will be connected to the output of a Compare operator, or one of the logical operators (And and Or).

Next

Up to 64 inputs can be connected here.

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.

Examples

The following examples include this node.

FirePit Example for Material shader node

Note

No geometry is animated in this file. All animation is achieved by animating the textures

Flames are grids so that UV textures can easily be applied, they are then warped around a metaball using a magnet SOP. The flames are then assigned to either a yellow or blue Flames texture. The Flames' opacity mask wrap is set to Decal to prevent the texture from repeating and showing a single pixel ring at the top of the flame geometry. I'm also using a mask file named flameOpacMap.jpg to enhance the flames' shape at the top. The noise offset has been animated over $T with an greater emphasis on the Y axis so that the flames look like they are rising. This is the same reason the Noise jitter is larger for the Y axis as well.

The coals are spheres that have been copy stamped onto a deformed grid. Using Attribute Create surface nodes I am able to override and copy stamp the lava texture’s parameters at the SOP level so that local variables, such as $BBY, can be used to animate the texture. This way the texture’s crust and its crust values can be used only to form the tops of the coals. This reserves the lava aspect of the texture to be used on the bottoms of the coals. The lava intensity (Kd attribute) is then stamped and animated to create the look of embers on the bottom of coals glowing.

SimpleMetaImport Example for Meta-Loop Import VOP node

This example demostrates how to use the Meta-Loop Start, Meta-Loop Next and Meta-Loop Import VOPs.

It calculates the sum of the densities of all metaballs in some input geometry, and uses that total to create an image in a Composite Network.

PointCloudIterateAverage Example for Point Cloud Iterate VOP node

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.

PointCloudLookup Example for Point Cloud Iterate VOP node

This example shows how to accomplish point cloud lookups for volumes using pcfilter and pciterate. It demonstrates how to iterate over and import values returned by a query.

See also

VOP nodes