|On this page|
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.
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.
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.
Click the add button next to Wedge attributes to add a new wedge variable.
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
@attributereferences 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.
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.
In addition to the attributes created using the Wedge Attributes parameters, the following common attributes will be added to Wedge work items:
An index that identifies the wedge variation on the work item. This is unique within the Wedge node.
||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
If the Preserve Wedge Numbers toggle is enabled
An list of attribute names that are being wedged by this node.
If you choose to "push" an attribute into a ROP parameter by turning on Target parameter, the node adds an
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.
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.
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.
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.
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.
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.
Sets the number of wedged attributes.
The name of the attribute to wedge.
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.
The attribute data type: "Float", "Float Vector", "Integer", "Integer Vector", "String", or "Color". (Use Float/Integer Vector for any vector size, two to four).
How to generate the wedged values.
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.
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.
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)
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.
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.
When Wedge type is "Range", "Value List" or "Bracket", generate the values randomly.