Houdini 21.0 Networks and parameters

Saving and using recipes

How to save parameter settings and groups of nodes so you can recreate them as needed.

On this page

Overview

Houdini lets you save a set of parameter values, or a set of network items (nodes, dots, sticky notes, boxes), as a named recipe. You can then apply those parameter values, or recreate those nodes, whenever you want.

You can create four types of recipes: parameter presets, node presets, decorations, and tools.

Each recipe is created as a Data Node Type Category. When saved, Houdini stores the recipe under a digital asset library file with an .hda extension. This lets you save recipes alongside your digital asset, so when you install a digital asset library file you also install any recipes it contains.

Tip

After you update Houdini, you can copy previous recipe.hda files into the new Houdini version’s otls directory if no recipe.hda file exists yet. If a recipe.hda file already exists in the otls directory, the old file you copy over replaces the existing file.

You can create recipes directly from existing nodes in the network editor or create a Recipe Builder that saves its contents as a recipe.

Saving parameter presets

A parameter preset saves the value of a single parameter as a recipe. This may be useful to store a large or complicated set of multiparm instances and then apply them to various parameters.

To...Do this

Create a parameter preset

  1. Set up the parameter value you want to save.

  2. In the parameter editor, the parameter label and choose Recipes ▸ Save Parameter Preset.

  3. Enter a Preset Title.

  4. Use the Parm Type Pattern, Parm Name Pattern, and Node Type Pattern to set which parameters the recipe appears on. The recipe only appears for parameters where all checked patterns match.

    For example, to have the recipe appear for any parameter where the parameter’s internal name ends with seed, turn Node Type Pattern and Parm Type Pattern off and set Parm Name Pattern to *seed.

    See Patterns for more information.

  5. (Optional) In the Scripts tab, turn on Before Data Applied or After Data Applied to store Python scripts that run before or after you create the recipe. See Scripting recipes for more information.

  6. The default for the Save to menu (User Preferences) saves all recipes into an asset library in your user preferences directory, which is usually all you need. However, if you want to embed the recipe in an existing asset, or if you are working on a recipe to be shared (such as in a large studio), you can change where you save the preset and its internal name. You can edit the Internal Name as an advanced option.

    User Preferences

    Saves the recipe asset into $HOUDINI_USER_PREF_DIR/otls/Recipes.hda.

    Store In Same Library as ‹name

    Saves the recipe into the same asset library as the source node type. This option is not available for “factory” node types installed with Houdini.

    $HIP/otls Directory

    Saves the asset into an otls subdirectory in the same directory the current scene file.

    $JOB/otls Directory

    Saves the asset into an otls subdirectory in the path set in the $JOB environment variable.

    Embed in Current HIP File

    Embeds the asset as part of the current scene file. This is sometimes useful for sharing a self-contained, working scene file. Note that this can bloat the size of the scene file.

    Custom File Path

    Choose this option, then enter the path to the asset library you want to save to in the field next to the pop-up menu, or click the file chooser icon to choose the file to save to from a file dialog.

    Tip

    After you update Houdini, you can copy previous recipe.hda files into the new Houdini version’s otls directory if no recipe.hda file exists yet. If a recipe.hda file already exists in the otls directory, the old file you copy over replaces the existing file.

  7. Click Save.

Create a recipe that appends multiparm instances instead of replacing them

  1. Set up the multiparm contents you want to save.

  2. In the parameter editor, the multiparm parent (the row controlling how many instances are in the multiparm) and choose Recipes ▸ Save Parameter Preset.

  3. Enter a Preset Title.

  4. In the Data tab, set Multiparm Operations to Append.

  5. Click Save.

Apply a parameter preset

In the parameter editor, a parameter and click the Recipes submenu. Choose the recipe to apply.

Saving node presets

You can save a set of parameter values and even spare parameters on a node as a recipe, and then apply those saved parameter values to other nodes. You can then apply the preset to an existing node when you want to set those values all at once.

You can also optionally save the contents of a node as part of the recipe. This might be useful, for example, to save the dive target contents of a Pyro Solver SOP so that applying the recipe sets certain parameters on a node and also fills in the DOP network.

