Hi.
I have some unclarity about Sublayering vs. Referencing vs. Payloading.
The general concepts and differences are clear to me.
But I have a few things I am confused about…
Let’s start with an Asset Component.
In the ASWF USD Asset Structure Guidelines there is the following section:
Additional Layers/Contributors
Models which incorporate work from other departments or disciplines, can follow the materials pattern and reference their layer into the asset’s root file layer. It may also be helpful to define a scope for any unique/new contributions to the asset.
For example, in the case of a campfire, which has asset-based lighting and volumetric effects:
/campfire (xform) ← Component Kind /fx (scope) /geo (scope) /lgt (scope) /mtl (scope) /__class__ (class) /campfire (class) ← Inherited by /<component>
All other layer contributions to an asset should be crate files (binary .usd or .usdc) and named after their role/contribution, which get referenced into “payload”. The ordering of these extra layers depends on their function, and their place in the workflow-timeline. Generally, the layers build on one another, so that later disciplines/contributors can use and/or override existing work. This is why geometry is at the bottom, then materials. And is why “lighting” is usually one of the last layers to contribute to USD assets/shots.
TODO:
- When should individual layers be sublayered vs referenced in asset structures?
Unfortunately it’s exactly the “TODO” section I am confused about.
Normally I would assume sublayering the different department contributions in the correct order is the way to go. This also seems to work fine.
But there is also this section:
Composition & File Organization
…
- Layers are usually divided by department/work/contribution/content
- A payload requires an external file, but otherwise layer separation is mostly about organizing work as needed
- Individual element layers of a component are generally either referenced or sublayered together.
- Referencing helps keep opinion strength a bit more predictable, as each contribution is the “R” in LIVRPS
So here it is suggested to reference the layers instead of sublayering them due to strength ordering reasons. SideFX also follows this recommendation in their default Solaris / USD Component Builder.
However, when using referencing instead, it works whenever a new layer is adding a new element. But when a new layer should overlay / override a previous layer (like a CFX cloth sim loop in the asset_cfx.usd
layer overlay the asset_geo.usd
layer, referencing does not work for me. The opinion seems to be too weak. When sublayering this works as expected, following the local layer stack ordering.
Am I doing something wrong here? Or is sublayering the only and proper way to achieve this?
If the later is true, what is meant by:
Referencing helps keep opinion strength a bit more predictable, as each contribution is the “R” in LIVRPS
For me it feels a bit like the opposite actually. And also referencing feels very counter intuitive here. But there seems to be a reason why also SideFX did it.
Might I get into trouble with variants (or nested variants etc.) within the asset and or payloading then for example?
Is there maybe a reason to use referencing in the asset component context, and sublayering in the scene context?
Now a similar question regarding payloading…
Which is just a special type of reference, and even lower in the LIVRPS so it probably makes sense the behavior is similar.
Let’s say I have an assembly that loads multiple asset components (which contents are behind a payload).
This is done in the assembly_layout.usd
layer.
Now I want to add some small geometry to the assembly (let’s say a box) and modify an existing asset geometry (in Houdini via the SOP Modify LOP). I do that in the assembly_geo.usd
As this is not contained in a proper component, it’s not payloaded.
Now I want to make sure to also payload it, so I payload the layer instead of sublayering it within the root assembly.usd
layer.
Now again, the additional geometry (the box) is visible as expected and also can be unloaded.
But the geometry modification that should be overlayed has no effect, also when payloads are loaded.
A similar scenario would be in the shot level with an FX department layer.
It adds a Pyro Explosion.
And overlays transforms from and RBD sim over a building asset.
If I would payload the FX department layer the RBD overlay wouldn’t work. The pyro sim would.
Interestingly, whenever sublayering an overlay (like the RBD sim over the building asset component), unloading (payloads) in the viewport works just fine, as the root component is unloaded, and thus the overlays that have opinions about prims inside the root are also invisible.
However when unloading (payloads) on the stage (not just the viewport), they still show up, and thus have to be fully loaded.
Am I right with the assumption / “rule of thump” that whenever I add new elements in a layer, I can payload them (the individual sublayers like the pyro_fx_cache.usd
)?
And when I want to overlay another layer (like the RBD sim) I can not not use payloading at all? (Yes, in these cases it will still work in the viewport, but not in the scene graph.)
Help would be much appreciated.
Thanks very much!