|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 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:
||int or [int]||
The number of wedges created by this node, equal to the value of the Wedge Count parameter. If this node is wired into another node and the Wedge Count parameter has an expression driven by work item attributes, then the value of this attribute may be different for work items with a different upstream dependency.
When the Preserve Wedge Numbers is on, the
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
When the Preserve Wedge Numbers is on, the
The total number of work items produced by the node during the work item generation step. If this node is dynamic and has an input node, the
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
If you choose to “push” attribute into a ROP parameter by turning on Target parameter, the node sets the
This attribute is only set when the Wedge Type is set to String. For all other wedge types the target parameter is set to an attribute reference in all cases.
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.
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.
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 on, the
wedgecount attributes 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. Likewise, the
wedgecount values correpsond to the number of wedge variations at each level. When the toggle is off, only the most recent wedge number and count are 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).
Set Value As
When Attribute Type is set to String and the wedge has a Target Parameter enabled, this parm determines how the target parameter should be set. You can use it to set the target parameter to an expression or constant value, or to a reference to a PDG work item attribute.
The target parameter will be set to an expression that references a work item attribute. For example, if the attribute name is “scale” the target parameter will be set to the expression
The target parameter value is explicitly set to the wedge value.
The target parameter expression is explicitly set to the wedge value.
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 necessary. 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.