Note

This type of recipe is for changing the parameter values and possibly the contents of an existing node. If you just want a way to put down a certain type of node with certain parameter values and contents, use a tool recipe instead (see below).

When you save spare parameters as part of a preset, applying the preset will create those spare parameters on the target node if they don’t already exist.

To...Do this

Save parameter values as a preset

  1. In the parameter editor, set up the parameters you want to save.

  2. In the parameter editor, click the Recipe menu and choose Save Node Preset.

    or

    In the network editor, right click the node and choose Recipes ▸ Save Node Preset.

  3. In the dialog, use the checkboxes to choose which parameters you want to capture in the preset.

    The dialog starts with checks on all parameters that are not at their default values, and all spare parameters.

    • For some node types, parameters may be shown as “off default” and checked by default even though they are the original values the node starts with. For example, for uninteresting historical reasons in the Sphere surface node creation script changes the Primitive Type from its actual default to Polygon Mesh, so it always starts “off default”. This is unfortunate but you can just turn off their checkmarks if you don’t want to save them as part of the preset.

    • Because spare parameters are checked by default, and the Mantra render properties on object nodes are technically spare parameters, if save a preset on an Object node, it starts with all the render properties checked. You can uncheck the Render folder to uncheck all its children, and then re-check any parameters you actually want to save.

  4. By default, the preset includes keyframe animation and expressions on the selected parameters. To save just the current values instead, uncheck Capture Keyframes and Expressions.

  5. In the Preset Options section, enter a Preset Title.

  6. Use the Show for pop up menu to choose which node types can have the preset applied to them. The default is to only show the preset for the source node type. You can choose to show the preset for all nodes of the current node type category, or all node types that match a pattern. See Patterns for more information.

  7. The default for the Save to menu (User Preferences) saves all recipes into an asset library in your user preferences directory, which is usually all you need. However, if you want to embed the recipe in an existing asset, or if you are working on a recipe to be shared (such as in a large studio), you can change where you save the preset and its internal name. You can edit the Internal Name as an advanced option.

    User Preferences

    Saves the recipe asset into $HOUDINI_USER_PREF_DIR/otls/Recipes.hda.

    Store In Same Library as ‹name

    Saves the recipe into the same asset library as the source node type. This option is not available for “factory” node types installed with Houdini.

    $HIP/otls Directory

    Saves the asset into an otls subdirectory in the same directory the current scene file.

    $JOB/otls Directory

    Saves the asset into an otls subdirectory in the path set in the $JOB environment variable.

    Embed in Current HIP File

    Embeds the asset as part of the current scene file. This is sometimes useful for sharing a self-contained, working scene file. Note that this can bloat the size of the scene file.

    Custom File Path

    Choose this option, then enter the path to the asset library you want to save to in the field next to the pop-up menu, or click the file chooser icon to choose the file to save to from a file dialog.

    Tip

    After you update Houdini, you can copy previous recipe.hda files into the new Houdini version’s otls directory if no recipe.hda file exists yet. If a recipe.hda file already exists in the otls directory, the old file you copy over replaces the existing file.

Tip

If you edit the parameters in the parameter editor pane, you can click Reload Values to update the dialog with the new values.

Apply a parameter preset to a node

  • Select the node, then in the parameter editor, click the recipes menu and choose the preset you want to apply.

    or

  • In the network editor, right click a node, open the Recipes submenu and choose the preset you want to apply to the node.

Edit an existing parameter preset

  1. In the main menus, choose Windows ▸ Recipe Manager.

  2. Select the recipe you want to edit and click Edit.

    Houdini creates an instance of the original node type you captured the parameters from, applies the preset to it, and opens the preset editor on it. You can then edit the parameter values, or change the settings in the dialog (such as the preset title).

  3. Click Save to save the preset with the new values.

See how to edit a preset below.

Saving decoration recipes

A decoration is similar to a tool recipe, but you designate one node in the recipe as the “central” node. The central node is like a placeholder for the node the user applies the decoration to. When you apply the decoration to a “target” node in the network, Houdini does the following:

  • Applies any parameters the recipe author saved on the central node.

  • Creates the other nodes in the recipe around the target nodes.

  • Rewires connections on the target node into the appropriate nodes in the new node setup, as set by the recipe author.

