On this page |
Overview ¶
Often, you want to base the values of one node’s parameters on the values of another node’s parameters. Alternatively, you need the same node with the same or similar settings in two places in a network.
You can copy and paste parameter values and nodes, but it’s tedious and error-prone to remember to update all the copies when you change something. It’s also impractical to copy and paste an animated value across all frames.
Channel references let you compute the value of one parameter based on the value of another parameter, possibly on a different node. This lets you duplicate values, or make values relative to other values, and have Houdini automatically update them whenever they change.
Reference node copies create a duplicate of a node where every parameter on the node is channel referenced to the corresponding parameter on the original. You can unlink individual parameters to customize the copy. This lets you re-use the same node in multiple places, and have Houdini automatically update them.
Tip
Houdini will automatically update all references to a node if you rename it.
Copying and pasting references ¶
To... | Do this |
---|---|
Link one parameter to another |
Tip For parameters with multiple components (for example, a position parameter with X, Y, and Z values) you can click individual component text boxes, or click the parameter label to affect all components at once. |
Make the value of one parameter relative to another |
For example, to make one object |
Unlink a linked parameter |
Right-click the destination parameter and choose Delete channels. |
Create a reference copy of a node |
Right click the node you want to copy and choose Actions ▸ Create reference copy. Houdini creates a copy of the node where every parameter is linked to the corresponding parameter on the original. To change individual parameters on the copy, first unlink them (see above). |
Referencing parameter values ¶
This is similar to copying and pasting references (above), but lets you choose the data to reference from a chooser instead of first navigate to and copying from the other node.
To... | Do this |
---|---|
Create a reference to another parameter |
This feature builds a ch expression for you that references the parameter on the other node. Tip For parameters with multiple components (for example, a position parameter with X, Y, and Z values) you can click individual component text boxes, or click the parameter label to affect all components at once. |
Referencing transforms ¶
Referencing an object node’s Translate, Rotate, and/or Scale parameters gives you that node’s local transform. Getting the world transform can be much trickier when writing an expression by hand. Use the reference menu to easily reference transforms without having to manually write the expressions.
To... | Do this |
---|---|
Create a reference to an object node’s transform |
This feature builds an expression for you that references the transformation of the other node and converts the coordinate space if necessary. These expressions can be quite complex for World transforms, involving multiple expression statements in a block. You can open an expression in a multi-line editor by right-clicking the text box and choosing Expression ▸ Edit Expression. |
Referencing bounding boxes ¶
You can reference the property of a geometry node’s bounding box such as the size and minimum and maximum boundaries.
To... | Do this |
---|---|
Create a reference to a geometry node’s bounding box |
This feature builds an expression for you that references the bounding box property of the other node. |
Referencing attribute values ¶
You can reference the value of an attribute on a point, primitive, or global in the geometry held by a geometry node.
As you may know, in a geometry node, you can use @‹attrname›
as a shorthand to reference an attribute on the point/primitive/global currently being processed. However, this reference function has no concept of geometry “being processed”, but rather references data in finished geometry cached on a node. That means you must specify a point or primitive (or global) to read the attribute value from.
To... | Do this |
---|---|
Create a reference to another parameter |
This feature builds a point, /network/prim.html, or vertex expression for you that references the attribute on the specified geometry. Tip For parameters with multiple components (for example, a position parameter with X, Y, and Z values) you can click individual component text boxes, or click the parameter label to affect all components at once. |
Referencing local variables ¶
Many nodes have local variables you can use in expressions to reference information from the node as it cooks. There are also “local variables” that represent global state such as the current integer frame ($F
), the current fractional frame ($FF
), the current time ($T
), the start frame and end frame ($FSTART
and $FEND
), and so on.
Usually it’s faster to just type the variable directly, but using the reference menu can be convenient if you've forgotten the name of a variable or aren’t sure what variables are available.
You can use the reference menu to create a local variable reference, instead of just typing the variable manually. This may be useful if you've forgotten the name of the local variable, since you can choose it from a list.
To... | Do this |
---|---|
Create a reference to a local variable |
|