Variant Nodes#
Variant nodes manipulate USD variants within a stage. These nodes enable setting, querying, clearing or blending variants based on events or data. Variants are fundamental components of configurators, and variant notes are expected to be utilized extensively. Review the Action Graphs developed for the Concept Car example in the following file:
/03_ConceptCar_Example_080524/03_Configured/ConceptCar_Configurator.usd
The following video series describes the variant nodes in detail, and how to use them:
Configurator - Part 1: Set Variant Selection (youtube.com)
Configurator - Part 2: Clear Variant Selection (youtube.com)
Configurator - Part 3: Utility Nodes (youtube.com)
Configurator - Part 4: Data Driven (youtube.com)
Set Variant Selection#
The Set Variant Selection node contains many attributes and concepts applicable to all variant nodes. Node attributes can be configured through direct manual entry or parametrically wired from upstream graphs. In the example file, variant nodes can found in the /Graphs/Backgrounds
and /Graphs/CarColors
graphs.
Prim |
The target prim. This prim must contain variant data. To identify prims with variants: Use the Variant Presenter (Tools > Variants > Variant Presenter) for a comprehensive list. Select the appropriate prim path. The subsequent fields (Variant Set Name and Variant Name) are populated with available variant data. If these fields remain blank, the selected prim lacks variant data. |
Variant Set Name |
The specific Variant Set targeted for manipulation. This field is case-sensitive. |
Variant Name |
The specific Variant selection. This field is case-sensitive. |
Set Variant |
This is an advanced option that can optimize performance. Checkbox ON: Sets the variant on the prim, similar to selecting it from prim attributes or variant tools. This action recomposes the stage, setting the “V” in LIVRPS[LINK:LIVRPS] to the node’s configuration. This ensures reliable and predictable switching behavior, but requires stage recomposition. Checkbox OFF: Reads attributes stored in the variant and applies them as Local opinions, bypassing stage composition. This can result in faster attribute switching, but complicates the stage with local opinions. Setting local opinions instead of variants may interfere with variant functionality elsewhere in the application, because they are being overridden locally. |
Blend Variants#
The Blend Variants node is a specialty node that enables smooth interpolation between supported attribute types of two variants. Any numeric type of data can be blended, but attributes such as material assignments, boolean attributes, and strings cannot be blended. The blend node blends whatever matching attributes it can find, and skips unsupported attributes. In the example file, blend variant nodes can found in the /Graphs/Wheels
and /Graphs/Doors
graphs.
Blend Variants node and its attributes:
Prim |
Target prim containing the two variants for blending. |
Variant Set Name |
Specific variant set containing the both variants. Blending is restricted to variants within the same variant set and prim. |
Variant Name A |
Initial variant for blend operation. |
Variant Name B |
Target variant for blend operation. |
Blend |
Interpolation value between variants. 0: VariantA 1: VariantB. Thus a value of 0.5 would be halfway between the two attributes in Variant A and B. |
Set Variant |
When enabled, at blend completion (value 1), the node clears local opinions created during blending and formally sets variant selection to Variant B. |
Strength Ordering Revisited#
Variant changes via the Variant Presenter trigger stage recomposition to determine the strongest opinion (e.g., Blue or Red material). This process can be time-consuming for entire scene recomposition. Refer to USD strength ordering on LIVRPS for more information.
Unchecking the Set Variant parameter stores variant changes as Local opinions. A local arc composes first, potentially improving performance (especially in large scenes).
You may wish to experiment with both checked and unchecked settings, but you should use one method consistently throughout the entire scene.