For example, if you usually append nodes to sharpen the volume after a Pyro solver, you could create a tool recipe that puts down a pre-made set up of a Pyro solver plus the sharpening nodes, or you could create a decoration recipe that adds the sharpening nodes to an existing Pyro solver. Or, you could even create both, to allow you to create new setups using the tool, and add to existing setups using the decoration.

To...Do this

Save a node setup as a decoration

  1. Select the node or nodes you want to turn into a decoration.

  2. Right-click one of selected nodes and choose Recipes ▸ Save Selected Items as Decoration.

    The node you right-click becomes the “central” node of the recipe. The central node represents the node the recipe will be applied to. You can edit which node is “central” in the dialog, but it’s convenient to be able to indicate it by which node you right-click.

  3. You can choose the submenu in which the tool will appear in the tab menu. Choose an existing submenu using the drop down menu to the right of the Tab submenu field, or type a new name into the field to create a new submenu.

    You can have the tool appear in multiple submenus by entering multiple menu labels separated by commas. For example, File IO, Recipes will make the tool appear in both the File IO and Recipes submenus of the tab menu.

  4. Make sure the correct node is marked as the “central” node.

    • The current central node has a yellow outline in the schematic view in the recipe dialog.

    • To change the central node, click the node in the schematic view and choose Set as Central Node, or choose the node from the Central Node popup menu.

  5. The recipe saves all (non-default and spare) parameter values on the non-central nodes it will recreate. You can choose whether to save parameter values on the central node, and re-apply them to the target node when the decoration is applied. This can be useful to set parameter values on the target node needed by the decoration nodes created around it, such as channel references.

    • By default, Capture Parameters on the Central Node is on. You can turn it off if you don’t want to save parameters on the central node.

    • You can choose which parameters on the central node are captured using the parameter view in the right pane.

  6. When the user applies your decoration to a node, Houdini will rewire any existing connections on the target node. You can set which nodes in the recipe should be used as the “input” and “output” when this happens.

  7. In the Recipe Options section, enter a Recipe Title.

  8. Use the Show for pop up menu to choose which node types can have the decoration applied to them. The default is to only show the decoration for the central node type. You can choose to show the preset for all nodes of the current node type category, or all node types that match a pattern. See Patterns for more information.

  9. The default for the Save to menu (User Preferences) saves all recipes into an asset library in your user preferences directory, which is usually all you need. However, if you want to embed the recipe in an existing asset, or if you are working on a recipe to be shared (such as in a large studio), you can change where you save the preset and its internal name. You can edit the Internal Name as an advanced option.

    User Preferences

    Saves the recipe asset into $HOUDINI_USER_PREF_DIR/otls/Recipes.hda.

    Store In Same Library as ‹name

    Saves the recipe into the same asset library as the source node type. This option is not available for “factory” node types installed with Houdini.

    $HIP/otls Directory

    Saves the asset into an otls subdirectory in the same directory the current scene file.

    $JOB/otls Directory

    Saves the asset into an otls subdirectory in the path set in the $JOB environment variable.

    Embed in Current HIP File

    Embeds the asset as part of the current scene file. This is sometimes useful for sharing a self-contained, working scene file. Note that this can bloat the size of the scene file.

    Custom File Path

    Choose this option, then enter the path to the asset library you want to save to in the field next to the pop-up menu, or click the file chooser icon to choose the file to save to from a file dialog.

    Tip

    After you update Houdini, you can copy previous recipe.hda files into the new Houdini version’s otls directory if no recipe.hda file exists yet. If a recipe.hda file already exists in the otls directory, the old file you copy over replaces the existing file.

  10. Click Save.

Apply a decoration to a node

In the network editor, right-click the node, open the Recipes submenu and click the decoration you want to apply.

See how to edit a decoration below.

Saving tool recipes

A tool recipe saves a node or set of nodes, including their wiring and current parameter values, as a new tool on the tab menu. You can then choose the tool from the tab menu to recreate the saved node setup.

