Houdini tip | Assets versioning workflow

In this post I will discuss couple of ideas about versioning of Houdini assets.

asset_mgr_v5

Keeping track of your changes is important in every workflow and the same applies to dealing with digital assets in Houdini (HDA/OTL). Houdini enables you to have non-destructive workflows and has a nice way of managing its assets versions.

I think that those useful features might be a bit hidden, so I thought I could write something about it 🙂

Asset creation and namespaces

Houdini enables you to categorize your assets into namespaces. With using it you can have a multiple assets with the same name (from different sources), or multiple versions of the same asset.

To create a company namespace, you can prefix your asset name (for example ivy generation asset) with a company name, e.g. my_studio::ivy_asset, or your initials, e.g. jt::ivy_asset, or both, e.g. my_studio.jt::ivy_asset .

To create a version namespace, add a numeric suffix after you asset name. You can use number and periods only, but you can design your own convention. For example after couple of iterations on your ivy asset you can have assets with those names:

  • my_studio.jt::ivy_asset::1.0
  • my_studio.jt::ivy_asset::1.1.5
  • my_studio.jt::ivy_asset::1.2
  • my_studio.jt::ivy_asset::2.0

As you probably noticed, Houdini uses two colons (::) for separating namespaces. In file names it replaces :: with two underscores (__). When creating an asset you should use namespaces in Operator Name. For Operator Label use a descriptive name, like Ivy generator. As for a file you want to save the asset into, you can skip the version part. You can do it because you can have multiple versions of an asset in one library file (.hda). Then it is not misleading if you have 10 different versions of assets in a file having first version number in its name.

So your my_studio.jt::ivy::2.0 asset can be saved in my_studio.jt__ivy_asset.hdanc file.

So let’s create our example asset, select a subnetwork containing your nodes, click Create Digital Asset…, and write down name of your new asset.

asset_create

After that I added couple of controls to parameter interface and it looks like this in my case.parm1

If you middle click on your node, you will see more detailed information about it.

asset_v1

Upversioning

After some work with our asset we might want to add new features to our asset. But we probably have already created couple of scenes using the initial version and we do not want to break them, so we can create a new version, while the old one will be still available. To do so, open Asset Manager window and find your asset in it. To create a new version, we need to create a copy of our asset and set higher version in its name. For compactness we can use the same hda file, Houdini will not overwrite it, but append a new asset into it. You can use both Copy… or Duplicate… options to create a new version.

asset_mgr_menu

asset_copy_menu

asset_copy

After some work I added new controls and parameters.

parm2

If you middle-click on the asset you can see that it is saved in the same file.

asset_v2

If you check Asset Manager, you will see that there are two versions of the asset available. When adding our Ivy asset node from TAB Menu, then the latest version 2.0 will be created.

asset_mgr_v2

Switching versions

Now we have two versions available. The old scenes will keep using the old version, while new scenes will use the latest version.

To manually switch versions, go to Configuration tab of Asset Manager and select Display Menu of All Definitions in Asset Bar dropdown menu. This will show a handy dropdown menu at parameter interface of each node.

display_menu

With this menu you can switch to any version.

parm_menu_select

Take a look at Asset Manager, it provides you useful tools for managing your asset libraries. Also check my post about using environment variables if you want to learn more about how Houdini finds digital assets on your disk.

asset_mgr_v5

Further ideas

If you are in a studio environment, then you will probably use some code versioning system (git, svn…) for keeping track of changes in digital assets. Houdini files and assets however contain binary parts, which are hard to read, or diff – find differences between various versions. To fix that you can save your assets and scenes in text format. I have Education version of Houdini, so I couldn’t test it, but it seems to be useful. Especially if you want to quickly spot changes in your repository.
You can find more information about it here.

Saving hip files as text seems to be easily done through File -> Save as text option, or with hou.hipFile.setSaveMode(hou.saveMode.Text) Python command. Digital assets need to be converted to folders and back with hotl command line utility. You can chain this operation to your publishing pipeline, where assets are expanded to folders and files before committing to the repository and later converted back when pulled.

This post was inspired by a workshop by Daniel Stern, thanks for the tips 🙂
You can find more information about asset versioning in Houdini docs: namespacesversioning, files as text .

Thanks for reading 🙂

Advertisements
Houdini tip | Assets versioning workflow