Houdini 17.5 Building procedural dependency graphs (PDG) with TOPs

File tags

Work items track the "results" created by their work. Each result is tagged with a type.

On this page

Overview

Work items track results created by the item in the output attribute. The results are strings, usually file paths to files created by the work item. All results are tagged with a "tag" string that describes the type of the result. The tag string is a hierarchy of broad types down to more specific types, separated by slashes (similar to MIME types but totally free-form). For example:

Tag

Description

file/geo

Geometry file

file/geo/terrain

Terrain geometry file

file/geo/building

Geometry file containing a building

Some nodes and API functions let you match files by their tag. Tag matching is by prefix, so a file tagged as file/geo/terrain will match both file/geo and file, but not file/geo/building.

Although work item outputs are typically files, it is possible to have other types of information reported back as a result. For example, when using the ROP Fetch to cook a distributed simulation, the sim tracker work item will report a socket/ip and socket/port result, which other work item can use to connect to the tracker.

Tagging results

  • Nodes that generate files usually have a parameter for specifying how to tag work item results. The default tag is usually set based on the intended use of that node.

    For example, the Geometry Import lets you cook a SOP network and write the result to a geometry file on disk. The node has a Result tag parameter that sets the tag for the generated file. The default tag is file/geo.

Using tags

  • You can see the tag assigned to a result in the work item info window, and in the task graph table.

  • Tags can be useful when a work item has muliple files associated with it.

    For example, the Partition by Bounds node can create partitions from terrain tiles, and road geometry that intersect the tiles. The partition may end up having several files associated with it: a terrain file and zero or more road files. Tagging the files as file/geo/terrain and file/geo/road would make it easier to work with the files.

  • You can query results by tag using the Python scripting API. The pdg.input() function takes a tag parameter that only returns the results where the tags match by prefix.

    # Returns all input files tagged file/image on the incoming work item
    pdg.input(tag='file/image')
    

Building procedural dependency graphs (PDG) with TOPs

Basics

Next steps

  • Running external programs

    How to wrap external functionality in a TOP node.

  • File tags

    Work items track the "results" created by their work. Each result is tagged with a type.

  • Feedback loops

    You can use for-each blocks to process looping, sequential chains of operations on work items.

  • Command servers

    Command blocks let you start up remote processes (such as Houdini or Maya instances), send the server commands, and shut down the server.

  • Integrating PDG and render farm software

    How to use different schedulers to schedule and execute work.

  • Visualizing work item performance

    How to visualize the relative cook times (or file output sizes) of work items in the network.

  • Tips and tricks

    Useful general information and best practices for working with TOPs.

Reference

  • All TOPs nodes

    TOP nodes define a workflow where data is fed into the network, turned into "work items" and manipulated by different nodes. Many nodes represent external processes that can be run on the local machine or a server farm.

  • Python API

    The classes and functions in the Python pdg package for working with dependency graphs.