Stage Manager Materials

   2148   2   1
User Avatar
Member
16 posts
Joined: Feb. 2017
Offline
So... I have already figured out that in order to get the imported usd to show up with materials when importing with stage manager they can`t be at the root level of the usd asset but instead they have to be "parented" to a main node.So that eliminates the possibility off all materials of the scene to be at a /materials base folder when importing with stage manager.

I mean with the file lop it get`s imported with the /materials while in stage import i only get the geometry top level node without the materials.

Is that how it is supposed to work?It`s a bit irritating to have to re-export the usd with the materials underneath it.

Thanks in advance.
Edited by nisgia7 - June 21, 2021 09:02:49
User Avatar
Staff
4442 posts
Joined: July 2005
Offline
You might want to investigate the inherit and specialize composition arcs as a way to let you have a /materials from which all assets grab their materials (or at least a common location from which you can override the materials used by each asset). But even if you do decide to make use of inherit/specialize to provide a central material definition location, you will still need to reorganize your assets so that the geo and mats for the asset live under a common root prim. Note that this isn't an issue with the Stage Manager specifically, but with USD references (which is how the Stage Manager brings assets into the scene). It requires some advance planning, but using this organization means that you can always load your asset into any scene at any location, and always have access in the scene graph to the materials to customize them.

If you really want to have a common /materials branch where all materials for all assets are defined, the only other option is to have the material binding done as part of the scene rather than as part of each asset. Which may not be as bad as it sounds if you can describe the bindings using custom attributes on the assets, then have a LOP node (VEX or python probably) which translates those custom attributes into material bindings after the scene is assembled. Obviously there are big downsides to this approach, but it can minimize the number of materials you have to define, and simplify the final scene structure.
User Avatar
Member
16 posts
Joined: Feb. 2017
Offline
Thanks for the reply.
I couldn`t find any tutorial on a proper way to use inherits and specializes.
I figured out the inherit part, but not the specializes. That`s why I post a hip file to make it easier for anyone that can point out the correct usage.

Also I tried to add the * at the end to change all primitives underneath the "grp" transform but that doesn`t seem to work.

So my new question is what if I want to replace every item in a collection that gets instanced with an updated material?
Do I have to create many single (reference)inherit nodes?

I also tried to set the grp as a destination prim but the children prims(cone cube sphere)didn`t inherit the referenced prim.

In another scene I got some assets created with pdg and every asset got a reference to the same set of materials.

P.E.
I got TreeAsset1-TreeAsset2 and so on. From what i understand there shouldn`t be a problem as each asset references the same material but with no additional memory cost, right?

Thanks again!

Attachments:
usdInherit.hipnc (125.7 KB)

  • Quick Links