|On this page|
This node behaves in the same way as the Attribute Wrangle, except it has a Rig tab in its parameters. The Rig tab exposes a custom viewport state and parameters to automatically recompute the point transforms for the inputs and output. This node corresponds to the Rig Attribute VOP SOP, but uses a textual VEX snippet instead of a VOP network.
This is a very powerful, low-level node that allows VEX experts to tweak attributes using code.
This node runs the VEX snippet on the detail or every point/primitive/vertex (depending on the Class parameter) in the input geometry. The snippet can edit the input geometry by changing attributes. It can also access information from other geometry using attributes and VEX functions.
MMB-click on the node to see any error messages from the snippet.
You can use the VEX function
chto evaluate parameters. The path is relative to this node and
ch("parm")will evaluate the parameter
parmon this node. This evaluation will be done at the current time.
Unlike the Attribute Create SOP node, this node does not use local variables. Also, all back-tick expressions and
$Fvariables will be evaluated at frame 1, not the current time. Please use
Specifies a subset of points for the input geometry to run the program on. Leave this parameter field blank to affect all points in the input.
Specifies what the group is made of.
Apply the VEX code to each component of this type (points, primitives/faces, or vertices. Or choose Detail to run the code only once. For each component, the code runs with attributes bound to variables starting with
@ (for example
@Cd) for reading and writing.
If you choose
Numbers, Houdini runs the code for certain number of iterations instead of over components. In this mode the code only has read-only detail-level attributes bound to
When Run Over is Numbers, the number of iterations to run the code. In each iteration,
@numelem is bound to this total count, and
@elemnum is bound to the iteration number, from
@numelem - 1.
In this mode the code only has read-only detail-level attributes bound to
Thread Job Size
When Run Over is Numbers, this is the number of iterations to run per separate thread. If this number is greater than or equal the Number count, all iterations will run serially in a single thread. If this is
1, each iteration will run in a separate thread. In between, the node will group the iterations into batches of this size, and run each batch in parallel on separate threads.
A snippet of VEX code that will manipulate the point attributes.
You can use
@variable_name syntax to access geometry attributes.
Attributes to Create
Specifies a list of allowed names. Attributes are only created if their names match this pattern. The default
* pattern allows any attribute to be created. Bound attributes, such as
vtxnum, cannot be created and will be ignored.
Requires that you declare
@ bindings in snippets as prototypes before using them. This applies to both attributes (for example
@Cd) and “convenience” bindings such as
@Frame. For example:
// Declare bindings int @ptnum; float @Frame; vector @Cd; // Use bindings after declaration int pointnum = @ptnum; float red = @Cd / @Frame;
Automatic binding with the
@ syntax can be convenient, but as your scene becomes more complex there is the risk that a typo in an
@ binding will silently just bind a non-existent attribute.
Autobind by Name
When on, attributes are automatically bound to parameters by name. If for some reason you need CVEX parameters to have different names than the corresponding attributes, turn off this parameter and use the Number of Bindings multiparm to set up mappings between Attribute Name and VEX Parameter.
Number of Bindings
Multiparm that lets you manually specify the bindings of each name by setting up mappings between Attribute Name and VEX Parameter. Integer attributes will bind to integer parameters. Float attributes will bind to float, vector, point, matrix, or matrix4 depending on their tuple size. String attributes will bind to strings.
Name of the attribute to bind to the specified VEX Parameter.
Name of the parameter to bind to the specified Attribute Name.
Autobind Groups by Name
When on, automatically binds any groups to the integer parameter prefixed with
group_. If for some reason you need CVEX parameters to have different names than the corresponding groups, turn this off and use the Group Bindings multiparm to set up mappings between Group Name and VEX Parameter.
Multiparm that lets you manually specify the bindings of each group by setting up the mappings between Group Name and VEX Parameter.
Name of the group to bind to the specified VEX Parameter.
Name of the parameter to bind to the specified Group Name.
Evaluation Node Path
VEX functions like
ch() usually evaluate with respect to this node. This parameter lets you specify a node path to override where the path search starts from. This is useful for embedding in a digital asset, where you want searches to start from the asset root.
When a VEX parameter is exported, the bound attribute will be created if one doesn’t exist. This parameter lets you specify a pattern that can be used to override the export option on the VEX shader to avoid writing to or creating certain attributes. When the pattern matches the VEX parameter, not the bound attribute, the attribute will still be bound for reading.
Update Normals If Displaced
If points are being run over and the
P attribute is written to, but the
N attribute is not written to, then any incoming normals will become out-of-date. When this parameter is on, vertex and point normals will be updated when this occurs.
Attribute To Match
Specifies the attribute to use for matching. This attribute must be present on both inputs for matching to occur. Otherwise, matching is done by element number (for example, point number when running over points). The attribute should be either an integer or string attribute. This controls how the
opinput#_ virtual bindings connect. For example, you can use
v@opinput1_Cd to read the second input’s
Compute Results In Place
When on, the Rig Attribute Wrangle node is able to work on the incoming geometry in place without making a copy of it. This can speed up processing as one less copy is made, but requires that the VEX code doesn’t bind for writing any attributes that are read from the first input.
Output Selection Group
Specifies the name of a group to use as the output selection. When the Highlight flag is enabled for the Rig Attribute Wrangle node, this group will be the output selection used by downstream modeling tools (if they exist).
VEX can evaluate at 32-bit or 64-bit precision. 64-bit provides higher accuracy, especially for transforms.
Incoming attributes will preserve their original precision, so using 64-bit VEX on 32-bit positions will convert them to 64-bit, apply the operation, then convert back to 32-bit when writing out.
The auto mode will switch between 32-bit and 64-bit depending on the preferred precision of the incoming geometry. When run in 64-bit precision, any created attributes will be 64-bit. When run in 32-bit any created attributes will be 32-bit. Use Attribute Cast to change the preferred precision.
Specifies a string pointing to a valid viewport state name.
Compute Transforms for Output
When on, computes the transforms for the output. Gives you the same behavior as adding a Compute Transform SOP node after the output.
Compute Transforms for Input 1
When on, computes the transforms for Input 1. Gives you the same behavior as adding a Compute Transform SOP before the input.
Compute Transforms for Input 2
When on, computes the transforms for Input 2. Gives you the same behavior as adding a Compute Transform SOP before the input.
Compute Transforms for Input 3
When on, computes the transforms for Input 3. Gives you the same behavior as adding a Compute Transform SOP before the input.
Compute Transforms for Input 4
When on, computes the transforms for Input 4. Gives you the same behavior as adding a Compute Transform SOP before the input.