I’m running into a bit of an issue when organizing a sequence / shot structure in USD.
Here’s what I have currently:
sequence.usd
sublayers: layout.usd, lighting.usd, shots.usd
layout.usd
references all the assets used across the sequence and pulls them into a hierarchy under a top-level scope “scene”, using Xforms with references
This layer also sets up the assets’ basic locations using a xformOp:translate and sets a xformOpOrder
shots.usd
this file contains an override for the scope “scene” with references to the different shots in this sequence.
each of the shot references is using a time offset so that the shots themselves can work in a 1…n timeframe: shots/1/shot.usd, shots/2/shot.usd, etc
shots/n/shot.usd
these files contain shot-specific layers to bring in additional assets, but also to sometimes modify the translation / rotation etc of assets in the sequence/layout.usd
each shot has a startTimeCode of 1 and endTimeCode of whichever the length is for the shot.
The problem I’m having is that each override of each shot.usd affects the whole timeline. Also, any overrides don’t take precedence over any data already in the layers defined in the sequence layout.usd.
Is there a way around this other than flipping the concept upside down and referencing in the sequence level layers from each shot?
Hi @virokannas - Flipping the concept upside down is likely the path of least resistance, as that is the pattern that was in mind when designing how USD works. Timesamples do not merge across references or other arcs - the layer with the strongest precedence in your scene that provides any timesample or default will be the only layer consulted over the entire timerange. Also, because of LIVRPS ordering, any data that is brought in through a (“R”) reference will be strictly weaker than any (“L”) opinions coming from a sublayer, regardless of which sublayer contains the actual reference.
If you wanted to continue to push on the sequence organization, there is potentially a solution using Value Clips (you’d get a single layer per-shot, consumed as a Clip in the sequence… actually you could have multiple layers per shot, but they would not be organized as sublayers, as you’d expect them to be), but it will come with some added complexity, limitations (see, e.g. Issue 2901, and there are others). I can provide a few more details if that seems palatable.
By the way, I remember there was a fantastic (pun intended) segment at SIGGRAPH some years back on the train chase segment in Incredibles 2 - where the big thing was how USD made it possible to consider the sequence as a whole. Would you have something to share as to how that was done, even if it involved switching stages on-the-fly between shots or some other secret sauce?
I did look into the value clip side of things, but it seemed to be limited to adjusting existing elements in the scene, not bringing in any extra assets per shot.
It would be nice to get this where a sequence could be played back without pre-rendering even with the shots being separated…
I didn’t catch that talk, but I’m fairly sure they were talking about the “multi-shot workflow” we’ve built into Presto. It does indeed create a Stage per-shot and has lots of nice tooling for playing through, selecting shot(s) to edit, etc. For complex shots, it greatly benefits from USD’s scalability in representing the big environments (uniquely in each shot, though there are modes that allow greater sharing between shots), and Hydra’s practice of deduplicating primvars on the fly. For the animation scalability side of things, it also benefits from a cool feature of Presto’s rigging system that allows JIT compiled rigs to be shared across characters and shots.