Houdini 17.5 Nodes TOP nodes

Wedge TOP node

Creates work items with varying attribute values.

On this page

Overview

A wedge render generates multiple versions of an image or piece of geometry, with different settings, to help you choose the best looking option from a range of possible settings.

In TOPs, we accomplish this by generating separate work items for each separate variant, with the varied settings stored as attributes.

The Wedge TOP generates these work items. It can generate variations of multiple attributes at once. It can vary settings across a range, choose from a list of values, or pick random values.

How to

  1. Add a Wedge node before your render node(s).

    Since render TOP nodes generate per-frame work items for each incoming work item, render nodes that come after the wedge will generate render items for each frame with each variation.

  2. On the Wedge TOP, use the Wedge attributes multi-parm to set up the attribute or attributes you want to vary. You can use these, for example, in attribute references on the render node to vary render settings, or in an network or HDA called by the TOP network.

  3. Click the add button next to Wedge attributes to add a new wedge variable.

  4. Set the Attribute name of the new wedge variable.

Pull vs. push

For each wedged attribute, you can use it to set a parameter on the render node in one of two ways:

  • On the render node or any other node cooked by the render, you can use @attribute references in parameter expressions to "pull" attribute values from the work item.

    Pull references are very convenient and flexible. However, it does require using TOPs-specific expressions, so it may not be appropriate if you want the ROP node to also be usable manually or without TOPs.

    or

  • On the Wedge TOP, you can explicitly specify node parameters in the scene to "push" the attribute value into at render time. This creates special attributes the render node knows to use at render time to override the specific node parameters.

    This lets you wedge values in the scene without having to use TOPs-only expressions in its parameters, so the node can still be rendered manually or without TOPs.

    Turn on Target parameter. Click the chooser icon next to the target parameter field to choose a parameter to override interactively. The Wedge creates special attributes that tell render TOPs to render with the overrides at runtime, so the HIP file is not affected.

    See the the help for the Overwrite Target Parameter on Work Item Selection parameter for how you can preview pushed attributes, and the trade-offs involved.

TOP Attributes

In addition to the attributes created using the Wedge Attributes parameters, the following common attributes will be added to Wedge work items:

wedgeindex

int

An index that identifies the wedge variation on the work item. This is unique within the Wedge node.

wedgenum

int or [int]

The wedge variation number, which has values that range from 0 to Wedge Count. When there are no inputs to the Wedge node this value is the same as the wedgeindex attribute. When generating nested wedges, however, there can be multiple work items with the same wedgenum since the node will generate Wedge Count items for each upstream work item.

If the Preserve Wedge Numbers toggle is enabled wedgenum is an array that contains all of the different values across multiple levels of wedging. wedgenum[0] is the first level of wedging, wedgenum[1] is the second, etc.

wedgeattribs

[str]

An list of attribute names that are being wedged by this node.

attributechannel

str

If you choose to "push" an attribute into a ROP parameter by turning on Target parameter, the node adds an attributechannel attribute (for example, if the attribute is named scale, the node also creates a scalechannel attribute). This attribute contains the path to the parameter to override. (The render TOPs know to overwrite the parameter specified in this attribute at render time if this type of attribute exists on the work item.)

Parameters

Work Item Generation

Whether this node generates static or dynamic work items. You should generally leave this set to "Automatic" unless you know the node’s work items can be computed statically, or that they need to be generated dynamically.

Dynamic

This node always creates dynamic work items: it waits until the upstream work items are known, and generates new work items from the upstream work items.

Static

This node always creates static work items: it creates the number of work items it thinks it needs based on the parameters (and any upstream static items) before the network runs.

Automatic

If the input is static (a static processor, or a partitioner with only static inputs, or a mapper), this node generates static work items, otherwise it generates dynamic work items.

Wedge Count

The total number of work items to create. Attributes that are defined as a range will divide themselves up into this many steps. Attributes defined by a list of values will cycle if there are more wedges than values.

