A set in Maya is a collection of objects or components (for example, geometry objects or lights). Grouping objects into sets allow you to make certain changes to multiple objects at once.
MtoA can use Maya sets to apply Arnold rendering overrides to the objects inside. This allows you to override any attributes of the objects that are members of the set, which means you can affect a lot of objects without changing the properties individually.
Multiple Override Sets that use the same node to get different results is not supported in MtoA. This kind of situation should be avoided otherwise you may end up with unpredictable results.
Suppose you want to create an ambient occlusion render layer that contains only the shadow of a car. Using override sets, you just need to:
- Select all of the car geometry that you want hidden.
- Create an override set with Primary Visibility disabled for the geometry.
- Assign an Ambient Occlusion shader to the floor.
To use override sets, create a set in Maya as a collection of objects, then select the set in the Outliner:
Then, bring up the Attribute Editor, open the Arnold tab, ensure that Ai Override is enabled, and click Add.
You will then see a window with a (long) list of the attributes that are possible to override.
Note, the Add Override Attribute window may be slow to invoke whenever the set includes many objects. In some cases, it can take a good minute or so for the override attribute window to show up. This is because it has to check hundreds of attributes against the selected objects. Therefore the more objects are selected, the slower it will become.
One recommended workaround is:
- Create a set with only one object inside it.
- Use the Add Override Attribute and add the attributes you need to it.
- Add the rest of the objects to the set.
Search field enables filtering of attributes
There are a lot of attributes that you can choose from! Select those that you require (you can choose multiple attributes if you wish) and click 'Add'.
There is a text field at the top which enables you to filter the attribute that you require. It supports all of the features of regular expressions (using the Re Python library).
For example, if you want the filter to ignore caps type (?i) before the query:
You can also remove attributes from the override set by clicking on the Remove button on the Attribute Editor.
It's also possible to nest sets. An override set will override attributes on any set it contains, which will, in turn, override attributes on the sub-set's content. This can be a very useful feature, enabling you to turn on and off various features in different sub-sets as you see fit.
The following two sub-topics present two examples of using override sets: