|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.
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).
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).
Up to 64 inputs can be connected here.