I am looking at porting features of our internal scene description to USD (or at least evaluating the differences between them - which there are many).
One of the features of our scene description is a variable syntax which allows us to define the scene graph location (/character/bobA01/main) and which asset(s) (a usd file for shaders, or a model etc) may exist or may not (effectively its a templating mechanism) on the prim/scene graph location.
One of the features of this is that our “asset nodes” which resolve to asset versions on disk can use variables to define the resulting posix file path.
As a side note we have no “Asset.usda” file for an “Asset” our definintion of “Asset” is pretty loose and is made up of muliple “nodes” that are stacked next to each other which in turn build a payload/reference list.
In the example above we may have asset nodes for:
- model
- anim-cache
- creature-cache
- materials
these are payloads which contain a simple internal struture based on the ASWF Asset guilelines (their default prim is /ASSET)
The resulting file paths end up payloaded onto /character/bobA01 and compose together as excepted.
The animation is a shot cache which contains only the points which have been deformed and is layered with the model (asset).
Our variable syntax uses the parent hierarchy to determine the asset path locations.
The UI we have has variables in it and it forms a dict of tags basically…those tags are evaultaed by the expression engine and it gives back a path
- /asset/$job/$seq/$shot/components/$node[-2].label-$node[-1].label/usdCache/anim
so when we evaluate that with the parent(s): /character/bobA01/main it becomes:
- /asset/USD/TST_0100/TST_0100_0010/components/bobA01-main/usdCache/anim
If we need two bobs we simply duplicate /character/bobA01 and it becomes /character/bobA02 and the anim-cache location becomes:
- /asset/USD/TST_0100/TST_0100_0010/components/bobA02-main/usdCache/anim
Currently we basically make everything unique - but the gotcha is these two share the same shaders, model, procedural fur etc.
Is there any way to use a parent prim’s name (when its referenced) in an SdfPath SdfReference/Payload?
Appologies if that makes zero sense!