Switch

The Crowd Switch Shader for Arnold enables to select a specific shader based on an input value.
 
It can be created using the following methods:
  • Hypershade: Arnold / Shaders / CrowdSwitchShaderArnold
  • MEL command: createNode CrowdSwitchShaderArnold;

Configuration

This shader consists of several inputs for available shaders or textures, a selector input determining the shader to choose an output color.
 
Crowd Switch Shader for Arnold attributes
 
Selector the input value determining which shader will be used. It is usually linked to a value changing for each character (see here), hence creating the diversity.
Start Offset a value substracted from the selector value when choosing the shader. It is used to create chains of Switch Shaders when more than 10 textures are needed.
Default the default shader to use if no shader correspond to the (Selector - Start Offset) value.
Shader 0 to Shader 9

shaders corresponding to each (Selector - Start Offset) value.

 
The Switch Shader for Arnold node also expose an output value which is the value computed by the selected shader.
 
The Switch Shader for Arnold should be used to feed the color of the model surface shader (here a simple gray blinn shader) so that it will modify its color (or any parameter you want to modify)
 
Some of the shaders inputs of the Switch Shader for Arnold should be linked to textures (or anything capable of feeding in a color). In the example below, we want to achieve hair color diversity so we link a blond and a brown one texture.
 
Typical usage of a Crowd Switch Mental Ray Shader