getavalon / core

The safe post-production pipeline - https://getavalon.github.io/2.0
MIT License
218 stars 49 forks source link

Houdini Solaris - loading multiple USD files in a single node #480

Open BigRoy opened 4 years ago

BigRoy commented 4 years ago

Issue

This relates to the USD workflow in Houdini introduced with version 18, dubbed Solaris.

Currently the Avalon Houdini integration makes some assumptions on how content is being loaded in, e.g. that a specific node (or container node) loads a single file. However, the USD nodes in Houdini allow Referencing and Sublayering in multiple inputs with a single node, and this is the recommended workflow. Or it even has a Stage Manager that allows to intuitively load up content in a single node and define its hierarchy.

A single node loading multiple published files

We need to find a safe and easy way to detect what source files to load, and potentially even think about how to ease the workflow for the artist so they can still use the Stage Manager yet with the functionality of the Avalon Loader and browsing the available content. Here's an example of pipeline integration with StageManager by Blue Sky studios.

This is very good example of how we might need to adapt the loader for Houdini to resolve this. Because currently the Loader is able to load up new files, but it has no functionality to set a specific layer to the correct path which is what Houdini artists will want to easily manage their loaded layers.

We'll need to find a way to identify a loaded path as a particular "loaded asset" and retrieve them as individual loaded representations from the node, e.g. find them as an actual Avalon container. Previously we'd store the loader+representation+id, etc on the Node however now wilt multiple representations being loaded with a single node this concept will need to be refined.

Since now the data can be managed inside a single file this means it also greatly influences how the Loader works. As a Loader might now need to manage updates "within" a single node as opposed to just updating/remove the node itself. Somehow we'd need to be able to identify which index it's referring to. Plus we'll need to make clear where we'll be storing the Avalon container data for the Manager to be able to work with it.

As such, it would be good to discuss how to best implement this.

Example

Here's an example of the Sublayer node loading two USD files: houdini18_usd_sublayer_two_files

Ideas

This could be resolved for a large part with #478 as using a custom avalon URI could be easily recognized, tracked and managed by the Avalon toolset as we would have full control over the implementation of that URI.

We could have a URI to container method that could parse it so the manager could manage it.

# psuedocode
def uri_to_container(uri):
    container = parse(uri)
    if container:
        return container

Relates to #477 as it revolves around required changes for adopting USD.