To...Do this

Save a node or set of nodes as a tool

  1. Select the node or nodes you want to turn into a tool.

  2. Right-click one of selected nodes and choose Recipes ▸ Save Selected Items as Tool.

    The node you right-click becomes the “anchor” node of the recipe. When you “drop” the recipe into a network, the other nodes will be positioned relative to this node. You can edit which node is the “anchor” in the dialog, but it’s convenient to be able to indicate it by which node you right-click.

  3. As with a regular tab menu tool that puts down a single node, the user can choose a recipe from the tab menu and drop it on an existing wire, or start a new wire and use the tab menu choose a recipe tool to connect it to. You can set which nodes in the recipe should be used as the “input” and “output” when the user does this.

  4. You can choose the submenu in which the tool will appear in the tab menu. Choose an existing submenu using the drop down menu to the right of the Tab submenu field, or type a new name into the field to create a new submenu.

    You can have the tool appear in multiple submenus by entering multiple menu labels separated by commas. For example, File IO, Recipes will make the tool appear in both the File IO and Recipes submenus of the tab menu.

  5. You can choose an icon that will appear next to the tool name in the tab menu. This is the same as setting the icon for a digital asset: it can be a file path, an opdef: reference, or the name of a built-in Houdini icon.

  6. If the recipe has more than one node, you can use the Anchor pop-up menu to change which node is the “anchor” node (other nodes are created relative to this node when the user clicks to place the tool contents in the network editor).

  7. In the Recipe Options section, enter a Recipe Title.

  8. The default for the Save to menu (User Preferences) saves all recipes into an asset library in your user preferences directory, which is usually all you need. However, if you want to embed the recipe in an existing asset, or if you are working on a recipe to be shared (such as in a large studio), you can change where you save the preset and its internal name. You can edit the Internal Name as an advanced option.

    User Preferences

    Saves the recipe asset into $HOUDINI_USER_PREF_DIR/otls/Recipes.hda.

    Store In Same Library as ‹name

    Saves the recipe into the same asset library as the source node type. This option is not available for “factory” node types installed with Houdini.

    $HIP/otls Directory

    Saves the asset into an otls subdirectory in the same directory the current scene file.

    $JOB/otls Directory

    Saves the asset into an otls subdirectory in the path set in the $JOB environment variable.

    Embed in Current HIP File

    Embeds the asset as part of the current scene file. This is sometimes useful for sharing a self-contained, working scene file. Note that this can bloat the size of the scene file.

    Custom File Path

    Choose this option, then enter the path to the asset library you want to save to in the field next to the pop-up menu, or click the file chooser icon to choose the file to save to from a file dialog.

    Tip

    After you update Houdini, you can copy previous recipe.hda files into the new Houdini version’s otls directory if no recipe.hda file exists yet. If a recipe.hda file already exists in the otls directory, the old file you copy over replaces the existing file.

  9. Click Save.

Place the contents of a tool recipe

Placing a tool recipe works the same as other tools that create a single node, except a recipe can create multiple nodes at once.

  1. In the network editor, press ⇥ Tab and choose the recipe from the tab menu.

  2. Click to place the recipe contents.

Wire the contents of a tool into or out of a node

Starting a wire and choosing a tool recipe works the same as other tools that create a single node, except a recipe can create multiple nodes at once.

  1. In the network editor, click an input or output connector on a node to start a wire.

  2. While the new wire is attached to the mouse pointer, press ⇥ Tab and choose the recipe from the tab menu.

  3. Click to place the recipe contents. The new wire is connected to the recipe node the recipe author set as the “input” or “output” of the recipe.

See how to edit a tool below.

Patterns

For presets and decorations, you can choose which node types or parameters the recipe appears for in the recipe menu.

