how to assign to groups rather than Xforms in Solaris

   15814   46   6
User Avatar
Member
260 posts
Joined: Nov. 2014
Offline
thank you
as later assignments overwrite previous ones
that's exactly what i have the biggest issue with. As you will have one object living in several materials without actually knowing it. So you will reassign object to materialA, you will wonder why its not working and then you realize that some other material down the line is actually overwriting it. and then you might realize that there is actually another material that overwrites it again. with 150 materials, its impossible to fix those without lot of effort.
Which makes it nightmare to work with, thus why i want to create unique groups/collections/what ever that does take care of this duplicity. If it makes sense
User Avatar
Member
7770 posts
Joined: Sept. 2011
Offline
I'm not sure what you mean. The last node to assign the material is the one that wins. Sounds more like you don't want to use groups or collections to assign materials, since they can contain overlaps leading to what you describe. Assigning only to explicit paths would prevent that situation.
User Avatar
Member
260 posts
Joined: Nov. 2014
Offline
Groups and collections can have overlaps, that's why i have build my custom node that creates groups and takes care of duplicity (and i want to build same tool in LOPs operating on collections (or what ever i decide to be suitable)).

with materials where the last one wins, look at my example.

In first step i assigned Bucket being blue and Rope being green and Screw being red.
In next step i realized that my assignment is wrong and that Bucket needs to be Red as well, so i do drag and drop my Bucked onto red, but it will still render blue. I have to also go and manually remove it from blue assignment. On lot of materials, this is impossible to do.
Edited by martinkindl83 - Nov. 11, 2020 21:20:50

Attachments:
assignmaterial2.png (55.5 KB)

User Avatar
Member
260 posts
Joined: Nov. 2014
Offline
Best how to describe the workflow im after is ShadingGroups in Maya (Im not maya person, but its easier to explain). ShadingGroup represents material, and one object cant live in multiple ShadingGroups.

So i create my shadingGroups (red, green, metal) and then i start drag and dropping objects onto those groups in Outliner.
Based on in which shadingGroup the objects is, it will get material. If i decide that objectA should not be red, but metal, i simply drag and drop it from Outliner to shadingGroup metal and it will have metal material, even though it was red before.
User Avatar
Member
7770 posts
Joined: Sept. 2011
Offline
martinkindl83
In first step i assigned Bucket being blue and Rope being green and Screw being red.
In next step i realized that my assignment is wrong and that Bucket needs to be Red as well, so i do drag and drop my Bucked onto red, but it will still render blue. I have to also go and manually remove it from blue assignment. On lot of materials, this is impossible to do.

Create a new node when changing the assignment. This will eliminate the need to edit multiple assignments just to change one.
User Avatar
Member
7770 posts
Joined: Sept. 2011
Offline
martinkindl83
Best how to describe the workflow im after is ShadingGroups in Maya (Im not maya person, but its easier to explain). ShadingGroup represents material, and one object cant live in multiple ShadingGroups.

That's exactly the same as material assignments in USD. A prim cannot have more than one assignment.
User Avatar
Member
260 posts
Joined: Nov. 2014
Offline
sorry, but thats even worse in my opinion
as then you will not just to have dig through all the material tabs on one node, but even through multiple material nodes.

I know its possible, but to me it creates even bigger mess to work with. As you will not be fixing the problem, where it occurs (material node it self), but rather create bunch of overrides to hide the problem. Thats my opinion, in no means im not saying your suggested workflow is bad and mine is good, to be clear.
User Avatar
Member
7770 posts
Joined: Sept. 2011
Offline
It makes sense for edits to be enumerated rather than trying to find what you did upstream and figure out what needs to also be changed on the node for the change to work. Using a separate node for edits also gives the opportunity for writing notes about what was changed.

Adding another entry at the bottom of the same material assign also works as it takes precedence over the higher entries. If I had dozens of assignments on the same node, I wouldn't want to try to track down which entry contained what widget if it's faster to add an entry to the bottom or create a new node. The end result is what matters, not the list of edits.
User Avatar
Member
260 posts
Joined: Nov. 2014
Offline
I do fully understand what and why you are doing it. It has its own logic.
Just have to get my head around if thats something i would be comfortable with or not.
User Avatar
Member
260 posts
Joined: Nov. 2014
Offline
also how does it affect speed?
if i will have 5000 assets, each having 50 “overrides” to fix bad material assignments in the scene, compared to 5000assets with just one correctly done material assignment?
User Avatar
Staff
1448 posts
Joined: July 2005
Offline
Another potential workflow is to use an attribute on a primitive to determine the material. See attached example.

