Open mottosso opened 7 years ago
Some blue sky thoughts.
The R&H layout requires a few things that is hopefully possible using already existing tools.
input
is symlinked into a workarea on load, this could potentially lead to a bloat of connections if the user loads more than necessary or loads something by accident, Is this a problem? I'd imagine we could either have a clean-up process run alongside production, or that an abundance of connections isn't an issue to begin with. The one issue I can foresee is space constraints, but that is an optimisation.When making the switch, it's important that the current workflow is maintained. Not only in order to simplify the transition, but also in order to enable opening a previous version of the project for use with the then-current version of the pipeline.
In order to facilitate this completely alternative layout, a few things need to happen.
io.insert_one({"type": "asset"})
Here already we run into issues, as the RH path template requires a key for things like input_asset
and output_asset
both of which are independent of the source asset and sensitive to context. In this case, whether the asset in question is being imported or exported. But I suppose that is fine, as it would be created by the loader plugins responsible for getting assets into a workarea and application. The loader is independent of the overall pipeline regardless and could be responsible for defining their own path keys.
This could work. So long as we ensure that anything tied to any particular workflow or directory layout is made externalisable. It'll enable greater use by others, similar to how Pyblish currently enables use by a wide variety of uses due to the low coupling it requires.
In that way, we provide a number of path keys via the core pipeline library, such as what an asset, subset, version and representation is. And on top of this enable dynamic generation via loaders and publishing plugins that act independently to the pipeline.
It's interesting how the requirements of an out of the box pipeline mimic internal requirements, this to me is an excellent case study of how the needs of production dictate an alternative directory structure and how providing enough flexibility would facilitate this.
What is needed for this kind of externalisation to take place? I've already brushed up against it when looking into filling in the config repository. Plugins, loaders are both externalisable, but we ran into issues with default data. The data relevant to Maya required the use of lambdas in order to capture data only available on instance creation. Odds are well need to approach default data in some other way. Likely via the use of Creators, which is also where we will establish the creation of default hierarchies and attributes in Maya. Yes, this is where I think we should go.
More blue sky thoughts.
publish
that asset
from shot
5?. Our language is Project, Asset, Subset, Version and Representation. What else?copy()
and sending to a farm would become trivial.CollectInstances.data["families"]
. That will open up for new potential in hidden and misc data members, in addition to the primary API.
Goal
Implement the Rythm & Hues concept of "workareas".
https://vimeo.com/116364653
Table of Contents
Motivation
Currently, every asset is encapsulated by a single top-level directory in which both development and public files reside. That's great, as it means there is never any duplication of an asset anywhere on disk and related material is easily found.
What R&H have done however is take this concept one step further.
They've managed to encapsulate not only the asset, but also application dependencies to any task - such as rigging their tiger - into a single folder. This folder then only contains things related to rigging the tiger.
Things to note
In practice what this means is that all paths used within e.g. Maya are local to the current working directory and that shipping this directory to another computer is a mere copy/paste. References, textures and caches all reference the local working directory hence no additional logic, conversion or dependency tracking is necessary.
It also means sending a shot or asset to a farm for rendering or additional processing is dead simple.
Relationships
Here you can see that assets are actually stored inside of the work folder, in the
output/
directory. The same then goes for assets being used within a work folder. It's all local.Relationships are then tracked per workarea, as opposed to between individual assets, the workarea being the top-level component of a project.
Space Preservation
What baffled me at first was how they accomplished this without huge amount of data duplication. How can they avoid having multiple copies of the same version of their tiger model in each of the task folders that used it? How do they manage to keep track of updates of this model? This was the genius that enabled this level of specificity and it isn’t complicated.
Note that (1) all assets and shots are stored together under
workareas/
, (2) tasks are stored directly under a given asset (as opposed to under a dedicatedwork/
andpublish/
folder), (3) task areas are versioned and (4) inside each task there is aninput/
andoutput/
directory. This is where things get interesting.The
output/
contains data produced within a given workarea, such as the rig produced inRichardParker/rigging
. To avoid the aforementioned problem of data duplication, these outputs are symlinked into another workarea.Windows Example
Result
These symlinks are used both to preserve disk space, but also to maintain a physical link between what data goes into a workarea, as well as what goes out of it.
The beauty of this system is that now all data is tracked. Anything going into any asset or shot is physically tracked via a filesystem mechanism and workareas are the sole unit of work. All other benefits of our system, such as validating and guaranteeing a level of quality on output and relieving the artist from working with paths directly.
Implementation
In order for this to be made possible, a few things need to happen.
The object model remains unaffected, and the Loader operates on this so loading and publishing assets will also remain unaffected.
Directory Layout
General
Workareas versioned, appplication folders intermixed with input and output folders.
Output
Include subset.
Input
Version mapped directly to subset.
Paths
At the moment, all files are maintained via two compressed directory templates; one for input, and one for output, that vary per project.
The current available members are documented in the main documentation and included here for completeness.
{app}
str
{task}
str
{user}
str
getpass.getuser()
){root}
str
m:\f01_project
{project}
str
{silo}
str
assets
{asset}
str
Bruce
{subset}
str
modelDefault
{version}
int
1
{representation}
str
ma
For an R&H directory structure, we need three additional members along with one additional path.
{input_asset}
str
{input_subset}
str
{input_representation}
str
API
Another benefit to their layout is their workarea API.
setup()
version()
copy()
backup()
restore()
import()
register()
transfer()