Variants Design Workshop
Attendees/involved:
- Dalai Felinto
- Francesco Siddi
- Pablo Vazquez
- Bastien Montagne (Technical feedback)
- Sergey Sharybin (Technical feedback)
- Jesse Yurkovich (USD Q&A)
This proto-design document is the outcome of design sessions that happened in August 2024 at the Blender HQ. It is a follow-up of the Online Assets design discussions.
The goal is to look at variants as a core feature of Blender, and not something exclusive to assets. It also tries to align with the USD concept of variants. For a recap variants and representations on the context of assets, see the online assets design.
Audience:
- Authoring: Technical users
- Using: All users
Use-cases:
- A cabinet furniture has two variants: open and closed doors.
- A desk furniture has three variants: wood, white and black.
- Plant vase variation : Broken and Full.
- Different versions of a character are created with minor difference among them, and shared as a single character (with variants to be picked from).
Definition:
A variant is a set of dynamic overrides combined to offer alternative views of a data-block. Each data-block can have multiple variants.
[Collection data-block]
[ variant open red door ]
[ Material/Paint/Principle BSDF/Color = (1.0, 0.0, 0.0) ]
[ Object/Door/CustomProperties/Open = True ]
[ variant closed blue door ]
[ Material/Paint/Principle BSDF/Color = (0.0, 0.0, 1.0) ]
[ variant open green door ]
[ Object/Door/CustomProperties/Open = True ]
Although the dependent data-blocks (e.g., Material) can have their own variants, they donât have to. Their values can be changed for the evaluation context of this particular object.
Library Overrides, Dynamic Overrides, Variants
- Library Overrides are for animating a linked character. Multiple instances of the character can be animated on the same scene.
- Dynamic Overrides are for changes in a local file (which can be carried over to future links).
- Variants use dynamic overrides to create different views of a data-block.
Authoring variants
Note: This is an exploratory design, to explore a workflow as distant from the library overrides as possible.
Technical workflow = Outliner-centric:
- Clicks on a data-block and Add a Variant.
- Go to a new view in the Outliner to edit the variants (VERY similar to how we show overrides properties at the moment).
- Go to a property in the Properties Editor and âCopy Full Data Pathâ
- Paste the path into the outliner variant editor.
Using:
Outliner lists all the variants nested under the data-block.- Outliner indicates that the data-block has variants.
- When selecting an ID, the variants for that ID can be selected as well.
- For simple cases (where there is a single VariantSet), each individual variant could be available in the ID Templates.
- Variants are selected after an asset is selected.
- If the individual variants are not exposed directly, a âdefaultâ variant could be set as the one picked by the ID Template (to avoid having to pick an original high poly mesh before switching it to a proxy).
Which data-blocks to support
Although the implementation is going to be generic, not all data-block types would benefit from variants.
Example of ones that could use variants:
- Collection, object, mesh, material, image.
Example of the ones which donât make sense:
- Light probe, lattice.
USD
USD has a concept of variants which should be interchangeable with Blenderâs variants implementation.
- Each prim (e.g., an Object data-block) can have VariantSets.
- Each VariantSet has one or more Variants.
- Each Variant contains a name and a series of opinions (overrides) over specific settings.
Any user of the prim must choose one of its variants to use, for each of its VariantSet.
Representation
From the USD point-of-view, representations are variants. There is an effort from Ubisoft since 2022 to propose representations (LOD) to become part of the USD schema, but this is still under discussion (July 2024).
From the Blender point-of-view, we can implement representation as a user-facing feature, with a very constrained experience, and under the hood handle it like we would do variants.
This could then be used by the Simplify panel to restrict the maximum image resolution, or the LOD.
Image Representations
For example, we can implement representation for Image data-block where users can pick a different file path for different resolutions (1K, 2K, 4K, custom).
Level of Details
Note: There are different ways to design LOD integration. This is simply an example of treating representation as a Blender-specific feature, instead of a generic for all data-blocks solutions.
- Objects could get a LOD panel where a different mesh and different modifier stack could be used as different LOD.
- Each LOD should be configured based on the camera distance (defined on the scene level, overridden by object settings).
- This could then be integrated with Cycles/EEVEE/Workbench.
USD Q&A
(answers by Jesse Yurkovich)
- Can you have different variant sets enabled for a single prim?
For example, if I have the prim Desk and the following variant sets:
- Color: Red, Blue
- Size: Small, Large
Can I have a table which is Red and Small?
â Yes
- Is the original prim also considered a variant?
â No, but you can always create a âdefaultâ variant on each VariantSet and set has no overrides (this works for Blender, but for USD this would be saved a bit differently).
- Can the variant be animated? (as in, changing which variant to load in a different frame?)
â LIkely not. Thereâs a portion of the Ubisoft LOD spec that alludes to this being something they want their LOD proposal to address.
Technical feedback
-
USD feature parity vs usability improvements to artists.
-
If we get to a point where we need to make a decision between easy-of-use and feature parity, it is okay to focus on the usability of the Blender workflows.
-
For example, we could support a single VariantSet (and no nesting), making it 100% compatible for exporting, and requiring some conversion for importing (e.g., by flattening the possible combinations as individual Variants).
-
-
Once a collection is linked, where are the active variants stored?
- Could be stored in the LayerCollection.
- If it is an instance, they could be stored in the Empty object.
-
If every ID selector can pick the variant, how to handle cases where you just want the variant used in the current context (e.g., Bool Modifier or Light Linking).
-
IDUser (like ImageUser) may need to be required in any place that stores an ID pointer.
-
Partial library loading is required (so a high poly variant is not brought into memory/depsgraph if not used).
- This is also important for asset representation, where only a few representations may be available (downloaded).
Next Steps
Polish the design (mockups, âŚ) and see how this would fit as a project, the MVP(s), real studio use cases to consider as deliverables.