Houdini 20.5 Digital assets

Edit an asset’s user interface

On this page

Overview

Once you create a digital asset, you can use the Type properties window to edit the new node’s parameter interface. You can promote parameters from the node inside the asset up to the asset’s user interface. You can also add render properties to object assets for control over how they're rendered.

Right click an instance of the asset and choose Type properties, the click the Parameters tab.

As you edit the asset’s interface, remember that you need to click Apply or Accept in the type properties window to see the changes on the node.

Create and promote parameters

To...Do this

Promote a parameter

In the network editor, dive inside the asset and select the node with the parameter you want to promote. Find the parameter in the parameter editor pane. Then do one of the following:

  • Drag the parameter from a parameter editor into the parameter list of the type properties window.

    For parameters with multiple components (such as an X,Y,Z position parameter or an R,G,B color parameter), you can promote all components by dragging the parameter label, or a single component by dragging the component’s text box.

Or
  • Right-click parameter and choose Export Parameter to Type Properties.

Promote all parameters of a node

In the network editor, dive inside the asset and select the node with the parameter you want to promote. Then drag the node into the parameter list of the type properties window.

If you drag a nested digital asset into the list, Houdini will promote the parameters from the nested asset with their organization intact.

Promote hidden or un-draggable parameters

In the type properties window, on the Parameters tab, click the From nodes subtab under Create parameters. This shows a tree view of every parameter on every node in the entire scene. Use it to find the node and parameter you want and drag it into the parameter list under Existing parameters.

Create a new parameter from scratch

In the type properties window, on the Parameters tab, click the By type subtab under Create parameters. Drag the type of parameter you want to create into the parameter list under Existing parameters.

You can channel reference the value of the parameter on nodes inside the asset, or use it in scripts.

Make a menu parameter

  1. Create/promote an integer, string, file, or node path parameter.

  2. Select the parameter under Existing parameters.

  3. Under Parameter description, click the Menu sub-tab.

  4. Turn on Use menu, then choose a menu type from the popup menu next to it.

  5. Click Menu items to set up a static list of value/label pairs, or click Menu script to write a script to generate the pairs dynamically. See the help for the menu tab for more information.

You can channel reference the value of the parameter on nodes inside the asset, or use it in scripts.

Organize parameters

To...Do this

Organize parameters into groups

  1. In the type properties window, on the Parameters tab, click the By type subtab under Create parameters.

  2. Drag a Folder into the parameter list under Existing parameters.

  3. With the folder selected, the controls under Parameter description let you edit its type, label, and so on. The Type lets you present folders as tabs, collapsible headings, boxed groupings, and other looks.

  4. Drag existing parameters into the new folder.

You can also drag a Separator into the parameter list to create a separator line between groups of parameters.

Put consecutive parameters side-by-side to save space

  1. Select the first parameter and turn on Horizontally join to next parameter.

  2. If you want to hide the label on a “side” parameter, turn off the checkbox next to the Label option for that parameter.

Set up the asset for animation

To...Do this

Set a parameter to auto-add to the channel list

  1. Select the parameter under Existing parameters.

  2. In the options under Parameter description, click the Channels sub-tab.

  3. Turn on the Autoscope icon next to the channel(s).

Add scripted controls and behavior

To...Do this

Run a script whenever a parameter changes

In the type properties window, select the parameter under Existing parameters, then under Parameter description, on the Parameter sub-tab, enter a script in the Callback script field.

The pop-up menu to the right of the Callback script field lets you choose whether the script is HScript or Python.

See the help for the Parameters sub-tab for more information. See the HOM documentation for information on Python parameter callback scripts.

Run a script when an instance is created or destroyed

See the HOM documentation for Python event handlers.

Handles and HUD sliders

You can also promote handles and HUD sliders from nodes inside the asset, so they appear in the viewport when the asset is selected. The type properties window must be open.

If you want a handle to drive parameters on nodes inside the asset, you must first promote the parameters onto the asset, then you can bind them to a handle.

Note

Handles and HUD sliders only appear when you are using the Handles tool, unless you right-click them and turn on “Persistent”.

To...Do this

Promote handles or HUD sliders from inside the asset

  1. Dive inside the asset and select the node with the handle/slider you want to promote. Make the handle visible in the viewport.

    For HUD sliders, make sure their position and settings are what you want for the asset before promoting them.

  2. Right-click the handle or slider and choose Export handle to digital asset.

  3. Click Apply or Accept in the type properties window.

You may need to deselect and reselect the node for the handle/slider to show up.

Create a handle for parameters on your asset

  1. In the type properties window, click the Handles tab.

  2. Click Create handle and choose the type of handle.

  3. On the right under Bindings, you can choose which parameters will be modified when the user drags different parts of the handle. Click the drop down menu next to a binding field to choose from all the parameters on the asset.

Specifying files inside an asset using opdef:

You can embed files inside the digital asset, using the Extra files tab in the Type properties window.

In parameters where you can specify a file path, you can use the following syntax to instead specify the content of a section inside an asset:

opdef:/‹Network_type›/‹asset_name›?‹section_name

You can use this to include all the files an asset needs (such as textures) in the asset itself.

For example:

opdef:/Object/my_asset?Texture.png

You can also use opdef:.?‹section (to get a file from the current asset) and opdef:..?‹section (to get a file from the parent of the current node). For example, if you have a File node directly inside an asset, you can load a geometry file from the asset using:

opdef:..?test.bgeo

Note that relative opdef: may not work in all places. For example, in a shader you can say texture("opdef:/Shop/foo/texture.rat") but you can’t use opdef:.. because the compiled VEX has no concept of a parent node.

Tip

You can interactively choose embedded files from inside assets using the Houdini file chooser. Click the opdef: root on the left side of the chooser window.

Custom labels for multiparm instances

Parameter interfaces can have multiparms, which are special folders where the parameters inside act as a template for “items” the user can create. For example, the designer could create a “Mappings” multiparm in the node template with two parameters inside: “Source” and “Destination”. On instances of the node, the user can use the parameter interface to create multiple items in the “Mappings” multiparm, each with its own “Source” and “Destination” parameter.

Normally, the label for each parameter is taken from the template, and can’t be changed by scripting. However, there may be times where it might make sense for each instance of a parameter in different multiparm items to have a different label.

There is a somewhat convoluted and imperfect workaround to do this:

  • Houdini allows you to give a parameter an alias, which is used instead of the parameter’s internal name in the animation curve editor. You can set the alias in a script using hou.Parm.setAlias.

  • If a parameter label contains the magic string %s, Houdini replaces it with the parameter’s alias when it displays the label in the UI.

Not only does this change the label, it can also be useful to reference the parameter value using its alias in expressions (for example torso instead of bone2) and in the animation curve editor. However, because the alias has to obey parameter naming rules, the “custom label” cannot have spaces or punctuation.

You can see an example of this technique is used in the Blend Shapes surface node (where clicking the Update Channel Names from Inputs button runs a script that sets the aliases of multiparm instances), and in the Merge Packed surface node.

Digital assets

Getting started

Creating assets

Next steps