Houdini 20.5 Nodes TOP nodes

Invoke TOP node

Invokes a compiled block on input geometry

On this page
Since 17.5

This node can be used to run a SOP compiled block on input geometry. The geometry can either be from the output files of an upstream work item or a custom file path, or native Houdini geometry stored in attribute by the Geometry Import TOP node.

When generating from partition, the invoke can optionally expand the partition items into separate inputs to the compiled block. For example, if the invoke is configured to run a compiled block with 3 inputs the data for those inputs can be loaded from a partition with at least 3 work items. If an incoming partition has fewer than 3 work items, a warning will be issued and the invoke procedure will not be applied for that partition.

Tip

The $HH/help/files/pdg_examples/top_invoke example shows how you can use this node to evaluate a compiled block using data stored on work items.

TOP Attributes

numpoints

integer

The number of points in the output geometry. This attribute is added when the work item is cooked.

numprimitives

integer

The number of primitives in the output geometry. This attribute is added when the work item is cooked.

numvertices

integer

The number of vertices in the output geometry. This attribute is added when the work item is cooked.

sourceindex

integer array

The indices of the upstream items that were used as inputs to the Invoke operation. sourceindex[0] is the first input to the compiled block, sourceindex[1] is the second input, and so on.

Parameters

Invoke

Generate When

Determines when this node will generate work items. You should generally leave this set to “Automatic” unless you know the node requires a specific generation mode, or that the work items need to be generated dynamically.

All Upstream Items are Generated

This node will generate work items once all of the input nodes have generated their work items.

All Upstream Items are Cooked

This node will generate work items once all of the input nodes have cooked their work items.

Each Upstream Item is Cooked

This node will generate work items each time a work item in an input node is cooked.

Automatic

The generation mode is selected based on the generation mode of the input nodes. If any of the input nodes are generating work items when their inputs cook, this node will be set to Each Upstream Item is Cooked. Otherwise, it will be set to All Upstream Items are Generated.

Compiled Block

Block Path

The path to the compiled block end node.

Evaluation Time

When this parameter is enabled it overrides the time used when evaluating the block. By default, the compiled block will be evaluated at the frame value specified on the work item, or at time=0 if no frame is set.

Input Geometry

Expand Partitions

When this parameter is enabled, the invoke will expand upstream partitions and use the work items in those partitions when preparing the input geometry for the compiled block. The partition will need to have at least Input Count number of work items or a warning will be issued and no work will be done. If the partition has additional items in it, the data on the extra items won’t be passed to the compiled block.

Load During Cook

When this parameter is enabled, input geometry data will be loaded during the cook instead of when the invoke work items are generated. This is useful when the input data is produced at runtime by an upstream process, to avoid needing to make the Invoke node Dynamic. Input geometry will also be unloaded when the cook completes, in order to save memory.

Input Count

The number of inputs passed to the compiled block. Must be at least one in order to execute the compiled block.

Geometry Source

The source for the input data. Can be an output file or geometry attribute on an upstream work item or a custom file path.

Upstream File

The geometry for this input will be loaded from an output on the upstream work item, as specified by the File Tag parameter.

Upstream Geometry Data

The geometry for this input will be loaded from a geometry attribute on the upstream work item, as specified by the Attribute Name parameter

Custom File

The geometry will be loaded from the custom file path specified in the File Path parameter.

None

No geometry is loaded for this input, but it still counts toward the sourceindex vector. This is useful when unpacking a partition with Expand Partitions, when the partition contains some work items that don’t have any geometry. It allows the invoke node to skip over them without trying to load geo from the work item.

File Tag

When Geometry Source is set to Upstream File, this parameter specifies which file tag to use when selecting a file on the upstream work item.

File Path

When the Geometry Source is set to Custom File, this parameter specifies which geometry file to load.

Attribute Name

When Geometry Source is set to Upstream Geometry Data, this parameter specifies which attribute on the upstream work item to load the geometry from.

Block Input Name

The name of the input as specified on the corresponding compiled block begin node.

Output

Write Geometry to

Determines whether output geometry should be written to a geometry attribute, a file on disk, or both.

Attribute

Output geometry should only be written to an attribute on the work item.

File

Output geometry should only be written to disk.

Both

Output geometry is written to both an attribute and to disk.

None

Output geometry is not stored, but numpoints, numvertices and numprimitives attributes are still set to the appropriate values.

Output Attribute

If Write Geometry to is set to Attribute or Both, the value of this parameter determines the name of the attribute to store output geometry to.

Output File Path

The path to write the resulting geometry, if Write Output to is set to File or Both.

Output File Tag

The tag associated with the output geometry file, if Write Output to is set to File or Both.

Schedulers

TOP Scheduler Override

This parameter overrides the TOP scheduler for this node.

Schedule When

When enabled, this parameter can be used to specify an expression that determines which work items from the node should be scheduled. If the expression returns zero for a given work item, that work item will immediately be marked as cooked instead of being queued with a scheduler. If the expression returns a non-zero value, the work item is scheduled normally.

Work Item Label

Determines how the node should label its work items. This parameter allows you to assign non-unique label strings to your work items which are then used to identify the work items in the attribute panel, task bar, and scheduler job names.

Use Default Label

The work items in this node will use the default label from the TOP network, or have no label if the default is unset.

Inherit From Upstream Item

The work items inherit their labels from their parent work items.

Custom Expression

The work item label is set to the Label Expression custom expression which is evaluated for each item.

Node Defines Label

The work item label is defined in the node’s internal logic.

Label Expression

When on, this parameter specifies a custom label for work items created by this node. The parameter can be an expression that includes references to work item attributes or built-in properties. For example, $OS: @pdg_frame will set the label of each work item based on its frame value.

Work Item Priority

This parameter determines how the current scheduler prioritizes the work items in this node.

Inherit From Upstream Item

The work items inherit their priority from their parent items. If a work item has no parent, its priority is set to 0.

Custom Expression

The work item priority is set to the value of Priority Expression.

Node Defines Priority

The work item priority is set based on the node’s own internal priority calculations.

This option is only available on the Python Processor TOP, ROP Fetch TOP, and ROP Output TOP nodes. These nodes define their own prioritization schemes that are implemented in their node logic.

Priority Expression

This parameter specifies an expression for work item priority. The expression is evaluated for each work item in the node.

This parameter is only available when Work Item Priority is set to Custom Expression.

Examples

Invoke Example for Invoke TOP node

This example demonstrates how to run compiled blocks using the Invoke TOP.

See also

TOP nodes