ForEach surface node

Repeatedly applies a set of SOPs to the input geometry.

All Parameters Inputs Example files

See also: Each

This operator has two main functions:

These effects are achieved with the help of the Each SOP which will handle the culling of the geometry or the acquiring of the feedback geometry. Add new SOPs after the Each SOP inside the subnet.

Note

It is possible to use multiple Each SOPs, or even avoid the Each SOP entirely and use the stamp expression, to achieve more complicated effects.

The ForEach SOP in all cases works with Primitive Groups or Primitive Attributes. Other groups or attributes should first be promoted to Primitive before they can be used. Alternatively, the For Each Number may be used manually performing the For Each Group or For Each Attribute behavior.

Parameters

For

Each Group

Determines all primitive groups that match the group mask found in the input geometry. Runs the contained SOPs once for each group with the stamp set to the name of the group.

Each Attribute Value

For the given primitive attribute, determines how many unique values it has in the input geometry. Runs the contained SOPs for each unique attribute value with the stamp set to the value of the attribute. The Tolerance is used to determine what is considered unique.

Each Number

Runs the contained SOPs once for each number in the given number range. If the number range is invalid, runs a zero number of times.

Stamp Name

In each iteration of the For Each SOP, the current value of the iteration will be stamped to this variable. If it is an attribute with vector value, stampnames suffixed with 1, 2, and 3 will be created for the components of the vector. (With default values, this corresponds to FORVALUE1, FORVALUE2, and FORVALUE3) You can use the stamp() expression to get at the value inside the ForEach sop. If it has string value, such as a group value or string attribute value, you can use stamps() to get the value.

Group Mask

Any groups that match this pattern in the input geometry will be iterated over in the For Each Group mode. The use of wildcards like “*“ and ”?“ is allowed.

Attribute

The name of the primitive attribute to examine for unique values when using For Each Attribute Value.

Tolerance

The amount the attribute is allowed to differ but still be considered identical for the purpose of finding unique attributes. This allows small errors in an attribute value from triggering unique passes.

Number Range

Specifies the start, end, and increment for processing by each number. The processing is done from the start value up to and including the end value. Each iteration the value increases by the increment. Negative increments are allowed, but in this case the end value has to be below the start value.

Max Iterations

Prevents the For Each sop from executing more than the proscribed number of iterations. This is useful as a sanity test for dealing with problematic geometry and as a method of debugging to find out which iteration started to fail.

Merge Results

Determines if the output of each round of iteration should be merged together. If not set, only the final round of iteration is used. When doing a For Each Group one will often want to use the Merge Results to collate the separate iterations together. However, if doing a feedback based system, this should be turned off as only the final result is desired.

Inputs

Input to Detect Groups/Attributes From

When in For Each Group or For Each Attribute mode, the first input is cooked to determine the matching groups or possible attribute values.

Auxiliary Input

Auxiliary inputs are available to bring additional geometry inside the scope of the For Each SOP.

Example files

cheese

$HFS/houdini/help/examples/nodes/sop/foreach/cheese.otl

Load | Launch

This example shows how to use the For Each SOP to individually boolean a bunch of self intersecting spheres with a cheese wedge.

cutup

$HFS/houdini/help/examples/nodes/sop/foreach/cutup.otl

Load | Launch

This example shows how to use the foreach sop to intersect one object with each part of another object and merge the results together.

Usages in other examples

Example name Example for

Dynamics channel node

Load | Launch

Lookup channel node

Load | Launch

Fur surface node

Load | Launch

Cloth Create Seam surface node

Load | Launch

Dop Import surface node

Load | Launch

Multiple Solver dynamics node

Load | Launch

Field Force dynamics node

Load | Launch

Field Force dynamics node

Load | Launch

RBD Point Object dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Blend Solver dynamics node

Load | Launch

Wire Solver dynamics node

Load | Launch

Wire Solver dynamics node

Load | Launch

Wire Solver dynamics node

Load | Launch

Drag Force dynamics node

Load | Launch

Copy Objects dynamics node

Load | Launch

Copy Objects dynamics node

Load | Launch

Affector dynamics node

Load | Launch

RBD Angular Spring Constraint dynamics node

Load | Launch

RBD Angular Spring Constraint dynamics node

Load | Launch

Wind Force dynamics node

Load | Launch

RBD Visualization dynamics node

Load | Launch

Particle Fluid Emitter dynamics node

Load | Launch

Particle Fluid Emitter dynamics node

Load | Launch

RBD Keyframe Active dynamics node

Load | Launch

Wire Glue Constraint dynamics node

Load | Launch

RBD Solver dynamics node

Load | Launch

RBD Solver dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

RBD Hinge Constraint dynamics node

Load | Launch

SOP Solver dynamics node

Load | Launch

SOP Solver dynamics node

Load | Launch

Particle Fluid Solver dynamics node

Load | Launch

Particle Fluid Solver dynamics node

Load | Launch

Particle Fluid Solver dynamics node

Load | Launch

Particle Fluid Solver dynamics node

Load | Launch

Particle Fluid Solver dynamics node

Load | Launch

Particle Fluid Solver dynamics node

Load | Launch

Buoyancy Force dynamics node

Load | Launch

POP Solver dynamics node

Load | Launch

Load | Launch

Particle Fluid Sink dynamics node

Load | Launch

Particle Fluid Sink dynamics node

Load | Launch

Cloth Solver dynamics node

Load | Launch

Cloth Solver dynamics node

Load | Launch

Cloth Solver dynamics node

Load | Launch

RBD Object dynamics node

Load | Launch

RBD Object dynamics node

Load | Launch

Particle Fluid Object dynamics node

Load | Launch

Particle Fluid Object dynamics node

Load | Launch

Particle Fluid Object dynamics node

Load | Launch

Particle Fluid Object dynamics node

Load | Launch

Particle Fluid Object dynamics node

Load | Launch

RBD Spring Constraint dynamics node

Load | Launch

RBD Glue Object dynamics node

Load | Launch

RBD Glue Object dynamics node

Load | Launch

RBD Glue Object dynamics node

Load | Launch

RBD Glue Object dynamics node

Load | Launch

File dynamics node

Load | Launch

Active Value dynamics node

Load | Launch

Active Value dynamics node

Load | Launch

RBD Pin Constraint dynamics node

Load | Launch

RBD Pin Constraint dynamics node

Load | Launch

Anchor: Align Axis dynamics node

Load | Launch

Reference Frame Force dynamics node

Load | Launch

Mask Field dynamics node

Load | Launch

Script Solver dynamics node

Load | Launch

Script Solver dynamics node

Load | Launch