Attachments:
partition_mat_assign.hip (90.8 KB)

User Avatar
Member
621 posts
Joined: Nov. 2013
Offline
martinkindl83
In first step i assigned Bucket being blue and Rope being green and Screw being red.
In next step i realized that my assignment is wrong and that Bucket needs to be Red as well, so i do drag and drop my Bucked onto red, but it will still render blue. I have to also go and manually remove it from blue assignment. On lot of materials, this is impossible to do.


You could drag material from the scene graph and drop to prim in the viewport. Drag/drop to viewport can keep material assignment only once.

But I can't find a method to drop to multiple prims at one time.
Edited by jerry7 - Nov. 12, 2020 19:48:33
User Avatar
Member
260 posts
Joined: Nov. 2014
Offline
rafal
Another potential workflow is to use an attribute on a primitive to determine the material. See attached example.
ahh, i completely forgot about this. I was investigating attributes before i went with groups when at SOP level.
Good point.
User Avatar
Member
260 posts
Joined: Nov. 2014
Offline
rafal
Another potential workflow is to use an attribute on a primitive to determine the material. See attached example.
One question from complete different field.
What would be the best equivalent to geometry spreadsheet in LOPs?

If i would want to inspect material on your instances, i would check geometry spreadsheet and i would see all the values on all prims.
I havent found a simple solution to do the same check in Lops.
I only found: select all the instances in the Composed Scene Graph (not very handy to be forced to select them) and then Scene Graph Details and change it to List View.

M
User Avatar
Staff
1448 posts
Joined: July 2005
Offline
Scene Graph Details in LOPs roughly corresponds to the geometry spreadsheet in SOPs, so I think you are on the right track.

One suggestion for selecting prims in the Scene Graph Tree: at the bottom of the tree there are two collapsed UI gadgets: filter and selection rules. You can use these to search for your instances to make the selection easier.
User Avatar
Member
260 posts
Joined: Nov. 2014
Offline
rafal
Scene Graph Details in LOPs roughly corresponds to the geometry spreadsheet in SOPs, so I think you are on the right track.

One suggestion for selecting prims in the Scene Graph Tree: at the bottom of the tree there are two collapsed UI gadgets: filter and selection rules. You can use these to search for your instances to make the selection easier.

Thank you, thats super handy.
User Avatar
Member
859 posts
Joined: Oct. 2008
Offline
rafal
Another potential workflow is to use an attribute on a primitive to determine the material. See attached example.

This is what I'm looking for. How would I just pick up materialpaths from an s@shop_materialpath attribute that already exists on the geo?
--
Jobless
User Avatar
Member
260 posts
Joined: Nov. 2014
Offline
Get the file above. It has it as one of the exapmles I believe.
User Avatar
Member
859 posts
Joined: Oct. 2008
Offline
martinkindl83
Get the file above. It has it as one of the exapmles I believe.

Yes, but it hardcodes the material paths like so:

if( s@foo == "a" )
    return "/materials/green";
else if( s@foo == "b" )
    return "/materials/blue";
else 
    return "/materials/red";

But I want to do something like

return s@shop_materialpath;

Where s@shop_materialpath is an attribute on the geo itself. I don't really get LODs yet. It only considers usd attributes that exist on usd prims, right? It seems like there should be a simple way to grab the paths from geometry prim attributes. I'm sure there's just a tickbox somewhere but I can't for the life of me figure it out.
--
Jobless
User Avatar
Member
7770 posts
Joined: Sept. 2011
Offline
Soothsayer
Where s@shop_materialpath is an attribute on the geo itself. I don't really get LODs yet. It only considers usd attributes that exist on usd prims, right? It seems like there should be a simple way to grab the paths from geometry prim attributes. I'm sure there's just a tickbox somewhere but I can't for the life of me figure it out.

shop_material path is unlikely to point to a usd location, unless it's been constructed manually in sops with hypothetical usd locations in mind.

A more plausible use would be to take the shop_materialpath attribute and manipulate the string to get at part of the path, and then concatenate this with a usd location containing one or more materials.
  • Quick Links