Skip to main content

Maya USD: Rig in USD Asset as MayaReference prim

Working within a USD Pipeline usually means you want your animation output for e.g. a rig to be overlaid on top of a loaded USD Asset to merge the animated point data with the model and look of the asset, usually for use by downstream lighting department.

The USD reference usually provides:

- asset (referenced usd asset)
  - geo
  - mtl

The output data from a rig should then be overlaid over the /asset/geo path in the shot to move the character around.

Currently, publishing an animation from a rig usually means completely separate Alembic or USD data that would need to somehow be identified to get overlaid over a particular USD asset structure in a shot.

What if we could load an asset, and it itself, has a reference to the rig embedded?

How would you imagine the implementation of the feature?

Maya USD allows to embed maya scene files (mayaAscii or mayaBinary) to be included into USD as a MayaReference prim referencing the file. When a Maya USD Proxy finds such a prim it can enable the prim as a regular maya reference to load the native maya data, like for example a rig file.

I'd like to propose to - whenever publishing a rig from Maya to write out a USD Asset Contribution where an extra layer gets added to the USD asset representing the rig as a reference.

Basically someone (e.g. either in Maya or Houdini) lays out assets in a scene, by loading the asset USD. If that asset now contains the MayaReference prim (which can be loaded fine in Houdini; just the internal data of the maya scene couldn't be loaded) then in Maya one could now enable that reference inside the USD Asset to load the actual rig.

So assets laid out in any USD supporting host could in Maya be switched to their rig for animating. Nice!

In essence we'd need:

  1. On publishing a Maya rig, create a USD asset contribution that references in this rig version in a USD layer

  2. On Maya, when the Maya USD reference rig is loaded (and its detected its loaded within USD asset) then publish the animation cache as USD that gets added as a variant on the loaded asset in the shot's anim layer.

That way, the animator in Maya can just read a USD Layout with loaded assets, enable the reference, animate and publish.

Plus side to this would be, that when they've published their animation to the shot's layers they can also disable their reference and switch it over it to the published cache (since it's also a USD contribution). Meaning they can use the cached USD data as proxy in their scene whilst maybe e.g. continuing to animate on another character.

Originally posted on GitHub: AY-6685_Maya USD: Rig in USD Asset as MayaReference prim #10

Affects
6801205acc01335d8a6f4a26
1 comment

Log in to comment and vote

Comments1

  • Paul Baaske

    I like the idea in principle but a few things to consider:

    • usually, the asset is an input to the rig, with the rig deforming or transforming parts or the whole of the asset. Adding the rig to the asset as a reference can introduce race conditions. I’ve seen it work with asset-resolver, but that makes it complicated as a baseline.

    • IMHO the Maya workflow is flawed, as a rig’s structure does not necessarily match the source geo. A rig might have all kinds of extra groups etc and you can’t just replace a usd prim with a Maya-rig and expect partity.

    • A rig might produce different outputs, be it transforms-only, skeletons, geo, … that are referenced back into the usd-stage with custom logic - and might need post-processing. Another reason why the ‘direct swap to Maya rig’ in Maya is of mixed value

    • I found the outliner/mixing of Maya and usd data model make make unstable

    My preferred route would be

    • a database way to track a relationship of ‘this asset was used to make this rig’

    • a way to return potential rigs for a given prim via the DB - e.g. for each asset with asset.Info in usdStage, lookup available rigs, and load it into the scene outside the usd structure. So load a rig, hide the source-prim that triggered the rig, but also remember for loaded rig which source prim triggered it (so you can cache 10 cars and they find the right primPath for each)

    • a way to mark what to cache for each rig, e.g. through output sets inside the rig. Future flexibility to decide whether to cache points, UVs, transform-only,… per set

    • a post-processing layer to both process the cache (e.g. Maya introduces all kinds of things you may want to strip, change ‘defs’ to ‘overs’ etc), as well as a ‘anim layer logic’ to reference the caches back to the source prims as required.

    TLDR - I think Maya rigs should stay out of the usd-stage, and we should rather rely on AYON to track a relationship than usd.