Houdini 18.5 Nodes TOP nodes

Partition by Frame TOP node

Partitions work items based on their frame

On this page
Since 17.5

Partitions work items based on their frame and the selected frame rounding mode.

You can use this node to combine multiple subframes into a single frame unit, or to separate frames from different wedge variations. This allows you to run a simulation with integer frames that is internally loading source geometry at subframes.

For example, you can use this node to help with the following:

Tip

  • The $HH/help/files/pdg_examples/top_partitioners example shows how you can use common partitioner like targeted partitioning, controls for merging attributes, and splitting by attribute.

  • The $HH/help/files/pdg_examples/top_multishot and $HH/help/files/pdg_examples/top_rop examples show how you can use this node to group multiple simulation or render work items by their frame value.

Parameters

Frame

Frame Rounding

When partitioning work items with fractional frames, determines how the frame is converted to an integer for partitioning.

Round Down

Rounds the frame value down to the nearest integer. For example, values from 1.0 to 1.9 are treated as frame 1.

Round Up

Rounds the frame value up to the nearest integer. For example, values from 1.1 to 2.0 are treated as frame 2.

Round Nearest

Rounds the frame value to the nearest frame. For example, values from 1.0 to 1.49 are treated as frame 1.0, and values from 1.5 to 2.0 are treated as frame 2.

Missing Frame

Determines how the node should handle work items without a frame value.

Report Error

The node will report an error if any of the input work items are missing a frame

Ignore Work Item

Work items without a frame will be ignored, and won’t be added to any partitions

Add Work Item to All Partitions

Use Frame for Partition Index

When on, the partitions that are created have their indexes set to the frame number assigned to the partition. When off, the partitions have their indexes set from 0 up to the number of partitions created.

When Wedge Attribute is also on, and you want to split frames by wedge index, it isn’t always possible to set the partition index to the frame number. That is because there may be different wedge variations with the same frame number. In this case, the node maintains a unique index for each partition, but the indexing begins at the first frame in the first wedge instead of at 0.

Split by Attribute

When on, work items are split into separate groups before the items are partitioned. This parameter specifies the name of the attribute on the input work items that is used to determine those groups.

For example, you can set this parameter to wedgeindex in order to keep wedge variations in different partitions.

The following extra steps are performed when using a split attribute

  • The node looks up the value of the split attribute for each input work item.

  • The work items are then grouped based on their split attribute value. One group is created for each unique value of the split attribute.

  • The regular partitioning process is applied to each group of work items. Work items in different groups are always be in different partitions. Groups are processed in ascending order of their split attribute value.

Missing Attribute

Determines how the node should handle an input work item that does not have the split attribute.

This parameter is only available when Split by Attribute is on.

Ignore Work Item

Input work items that are missing the split attribute are not added to any of the partitions.

Add to Partitions with Matching Frame

Input work items that are missing the split attribute are added to partitions that have the same frame as the work item.

Add to All Partitions

Input work items that are missing the split attribute are added to all partitions produced by the node.

Use Default Value

Input work items that are missing the split attribute will use the value specified in the Default Value parameter instead.

Default Value

When Missing Attribute is set to Use Default Value, this parameter specifies the value to use for the split attribute for work items that don’t have the attribute.

Allow Partial Matches

When Split by Attribute is set to a list of attribute names, this parameter determines how work items with only some of the attributes should be processed. If partial matches are enabled then work items will be included in partitions based on the attributes that do exist. Otherwise, work items with only a subset of the attributes will be excluded from the partitioning step.

Merge Attributes

These parameters control how attributes from input work items are merged onto the partitions produced by the node.

Merge Operations

Defines the number of attribute merge operations to perform on the partitioner node. The operations are used to merge attributes from work items in the partition onto the partition itself. Operations are performed in descending order. Attributes are merged using the first operation with a pattern that matches the attribute.

Apply Operation

Specifies the operation to perform to merge incoming attributes onto the partition. Each operation only applies only to the subset of attributes matched using the corresponding To Attributes parameter.

The following operations are available:

Ignore

Matching attributes are ignored and will not appear on the partition.

First Value

The value of each matching attribute on the first work item in the partition is kept, and values on subsequent work items are ignored

Last Value

The value of each matching attribute on the last work item in the partition is kept.

Unique Values

The unique values for each matching attribute are merged into an array. Duplicate values are discarded.

Append to Array

The values for each matching attribute are appended to an array for that attribute. All attribute values from all work items are kept.

Minimum

The minimum value for each matching attribute is kept.

Maximum

The maximum value for each matching attribute is kept.

Sum

The sum of the values in each matching attribute is stored on the partition.

Average

The average value of each matching attribute is stored on the partition.

Mode

The most common value in each matching attribute is kept.

Median

The middle value in each matching attribute is kept.

To Attributes

Specifies which attributes the corresponding Apply Operation parameter should apply to. This field can use the Attribute Pattern Syntax to specify multiple attributes.

Advanced

These are advanced parameters that give you a finer level of control over the behavior of the partitioner.

Partition When

Determines when the partitioning step is performed on the input work items.

Input Items are Generated

Upstream work items are partitioned once all of them have been generated

Input Items Are Cooked

Upsteam work items are partitioned once all of them are cooked. This may be 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 node except that it may create multiple partitions.A

Partition Target(s)

Determines which node or nodes(s) should target. Work items in the target nodes are partitioned as soon as they're generated even if the target nodes are not a direct input to this node. The descendants of the target work items are added to the partitions when they become available.

Direct Input Nodes

The partitioner uses work items from its direct input nodes. This is the default behavior

Upstream Static Nodes

The partitioner will skip over dynamic input nodes and partition work items from the nearest upstream static nodes.

Custom Target Node

The partitioner will use the node specified using the Custom Target Node parameter.

Custom Target Node

Specifies the target TOP node for the partition when Partition Targets is set to Custom Target Node. The partition scheme is applied to the work items in the target TOP node instead of this node’s input work items. The target TOP node must be in the same graph and above this node.

Sort Contents By

Determines the order that work items are sorted in 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 input nodes wired into this node. 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 field parameter.

Sort Direction

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

Sort Attribute

Specifies the name of the attribute to sort by.

This parameter is only available when Sort Contents By is set to Attribute.

Examples

PartitionByFrame Example for Partition by Frame TOP node

This example demonstrates how to use the Partition by Frame TOP node to wait for work items with the same frame value.

See also

TOP nodes