Autodesk / maya-usd

A common USD (Universal Scene Description) plugin for Autodesk Maya
751 stars 199 forks source link

[MAYA-112349] Ability to hide Prims from UFE so they do not show in the outliner #1200

Open radon199 opened 3 years ago

radon199 commented 3 years ago

We use a USD proxy workflow in our layout and set dressing system. Assets contain both a render purpose sub tree and a proxy purpose subtree. We do this to allow the efficient layout of very large sets with very heavy render geometry.

It can be confusing for artists when the viewport displays a proxy mesh but the outliner shows the prims of the renderable mesh. They try and manipulate the renderable mesh while viewing the proxy, which can cause the proxy mesh to be offset from the renderable mesh, especially when the proxy is not very low poly ( but still much lower then the renderable mesh). Switching the UsdProxyShape from Proxy to Render purpose display is undesirable as scenes can be so heavy they lock up when viewing all renderable meshes.

In our current system we hide the children of render meshes with a proxy while the proxy is displayed. This means the artist can’t make a mistake and select the render mesh. We support editing the render mesh by toggling its purpose to default and hiding the proxy subtree. This allows per asset proxy visibility.

To support this workflow we would like some way to hide or stop UFE traversal so when a asset is in proxy mode the sub prims of the asset are hidden.

We are using the kind selection option var to limit selection to the asset kind which is above the proxy and render prim but this only helps with viewport selection and not outliner selection where all prims are visible.

ppt-adsk commented 3 years ago

Hi @radon199, is there a really simple cubes 'n spheres scene you could share with us, just to make the rest of the conversation easier and have something to point at? Thanks!

radon199 commented 3 years ago

Sorry for not replying. I have an example and I am just awaiting clearance. I'll add it here once I have it.

radon199 commented 3 years ago

Hey,

Attached is a zip file containing a very simple example of a layout, and an asset that uses a proxy and render mesh. UFE Prim Display Structure

To describe our system. When layout is working on a large scene they want to start by adding and moving assets as a whole. Since our assets have a "kind" at their root this works well when selection mode is set to that kind, and selecting the asset in the viewport selects the whole asset and users can switch to the manipulators and go to town.

Things start to get a little confusing for people when the user starts to drill down into the outliner and the UFE prims that make up the asset are exposed. assembly_structure As you can see there are two branches for the asset, the render and proxy branch. The proxy is not just a single mesh, it might be a far more complex asset with it's own materials if required, this is a greatly simplified example.

In our internal outliner we hide both the branches of the asset to make it easy for the artist to understand when they are viewing and manipulating an asset that is displaying a proxy. We also take over the selection and loft it up to the un-hidden parent prim, which is the root of the asset and where we want the transform edits to take place when viewing a proxy. As I said above kind selection works well until a user wants to manipulate the Prims of the renderable mesh. In our internal system we go to great lengths to abstract all that is required to switch from a single asset showing a proxy to one showing the renderable mesh. As I said in my first post we can't just switch from proxy to render display globally on the shape, it is sometimes not possible to do given the heaviness of some assets.

We are able to do most of what our internal outliner does ( ie switching from kind to prim selection, and hiding the proxy and setting the renderable mesh back to "default" so it draws even when the shape is only displaying the proxy purpose ) but we are still left with all of the prims in the Maya outliner, regardless of the proxy display status all the contents of the assets are always still visible.

Were still trying to figure out how we go from the total control of our current internal outliner, and the more open but more locked down UFE implementation, without resulting to significant modification to the UFE traversal in maya_usd, and I don't think we will want to be to only facility to be able to support these kind of workflows.

ppt-adsk commented 3 years ago

Hi @radon199 , we've discussed this internally and agree that your request makes perfect sense. Our design team will be the most likely to follow up in the short term.

womanyoyoyo-adsk commented 3 years ago

Hi @radon199,

Thanks for the attached file explaining your workflow. I think the first step to solving your problem is for us to not display certain Purposes in the Outliner. We have already done this for 'Inactive Prims' in the Display menu of the Outliner under 'Inactive Prims'. image

Would having an option underneath 'Inactive Prims' that says 'Purpose' with a submenu listing the Purposes (with checkboxes) work for you in the meantime?

The second step to solve this problem would be to have the Outliner's and Viewport's display options be synced for the user. For example a hub where a user can choose to display 'Purpose = Proxy' in both the Viewport and Outliner. Do you think this would help/accelerate your artists?

Natalia (Designer on USD)

radon199 commented 3 years ago

Hey Natalia,

Thanks for pointing out the inactive prims check, I didn’t know that existed. I think having a purpose control in the outliner would be helpful. Since we pull the render mesh back to default when editing, having renderable and proxy meshes hidden in the outliner would probably do what we want (not show sub-prims when a asset displaying proxy, shown when render is switched to default and proxy is hidden).

Linking the states would also help to keep people from getting the display statuses mixed up.

I asked Pixar about how to manage proxy states and they said that they intend to propose a way to enable the visible purpose anywhere in the prim tree, although the timeline for imaging and other aspects are longer term. I think this will further help things going forward.

https://groups.google.com/g/usd-interest/c/EC3Evv5H9-Y

wtelford commented 3 years ago

Hey @santosg87, Can you please update the title to reflect our internal Jira ticket and then move this in to the github scheduled column?

womanyoyoyo-adsk commented 3 years ago

Hi @radon199,

See attached design. Purpose display is still in the Attribute Editor under 'Stage Display' but I've added a new option in the Outliner's Display menu called 'Sync Purpose with Stage Display'. When this option is checked the Outliner would only display prims that have been checked in the Stage Display section of the Attribute Editor.

Would this design work for your artists?

purposeInOutliner

radon199 commented 3 years ago

Hey @womanyoyoyo-adsk,

That seems like a good option, and should clear up any confusion around what subtree comes from what purpose. Thanks.

My only question is about backwards compatibility with Maya2020 which I do not think has the Outliner USD options. Would there be a way for us to preset those settings or control it via a script without it being visible in the outliner?

womanyoyoyo-adsk commented 3 years ago

Hey @radon199 ,

I'm glad the design is clear. When this design above goes into development it will not be supported in Maya 2020. Maya 2020/UFE v1 doesn't have the functionality to preset these settings or control it via a script. We added these capabilities in Maya 2022/UFE v2. Feel free to open another issue with this request and my team can assess it.

spiffmon commented 2 years ago

Just came across this bug, and wanted to ask if the current design addresses the "render and proxy representations getting out of sync" problem that @radon199 mentioned at the outset? That's one of the problems for which the proxyPrim relationship exists, i.e. when someone is manipulating a render prim, the aware DCC can apply the same transformation to the identified proxy prim.

It requires extra authoring in the assets, of course. And I do think that browser/outliner filtering by purpose is a great and useful feature, as well!

maya-usd-git-sync[bot] commented 8 months ago

Issue synced internally to EMSUSD-647