Edit global Material

we have a material that we are using throughout multiple usda instances within the same scene. is it possible to modify (and if how) the material so it will change for all of the instances? so far we tried to modify it in the scene but it seems to only change the local material instance.

thanks. matthias

Hi @helmreich! I need to reach out to the development team to help me answer your question. I will post back here when I have more information. Thanks for reaching out to us!

Hi @helmreich
Attached is a sample scene for you to look at.

Whether your are referencing or instancing a USD file, global changes to a material can be done one of 2 ways.

You can either
a) modify the referenced or instance file directly
b) modify the MDL source material.

In example a, try making changes to the blue.material.usda
#color3f inputs:diffuse_color_constant = (0.09035236, 0.0903907, 1.0)
color3f inputs:diffuse_color_constant = (1.0, 0.0903907, 0.08565401)

In example b, try making changes to the source code blue_material.mdl
//color diffuse_color_constant = color(0.0f, 0.0f, 1.0f)
color diffuse_color_constant = color(1.0f, 1.0f, 0.0f)

The 2 examples are similar in that they both result in global changes to any scene that is loading the USD or loading the MDL. But they’re different in that the later operates at much more fundamental level. Complete changes can be made at the MDL level. And potentially in such a way that the USD that sources the MDL can be no longer valid. You can for example complete re-define the material parameter interface, and any USD file would not know what those changes are.

The former is a bit more protected in that the MDL material stays in tact. And only parameter changes at the USD level are permitted.
Material_Referencing_Instancing.zip (12.9 KB)

Hi @fpliu , thank you for the file and explanation. Our issue is a bit different - we have geometry that we have in multiple instances in the file (file example attached with 1 instance per geometry - in the final version we have some hundreds). they consist of 4 materials and we would like to change these in the final scene for all the hundreds of instances at once. is there a way
link to file:

Not too sure if this is what you are looking for to my understanding but for me I would setup my material and save them as individual USD in my library and these are imported/added as payload to the Main world USD to use as textures (This is just a workflow suggestion as I find myself keep having to set the same materials setup over and over and doing it this way I have a master base material I can use and also tweak without affecting the master material, this has nothing much to do with what you are looking for here).

Ok for the instancing and being able to change all instances in one fell swoop, the solution is to use group (select all the same instances and group them.) Once group you will be able to set the material on the group(under Strength set it to Stronger than …) and it will affect all instances in the group. Screenshot below if its helps.