Node Type Pattern

  • This applies to parameter presets, node presets, and decorations. This is either the Pattern parameter (when Show for is Nodes Matching a Custom Pattern) or Node Type Pattern parameter.

  • The node type for which this recipe appears in the recipe menu. The default is for it to appear for the same node types as the original node (for presets) or the central node (for decorations).

  • The pattern uses standard Houdini pattern matching, as in the hou.text.patternMatch function. The * wildcard matches any run of characters.

  • The pattern can be a space-separated list of patterns. The recipe will show for a node type whose name matches any of the patterns in the list.

  • Houdini tries to match the pattern to a node’s internal name including category, for example acme::Sop/foobar::2.0.

  • For example, use acme::* to match all nodes in the acme namespace.

  • If you want to match multiple categories, such as any SOP or any DOP, you need to write a space-separated list of multiple patterns to match the possible cases, in this case SOP without namespace, SOP with namespace, DOP without namespace, and DOP with namespace: Sop/* *:Sop/* Dop/* *:Dop/*.

  • You don’t have to use wildcards in the pattern. If you want the recipe to only show for a specific set of node types, you can simply write the internal names of those nodes in a space-separated list.

Tip

You can edit the pattern after creating the recipe, if you find a case where the pattern doesn’t match properly.

You can also use hou.text.patternMatch and hou.Node.nameWithCategory to check whether a node would match the pattern:

>>> my_pattern = "acme::*"
>>> # Does this node match the pattern?
>>> hou.text.patternMatches(my_pattern, hou.node("/obj/geo1/my_node").type().nameWithCategory())
True

Parm Name Pattern

  • This applies to parameter presets.

  • The parameter name for which the recipe is available in the recipe menu. The default is for it to appear for the same parameter the recipe is trying to capture.

  • To match all parameters in Houdini that end with seed, set this to *seed and turn off Node Type Pattern. For example, this is useful when you want to make the recipe available for all parameters that end with seed.

Parm Type Pattern

  • This applies to parameter presets.

  • The parameter type for which the recipe is available in the recipe menu. The default is for it to appear for the same parameter type the recipe is trying to capture.

  • For example, use float integer to show the recipe for only float and integer parameters.

Tip

To check whether a parameter type would match the pattern:

>>> my_pattern = "float"
>>> # Does this node match the pattern?
>>> hou.text.patternMatches(my_pattern, hou.parmTuple('/obj/geo1/scale').parmTemplate().interfaceType())
True

Choosing where to save (advanced)

The Save to menu in recipe dialogs defaults to User Preferences. This saves all recipes into an asset library in your user preferences directory, which usually all you need. However, if you want to embed the recipe in an existing asset, or if you are working on a recipe to be shared (such as in a large studio), you can change where you save the recipe, and you can edit the recipe asset’s internal name.

For example, if you're making a tool for shared use in a studio, you may want to save it to a shared network drive, and give it an internal name using a studio-specific namespace and a version number, such as acme::vellum_cloth_tool::2.0

Save location

To...Do this

Choose where to save a recipe

In the recipe dialog, click the Save to pop-up menu and choose one of the following:

User Preferences

Saves the recipe asset into $HOUDINI_USER_PREF_DIR/otls/Recipes.hda.

Store In Same Library as ‹name

Saves the recipe into the same asset library as the source node type. This option is not available for “factory” node types installed with Houdini.

$HIP/otls Directory

Saves the asset into an otls subdirectory in the same directory the current scene file.

$JOB/otls Directory

Saves the asset into an otls subdirectory in the path set in the $JOB environment variable.

Embed in Current HIP File

Embeds the asset as part of the current scene file. This is sometimes useful for sharing a self-contained, working scene file. Note that this can bloat the size of the scene file.

Custom File Path

Choose this option, then enter the path to the asset library you want to save to in the field next to the pop-up menu, or click the file chooser icon to choose the file to save to from a file dialog.

Tip

After you update Houdini, you can copy previous recipe.hda files into the new Houdini version’s otls directory if no recipe.hda file exists yet. If a recipe.hda file already exists in the otls directory, the old file you copy over replaces the existing file.

Internal name

Each recipe asset has a default internal name designed to prevent naming conflicts. It uses the type of the node you created the asset from as the scope, your username (or the value of $HOUDINI_AUTHOR if it’s set) as the namespace, and an encoded version of the recipe title as the base name.

To...Do this

Change the internal name when you create a recipe

  1. In the recipe dialog, click Show Advanced Options.

  2. Edit the Internal name field.

Editing recipes

To...Do this

Open the recipe manager

In the main menus, choose Windows ▸ Recipe Manager.

Delete a recipe

In the recipe manager, select the recipe you want to edit and click Delete.

Rename a recipe

  1. In the recipe manager, select the recipe.

  2. Click Edit Contents.

  3. Enter a new name in Recipe Title.

  4. Click Save.

or

  1. In the recipe manager, select the recipe.

  2. Click the show panel icon in the top-right corner.

  3. Enter a new name in Title.

Hide a recipe

  1. In the recipe manager, select the recipe.

  2. Click the show panel icon in the top-right corner.

  3. In the info panel, turn Visible off.

Edit a recipe from the recipe manager

  1. In the recipe manager, select the recipe you want to edit and click Edit Contents.

    Houdini creates the recipe contents in a temporary subnetwork, selects them, and opens the recipe editor on it. You can then edit the parameter values or change the settings in the dialog (such as the title).

    To add a node to a tool or decoration recipe, create it in the temporary subnetwork, select it, and click Reload Selection in the recipe editor dialog.

    To remove a node from a tool or decoration recipe, delete it from the temporary subnetwork and click Reload Selection in the recipe editor dialog.

  2. Click Save to save the preset with the new values.

Note

If you edit recipes often, you may want to create them using a Recipe Builder since it can be faster to edit and resave.

Tip

Since recipes are stored in digital assets, you can also manage them using the Asset Manager, the Type Properties Editor, and HOM functions for manipulating node types and asset definitions.

Advanced options

You will not usually need to change these settings. To show them in the recipe dialog, click Show Advanced Options.

Recursively save node contents

If you turn this off, the tool or decoration will only have the top level nodes, it will not save the contents of subnetworks or unlocked assets.

Save Editable Dive Targets

Assets can specify subnetworks in their definitions as editable dive targets, where the user who created the asset instance can put their own nodes to affect how the asset works. Houdini normally saves the contents these subnetworks as part of the recipe. Turn off this option to ignore the contents of these subnetworks.

There are separate controls for saving editable contents of the central/anchor node, and saving them for all other nodes.

Save View Flags (at top level)

Normally, Houdini does not save view flags (output, display, render) as part of the recipe, because usually you don’t want applying a recipe to change them. Non-view flags (such as “frozen” or “bypass”) are always saved. You can turn on this option to save view flags as part of the recipe.

Only Save Nodes

Normally Houdini saves sticky notes, network boxes, and dots, as part of the recipe. If you turn on this option, the recipe will only save nodes, ignoring other types of network objects.

Last invoked recipe

Houdini keeps a record of the last invoked recipe each time you apply a Parameter preset and Node preset recipe to a node. When you save a recipe with a submenu, the Recipe menu displays the last invoked recipe’s name alongside the submenu entry.

You can also display the last invoked recipe in a custom preset menu. See the create preset menu example for more information.

Recipe builder

Another method of generating recipes is to use a Recipe Builder, which automates the creation of recipes. This lets you put the recipe contents inside a subnetwork, and preserve the content and capture settings in a HIP file.

For more information, see Recipe Builder.

Scripting

See Scripting recipes for information about how to use scripts to create, apply, and run in recipes.

Recipe data format

See Recipe data format for information about the data format for recipes.

Networks and parameters

Networks

  • Network editor

    How to create, move, copy, and edit nodes.

  • Network navigation

    How to move around the networks and move between networks.

  • Connecting (wiring) nodes

    How to connect nodes to each other to make them work together.

  • Network types and node flags

    Flags represent some state information on the node, such as which node represents the output of the network. Different network types have different flags.

  • Badges

    Badges indicate some status information about a node. They usually appear as a row of icons below the name of the node.

  • Node Info

    The node info window shows a quick overview of statistics and information about a particular node.

  • Find nodes in a network

    How to use the Find dialog to find nodes based on various criteria.

Editing parameters

Next steps

Expressions

Recipes

Reference

Guru level