Collections are a context sensitive shader and attribute assignment strategy, the context being defined by a Render Pass. When 3Delight for Maya sends an object for rendering, it goes through the following steps to decide what shader to use (same decision path is followed for attributes):
Collections are a powerful tool in multi-pass rendering. Say that you have a specular and a diffuse pass, in the specular pass you want to use a Phong shader and in the diffuse pass you want to perform some “ambient occlusion”. You can achieve this by following these steps:
Create two collections, one ‘specular’ and one ‘diffuse’. Collections can be created by clicking on the “texture square” near the "Collections" line in the assignment panel (first line in the panel, left hand side).
Using the assignment panel, assign a specular shader (such as ‘metal’) to your object in the ‘specular’ collection and attach some ambient occlusion shader in the ‘diffuse’ collection.
Rendering the first pass will give you the specular highlights and rendering the second pass gives you the ambient occlusion. This working scheme frees you from writing big shaders with built-in context sensitive code (which often gets messy) and encourages you to write re-usable, simpler shaders.