The number of work items to create. Each work item will have all of the attributes from the Wedge Attributes parameter. If this node is wired into another node, then it will create this many work items per upstream work item.

Random Seed

Change this number to have the node generate different random values.

Preserve Wedge Numbers

When this toggle is enabled, the wedgenum attribute will contain a list of wedge number values from nested wedges. The wedgenum value from the first level of wedging is store at index 0 in the array, the second level of wedging at index 1, and so on. When the toggle is off, only the most recent wedge number is stored.

Export To Environment

Copy the variation attributes into environment variables in each work item’s job environment.

Overwrite Target Parameter on Work Item Selection

If you use the Target parameter checkbox on a variable to "push" the variable into a ROP parameter, you can turn this on to do that push whenever you select a work item in the network editor. This gives you the same previewing effect as using "pull" references. However, the way this works is to actually change the value of the target parameter, so it will cause recooks and mark the HIP file as unsaved, and saving the HIP file will save the "previewed" changes. The current value of the parameter is saved on the wedge TOP when the target parameter is selected, and is restored on work item deselection. It is possible to manually capture or restore values using the Capture and Restore buttons.

Note that this parameter only affects the active Houdini Session. When the network actually runs, it calls the ROP with the "pushed" values without affecting the current HIP file.

Wedge Attributes

Sets the number of wedged attributes.

Per-attribute parameters

Attribute Name

The name of the attribute to wedge.

Target Parameter

If you turn this on, the attribute will be "pushed" into the target parameter. Click the chooser icon to the right of the field to interactively choose the node and parameter to override. If Overwrite Target Parameter on Work Item Selection is enabled, the Captured Value field will store the original value of the parameter. The captured value can be reacquired using the Capture button, and restored using the Restore button.

Attribute Type

The attribute data type: "Float", "Float Vector", "Integer", "Integer Vector", "String", or "Color". (Use Float/Integer Vector for any vector size, two to four).

Wedge Type

How to generate the wedged values.

Range

Distributes values evenly along the range between a start and end value. If you turn on Random samples, the node chooses the values randomly from within the range, rather than distributed evenly.

Value

Sets the attribute to the value of the Value parameter below. This can be a constant value, or an expression that the node evaluates separately for each work item.

Tip

In the expression you can channel reference the wedgecount parameter to get the total number of wedges, and use the @wedgeindex to get the index of the current work item. For example, to generate values in the shape of a sine wave:

sin(@wedgeindex / (ch("wedgecount") - 1) * 180 + 90)

Value List

Cycles through the values specified in the Values multi-parm below. If you turn on Random samples, the node chooses from the list randomly instead of iterating over it.

Bracket

Distributes the values in a range specified by a center value and an offset. To ensure that the center value is included on one of the work items, an odd Wedge Count is necesary. If you turn on Random Samples, the node chooses the values randomly instead of distributing them evenly. The first wedge_count/2 values are chosen from the range [center-offset, center], and the remaining values are chosen from the opposite side of the range.

Random Samples

When Wedge type is "Range", "Value List" or "Bracket", generate the values randomly.

Examples

example_top_wedge Example for Wedge TOP node

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

The following examples include this node.

example_top_hdaprocessor Example for HDA Processor TOP node

This example demonstrates how to use HDA Processor to distribute HDAs using PDG/TOPs.

example_top_partitionbyframe Example for Partition by Frame TOP node

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

example_top_ropgeometry Example for ROP Geometry Output TOP node

This example demonstrates how to use the workitem expand node in PDG/TOPs.

example_top_ropmantra Example for ROP Mantra Render TOP node

This example demonstrates how to use the ROP Mantra node in PDG/TOPs.

example_top_wedge Example for Wedge TOP node

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

example_top_workitemexpand Example for Work Item Expand TOP node

This example demonstrates how to use the workitem expand node in PDG/TOPs.

See also

TOP nodes