Houdini 16.5 Digital assets

Working with files and assets as text

You can save HIP files as plain text, and expand asset files into a directory of plain files. This makes it easier to use diffing and source control on Houdini files.

On this page

Overview

Normally, scene (.hip) files and asset libraries are stored as single binary files. This is the most efficient form, but it makes a few things difficult:

  • Can’t use text diffing tools to compare files.

  • Can only check assets into source controls as monolithic binary blobs.

  • Can only manipulate assets using Python scripting in Houdini.

For scenarios where you need these abilities, you can save a scene file as plain text, and convert an asset between plain text and binary.

Converting

To...Do this

Save a HIP file as plain text

Choose File ▸ Save as text.

Once a file is saved as text, future saves will also be as text, and Save as text becomes Save as binary.

Convert an asset library to unpacked plain text format

  1. In the main menus choose Assets ▸ Manage asset libraries.

  2. In the "Operator type libraries" tree, find the .hda library you want to convert.

  3. Right-click the item in the tree and choose Convert to unpacked format.

Houdini replaces the single binary file with a directory of the same name, containing files with various information about the asset(s) in the library.

Convert an unpacked plain text asset library to a single binary file

  1. In the main menus choose Assets ▸ Manage asset libraries.

  2. In the "Operator type libraries" tree, find the .hda library you want to convert.

  3. Right-click the item in the tree and choose Convert to packed format.

Convert asset libraries on the command line

To convert an .hda file to unpacked format:

hotl -t unpacked_dir_name source_hda_file

To convert a directory back to single file:

hotl -l source_unpacked_dir_name hda_file

If you are merging HDAs using hotl -m you can use unpacked directories and packed single binary files as sources interchangeably.

Comparing assets in Houdini

You can run an external diff tool from within Houdini.

Diffs results for scene files and assets may not be very clear or understandable, but hopefully can give a sense of what’s changed.

To...Do this

Set up your diffing program

In the main menus, choose Edit ▸ Preferences ▸ External tools.

Set up the "File compare" and "Folder compare" sections with information about your preferred diff program:

  • Set the Executable path to the path to the file path of your diff program. If the program is in the executable search path, you can just type the program name.

  • Set the Command line arguments based on the command line interface of the diff program. You can use the following variables:

    $OLDPATH

    The path to the first file/directory to compare.

    $NEWPATH

    The path to the second file/directory to compare.

    $OLDTITLE

    If your diff tool supports displaying a title for the first file/directory.

    $NEWTITLE

    If you diff tool supports display a title for the second file/directory.

    Typically, the command line arguments will simply be $OLDPATH $NEWPATH.

See what you've changed in an unlocked asset

Right-click the asset and choose Show changes.

See what you've changed in the current scene file

In the main menu, choose File ▸ Show changes.

Compare an asset to a backup version

Houdini automatically saves backups when you modify assets. You can see what’s changed in the asset definition since a previous backup.

  1. In the main menus choose Assets ▸ Manage asset libraries.

  2. In the "Operator type libraries" tree, find the asset you want to check.

  3. Right click the asset and choose Compare.

  4. Click Against: Backup.

  5. Choose the backup date from the pop-up menu.

  6. Click Compare.

Compare two assets

  1. In the main menus choose Assets ▸ Manage asset libraries.

  2. In the "Operator type libraries" tree, find the asset you want to check.

  3. Right click the asset and choose Compare.

  4. Click Against: Asset.

  5. Click the chooser icon to the right of Against: to select the asset to compare against.

  6. Click Compare.

Tips and notes

  • Changes to the asset library in Houdini (for example, adding a section in the Extra files tab of an asset) will still update the contents of an expanded asset library.

  • Currently, the files contained and file formats used inside an asset library directory are undocumented and subject to change without notice. Some of it is fairly straightforward, but just remember that if you try to develop scripts that modify assets by editing the expanded files directly, those scripts could possibly break in a future version of Houdini. Also note that any changes you make inside the directory could be overwritten if the asset library is edited in Houdini at the same time.

Digital assets

Getting started

Creating assets

Next steps