Hey everyone.
Let me summarize in this topic current state of USD in AYON and our future plans so we can open discussion.
Intro
USD is a well-known and complex tool in this community. Understanding its concepts and incorporating them into a studio pipeline can be challenging. However, there have been recent developments that aim to bring some standardization to USD. The Alliance for OpenUSD (AOUSD), a non-profit organization, has taken USD under its umbrella, which is expected to contribute to its evolution.
USD encompasses various concepts such as sub-layers, reference composition arcs, variant sets, and shading schemas. It also offers integration with renderers through Hydra and interoperability between DCCs with MaterialX. Furthermore, there are other exciting developments on the horizon. Itâs important to note that certain aspects of USD are implementation-specific, such as choosing between low-level or high-level USD API and determining the composition approach based on production requirements. These decisions cannot be universally defined by a one-size-fits-all pipeline.
From AYONâs perspective, it is crucial to embrace the Asset Management aspect of the USD workflow. This involves providing an AYON connected Asset Resolver (AR) and basic tools for managing composition, publishing, and loading USD layers. Integrating tools like usdview
can offer visual feedback and aid in scene debugging. However, AYON should not impose strict guidelines on how USD should be used in specific scenes, such as dictating the node graph structure in Houdini or specifying the placement of LOP nodes and Python nodes. Instead, the focus should be on what can be effectively achieved. There are already existing USD-related pieces in AYON, like those developed by @BigRoy for Houdini, which can serve as a foundation for additional work and provide inspiration. Maya has Multiverse support but a robust, native AYON solution is still needed.
The work on it can be divided into multiple topics:
Asset Resolution (AR)
The heart of working with USD assets in USD is the Asset Resolver. It is a plugin that implements the ArResolver
interface of the USD API to handle asset paths defined within USD. Implementing an Asset Resolver can be challenging due to performance issues. Additionally, USD does not support custom resolvers implemented in Python, again because of performance and multi-threaded systems.
We have implemented a prototype USD Asset Resolver that works with AYON API to resolve paths. This means you no longer need to statically build the USD hierarchy; instead, you can use URIs like:
ayon+entity://super_cool_project/MegaAsset?product=model&version=v005&representation=usd
That will be resolved on the fly to a specific path pointing to storage based on the current platform. This means that when you are on-site on a Windows machine, the resolved path will be something like:
P:\SuperCoolProject\Assets\MegaAsset\publish\model\v005\MegaAsset_model_v005.usd
but on linux it will end up like
/mnt/studio/projects/SuperCoolProject/Assets/MegaAsset/publish/model/v005/MegaAsset_model_v005.usd
You get the idea. Anyway, this prototype is still a work in progress as it needs performance optimizations like proper caching - but also adding support for selectors to be more flexible with the URIs.
Instead of using &version=v005
, we can use something like &version=latest
or &version=approved
, or even some time/date selectors, etc.
Another concern is the need for adequate render farm support. When submitting a task to the farm, it is undesirable for all nodes to execute the Asset Resolver and repeatedly query the server. Instead, at this stage, all paths should be âbakedâ and retrieved from a sidecar cache file, which will be managed by the Asset Resolver code.
We also offer support for OpenAssetIO, which handles similar tasks. OpenAssetIO provides its own Asset Resolver that can be used as an alternative or supplement to the AYON Asset Resolver. It is possible to register multiple asset resolver plugins.
Folder structure for USD
USD can describe many things, from a single asset to complex shots, and is usually composed of additional files nested in some form of hierarchy. To support this, along with âtraditionalâ workflows, we need to define some default templating of the USD hierarchy. Some of it can be helped by the use of symlinks, but that itself poses some difficulties on different platforms and storage systems. Assets can be nested or in a flat hierarchy, and so on. One of the proposals is to have a structure like:
Project / Asset Hierarchy Folders / Asset /work (for workfiles) /publish (for published data) / {family} / {variant} / {version} / [files] /stage (for USD stage) / {usd_families} / {variant} / {version} / [usd files] /sub_assets / {asset} / {stage} / {usd_families} / {variant} / [usd files] /sub_assets âŚ
USD families should reflect existing families in AYON (or add necessary new ones) like stage
, model
, animation
, texture
, material
and so on.
Tools
this section is still WIP, mostly quick ideas thrown here for disussion
USD Context Builder
We will need to add something like workfile builder but for USD - mainly for shot-based USD file to automatically create hierarchy and related USD files based on what is already published.
USD Version Control
That would be UI tool to easily manage versions inside the whole USD hierarchy - to easily switch versions, or freeze them for some packaging or farm rendering perhaps.
Sublayer Tool
This is maybe the same thing as USD Version Control tool with additional features. It should manage versions of sublayers, re-ordering and adding published layers from different contexts, live view of the data, etc.
There might be need for other host specific tools but I think there is pretty much solid toolset already in Maya and Houdini that we shouldnât try to replace. Only add functions that are specific to AYON workflows or are in some way missing.
USD Addon
USD support should be bundled as an AYON addon that will contain built-in USD tools like usdview
, etc. These tools can then be used within other USD applications to preview USD files, for debugging, etc. This might be a little challenging because we need to support Windows, Linux (multiple distributions), and macOS (multiple versions of the OS and perhaps Intel/M1/M2 variants too?). Weâll need to create some infrastructure and scripts around it - at least for the Asset Resolver, as it needs to be built against individual USD framework versions used by DCCs.
Note that this list is really just a quick draft, but since there was some interest expressed over Discord channels about it, I think we need to kick off some public discussion here where it is more persistent. Feel free to comment on it in any way, and Iâll try to maintain this topic as USD support in AYON takes a more definitive shape.