BigRoy
14 November 2023 12:10
21
Also a quick Blender test:
Had to do this in a temporary branch to merge both the USD branch with the draft for the New Publisher in Blender - anyway, that test branch is here: enhancement/blender_usd
2 Likes
The feature request in the post has been added by this PR.
Many many thanks to @BigRoy
ynput:develop
← BigRoy:feature/maya_usd_native_support
opened 04:03PM - 05 Sep 23 UTC
## Changelog Description
Implement Creator and Loaders for extraction and loa… ding of USD files using Maya's own `mayaUsdPlugin`.
Also adds support to load a `usd` file into an Arnold Standin (`aiStandin`) and assigning looks to it.
## Additional info
This now lives alongside the Multiverse implementation. You can decide to either create a MayaUSD instance or a Multiverse instance. Both will publish a `usd` family result (product-type) but during publishing it will also have the family specific to that creator type to choose the right extractor (and potentially validations) which are `mayaUsd` and `mvUsd`.
- **Added dedicated CollectUserDefinedAttributes plug-in**: Moved collecting of user defined attributes into a separate collector for re-use; so CollectPointcache and CollectAnimation no longer collect user defined attributes in that plugin itself.
- **Added support to assign looks to Arnold `aiStandin` with usd files:** Allow assigning looks by `cbId` user properties in the loaded usd file similar to how it's supported for Alembic files in `aiStandin`.
- Note: For this to currently work the transform and shape should *not* be merged into a single Prim inside USD because otherwise the unique `cbId` between Transform and Shape node will be lost.
- The attributes are expected to be named: `userProperties:cbId`
- **Added support for `jobContext` flag for the exporter in the publisher**: Using the job context you can use any of maya usd plugin's job context presets, like **Arnold** to do the export with that context's preset arguments to e.g. produce a valid Arnold-renderable USD file. With Arnold context set you can just export your scene as USD file and have it correctly render across any USD host supporting Arnold hydra delegate. ❤️
- **Added custom 'export attributes' context manager**: The USD exporter only includes metadata (custom attributes) if they are marked as metadata attribute in a `USD_UserExportedAttributesJson` attribute on the Maya DAG node. With this context manager we can, similar to how Alembic export supports it, specify `attrs` and `attr_prefixes` to be exported with your USD data as metadata (usually `userProperties` unless you specify an explicit mapping).
## Testing notes:
1. Launch Maya
2. Create USD instance
3. Publish USD
4. Load USD in Maya
BigRoy
30 January 2024 18:43
24
Just wanted to add to this that using variants for LODs isn’t necessarily the best USD use case of variants because Variant selections can’t be animated over time and as such, if an objects moves closer or further away you can’t technically animate the LOD unless say you’d write a USD file per frame and render that instead.
2 Likes