Override the shading of your objects

You can override the shading of your objects in two ways:

This functionality is applicable to both Maya shaders and 3rd party shaders.

Create a collection of shaders

To override an attribute of the shader; for example, an attribute value or a connection, you must first create a collection of shaders. You can do this in one of three ways:

  1. Declare an expression that encompasses the shaders that you want to include.

    See To add members via an expression.

  2. Select the shaders from the Outliner or Hypershade and click Add in the Property Editor. You can also drag and drop from these editors to the Property Editor.
  3. Select the group or parent node, then enable Include Hierarchy, then use the Shaders collection filter.

    Add collection members by node type.

Identify shaders assigned to each object in the scene

Display the shader assigned to each object in the scene by enabling the Display > Assigned Materials option in the Outliner (Window > Outliner).

If your object involves per-face shader assignments, then all shaders assigned to the object are listed, and grouped under the heading Materials. See Identify shaders assigned to each object in the scene.

Tip:

You can also identify shaders that are members of your collection by enabling the Render Setup Filter in the Outliner. See Filter and display only render setup members in the Outliner.

Example applications

Override the material assigned to your objects

If you have a scene with three windows, you can add all three windows dynamically to the same collection using an expression. For example, if all of your windows have the letters window in their names, you can use the expression *window* to include them in your collection. Then you can create a material override on the collection to override the original material with a new material. See Override the material applied to the objects in a collection.

Now if you add a new building to your scene, as long as its windows also have the letters window in their name, the expression can be reapplied so that the new windows are included in the collection and the material override applied. See Dynamically update your render setup when your scene updates.

Tip: This eliminates the need for you to apply your new material to each of the new windows individually.

Override an attribute of the shader

Example 1:

If you have a scene with 100 objects, each with a different shader applied, and you need to make each of the shaders 10% brighter, you can do as follows:

  1. Create a collection and use expressions to include shaders in your collection.

    For example, if your shaders are named lizard1_skin, lizard2_skin, and so forth, you can use the expression lizard*_skin to include all the lizard skin shaders in your collection.

  2. Override the Incandescence attribute.

    Select the collection, then select Relative from the Add Override drop-down list, and middle-mouse drag and drop the attribute Incandescence from any of the shaders to the Property Editor.

    When you adjust the Incandescence attribute in the Property Editor, all of the shaders included in your collection become brighter.

  3. Tip:

    This eliminates the need for you to adjust each shader individually.

Example 2:

If you have 100 characters in your scene, and the characters are all wearing t-shirts that are assigned to different shaders, but you want to map all of these t-shirts to a new texture, you can do as follows:

  1. Create a collection and use expressions to include shaders in your collection. For example, if your shaders are named char1_shirt, char2_shirt, and so forth, you can use the expression char*_shirt to include all the t-shirt shaders in your collection.

  2. Override the Color attribute. Create a Connection Override for the collection and middle-mouse drag and drop the attribute Color from any of the shaders to the Property Editor.

    Click the button beside the Override attribute in the Property Editor to connect to a new texture.

    For more information about connection overrides, see Override an attribute connection on your surface shader.