Houdini 21.0 Nodes Geometry nodes

Agent Definition Cache geometry node

Writes agent definition files to disk.

On this page
Since 17.0

This SOP combines an Agent ROP and Agent SOP to provide a simple way to write out an agent primitive’s definition to disk. This can be useful at the end of a SOP chain that initializes an agent (for example, using the Agent Clip SOP and Agent Layer SOP).

The Caches help page provides more information on when it may be advantageous to store the agent definition as separate files on disk.

Parameters

Load from Disk

When turned on, the agent is loaded from the agent definition files on disk. When turned off, the input agent is passed through.

Keep External References

When turned on, the .bgeo file stores the file paths to the agent definition components (for example, paths to the .bclip files for each animation clip) when saving agents to a geometry file. When turned off, the agent definition is embedded in the .bgeo file, which produces a self-contained, but larger, geometry file.

This parameter is available when Load from Disk is turned on.

Reload

Reloads the agent definition.

This parameter is available when Load from Disk is turned on.

Cache

Rest Frame

The frame at which to evaluate the input agent when saving to disk. If the input agent is time-dependent, this determines the frame at which the agent definition and attribute values are cached.

Agent Name

The name of the agent. This parameter is provided for convenience so that it can be referenced via the $AGENT local variable in other parameter values.

Cache Directory

The parent directory of the agent definition files. This parameter is provided for convenience so that its value can be referenced via the $CACHEDIR local variable in the other filename parameters.

Save to Disk

Writes the agent definition files to disk.

Create Intermediate Directories

When turned on, creates intermediate parent directories for output files as needed. Currently only applies to generated scripts, images, and shadow maps.

Rig

The filename for the agent rig. The rig file is a JSON file describing the transform hierarchy of the agent.

Agent Layers

The filename pattern for agent layer files. The ${LAYER} local variable can be used to include the name of the layer in the filename.

Shape Library

The filename for the agent shape library.

Clips

The filename pattern for agent clip files. The ${CLIP} local variable can be used to include the name of the clip in the filename.

Transform Groups

The filename pattern for agent transform group files. The ${TRANSFORM_GROUP} local variable can be used to include the name of the transform group in the filename.

Metadata

The filename pattern for the agent definition’s metadata, which is a JSON file containing additional custom data.

Attributes

Saves a geometry file containing the agent primitive’s attributes and properties, such as the agent’s current layers, collision layers, and current clip. While this is not part of the agent definition, it can be useful to preserve the input agent’s attributes when loading from the cache.

Agent Properties

These parameters are available when Load from Disk is turned on. They specify initial values for agent properties, such as the layers to display, and when the agent definition is loaded from disk.

Current Layers

The layer (or list of layers) to assign to the agent.

If Current Layers is empty, and Attributes is turned on, the layers that were assigned when the agent definition was saved are used.

If Current Layers is empty, and Attributes is turned off, the layer named default is used, if it exists. Otherwise, the first available layer in the agent definition is used.

Collision Layers

The collision layer (or list of collision layers) to assign to the agent.

If Collision Layers is empty, and Attributes is turned on, the layers that were assigned when the agent definition was saved are used.

If Collision Layers is empty, and Attributes is turned off, the layer named collision is used, if it exists. Otherwise, the first available layer in the agent definition is used.

Current Clip

The name of the animation clip the agents run.

If Current Clip is empty, and Attributes is turned on, the clip that was assigned when the agent definition was saved is used.

If Current Clip is empty, and Attributes is turned off, the first available clip in the agent definition is used.

Clip Offset

When turned on, this is the time into the current clip to begin playing (in seconds).

Apply Clip Locomotion

When turned on, applies the __locomotion__ transform from the agent rig so that you can easily previsualize locomotive clips.

Inputs

Agent

(Optional) The agent primitive used when caching the agent definition to disk. If there are multiple agents, only the first agent is used. This input is optional, so you can use this SOP in a new scene to load in an agent definition cache from disk.

Outputs

Output

The original geometry that is passed through if Load from Disk is turned off. If Load from Disk is turned on, this output is a new agent primitive that is created by loading the agent definition cache from disk.

See also

Geometry nodes