Справка Houdini на русском Nodes VOP nodes

Switch VOP node

Switches between network branches based on the value of an input.

On this page

This node’s first input is an integer that specifies which input to pass through to the node’s output. The numbering starts at 0, even though the input labels start at input1 (for example, if the value of the first input is 0, the node will output the value of input1).

The inputs can be of any type, but they must all be of the same type.

You can use this node in front of a Collect node to switch between shader types. When switching between shader types (in front of a Collect node), only the code for the currently selected branch is generated.

Warning

When switching between regular inputs (that is, not between output nodes and a Collect node), all inputs are evaluated (cooked). For networks with long branches feeding into a Switch, this can be very inefficient, so you should only use Switch with short branches. You can use the If subnetwork to switch between big network chunks efficiently.

Inputs

Switcher Index

This integer value selects the input value to pass through to this node’s output. The inputs are numbered starting at 0 even though the inputs are labeled starting with input1, so a value of 0 will select input1, a value of 1 will select input2, and so on.

You will usually connect this input to a Compare node, or a logic node such as the And or Or node.

Input Number N

You can connect up to 64 inputs. New inputs are added as you connect them.

Outputs

Chosen Value

This output will be of the same type as all the inputs.

Examples

The following examples include this node.

Street Crowd Example Example for Crowd Solver dynamics node

FlipColumn Example for FLIP Solver dynamics node

SpinningFlipCollision Example for FLIP Solver dynamics node

PaintedGrog Example for Fluid Object dynamics node

CurveForce Example for POP Curve Force dynamics node

RampReference

FirePit Example for Material shader node

StyleDisplacement Example for Material shader node

RandomMaterial Example for Attribute String Edit geometry node

FurTextureMap Example for Fur geometry node

AlphaOmega Example for Points from Volume geometry node

UnpackWithStyle Example for Unpack geometry node

pscaleVOPSOP Example for Add Attribute VOP node

GroupPainted Example for Add Point to Group VOP node

RampParameter Example for Parameter VOP node

parameterVOP Example for Parameter VOP node

See also

VOP nodes