Houdini 17.5 Nodes TOP nodes

Partition by Node TOP node

Partitions work items based on their node

On this page

This node partitions work items based on the input nodes.

Parameters

Use Dynamic Partitioning

When this toggle is enabled the partitioner will wait for all input work items to be generated before partitioning them. If the input work items are dynamic, this means the partitioner will have to wait for and depend on the parent(s) of those items.

Merge Input Attributes

When this toggle is enabled the partitioner will merge the attributes of the work items in each partition and export them to the partition itself.

Node

Partition For Each

Determines how the input work items should be partitioned.

Input Node

A partition is created for each input node, and all work items from that node are put into the partition.

Input Work Item Tuple

A partition is created for each tuple of input work items. The first work item from each node goes into the first partition, the second work item from each node goes into the second partition, etc.

Input Work Item Combination

A partition is created for each unique combination of input work items.

Custom Sort Key

When this parameter is enabled, a custom sort key can be specified as an expression. By default input work items are sorted based on their index. Work items from each node are sorted as a group prior to being partitioned.

The sort key is not used when Partition For Each is set to Input Node, since all work items from a given node will go into the same partition

Partial Partitions

This toggle is only available when using the Input Work Item Tuple partition option. When this toggle is enabled it becomes possible for a partition to not have an item for each input node. This can occur when input nodes have a different number of work items.

For example if the first input has 2 work items and the other has 4 work items, a total of 4 partitions will be created when this toggle is enabled. The first two will have two items in them: item 1 and item 2 the input nodes, respectively. The remaining two partitions will only have 1 work item each.

Advanced

These are advanced parameters that provide finer control over the behavior of the partitioner.

Auto Remove Stale Dependencies

When recooking the node, indicates that the partitioner should remove old dependencies if the partitioning scheme changes as a result of the cook.

Force Re-Evaluation on Cook

Forces the partitioner to re-evaluation the partitioning scheme even if all of the work items are already cooked and no new work items have been added.

Dirtying Mode

The dirty mode parameter offers fine grained control over when a partition is dirtied and the effects on child items when that occurs. This parameter is particularity useful for working around some of the limitation of using dynamic partitioning.

Standard

A given partition will be dirtied when any of the work items in the partition are dirtied. In the case of dynamic partitioning, if any ancestor of a dynamic work item in a partition is dirtied, then All partitions will be dirtied.

When a partition is dirtied all of its children are deleted.

Non-destructive

The same dirtying behavior as Standard, except when a partition is dirtied its children will be dirtied instead of deleted.

Mapping Standard

A given partition will only be dirtied if an item in the partition is dirtied or if the partition’s contents changes as a result of a recook. When the partition is dirtied, any child work items will be deleted.

Mapping Non-destructive

The same as Mapping Standard, except when a partition is dirtied its children will be dirtied instead of deleted.

Sort Contents By

Determines the order that work items are sorted when accessing the partitions on this node. This also affects the sort order of output files on the partition.

None

No sorting is applied - the work items in the partition are handled in no particular order.

Work Item Index

Work items in the partition are sorted based on their index

Input Node Order

Work items in the partition are sorted based on the order of inputs nodes wired into the partitioner itself. If two work items are from the same input, they are then sorted by index.

Attribute

Work items in the partition are sorted based on the attribute specified in the Sort Attribute parameter.

Sort Direction

Determines whether the work items in this node’s partitions are sorted in ascending or descending order.

Sort Attribute

When Sort Contents By is set to Attribute, this parameter is used to determine the name of the attribute to sort by.

Partition When

This parameter is only enabled when using dynamic partitioning. It controls when the partitioning step is performed on the input work items.

Input Items Are Generated

Inputs are partitioned once all of them have been generated.

Input Items Are Cooked

Inputs are partitioned once all of them are cooked. This is required when the partitioning scheme is based on the results of the work items' execution.

This makes this partitioner behave like a Wait for All except that it may create multiple partitions.

Partition Target

This parameter is only enabled when using dynamic partitioning. When the target is set, the partition scheme will be applied to the work items in the target TOP node instead of the input work items.

The target TOP node must be a processor in the same graph above this node, and there cannot be any other mappers or partitioner between this node and the target.

Examples

example_top_partitionbynode Example for Partition by Node TOP node

This example demonstrates how to use the partition by node in PDG/TOPs.

The following examples include this node.

example_top_partitionbynode Example for Partition by Node TOP node

This example demonstrates how to use the partition by node in PDG/TOPs.

See also

TOP nodes