Справка Houdini на русском Digital assets

Referring to embedded asset files using opdef:

Wherever Houdini takes a filename, you can enter a reference to an extra file embedded in an asset instead.

On this page

See how to embed files in an asset.

opdef:

  • If the file path parameter is inside the asset with the embedded file, you can use a short form (this is by far the most common case):

    opdef:.?name

    For example, you might have a texture node inside a geometry asset. To make the texture node load a texture from the asset’s extra files, you would use a reference like this:

    opdef:.?default_texture.jpg

  • The general form to reference an embedded file in any node type uses the following syntax:

    opdef:/category/asset_name?name

    For example, to refer to an embedded file named default_texture.jpg on the myasset geometry node:

    opdef:/Sop/myasset?default_texture.jpg

oplib:

There is a separate syntax to access a file embedded in an asset in the same .hda library as the asset the parameter is inside.

For example, you might have two assets, A and B. A has a large embedded shared_geo.bgeo file. In a node inside B, you can refer to the file like this:

oplib:.?shared_geo.bgeo

This is a way of efficiently sharing large embedded files between assets in the same library file.

Tip

In general, we recommend storing only one asset in each .hda file. We find that this works best for sharing and installing just the assets you need, and makes it easy to keep track of what assets are in what files.

There may be times where it is useful to keep multiple assets in the same, such as small support assets for a main asset, or sharing large resources between assets as in this example. For sharing large resources, you might first consider whether the space saving is worth locking assets together in the same file.

Digital assets

Getting started

Creating assets

Next steps