Switch

The Crowd Switch Shader for V- Ray enables to select a specific shader based on an input value.
 
It can be created using the following methods:
  • Hypershade: Maya / Utilities / CrowdSwitchShaderVRay
  • MEL command: createNode CrowdSwitchShaderVRay;

CONFIGURATION

This shader consists of several inputs for available textures, a selector input determining the texture to choose as an output.
 
Crowd Switch Shader V-Ray 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 V-Ray node also expose an output value which is the value computed by the selected shader.
 

Link with the Model and Asset Manager

The Switch Shader for VRay 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 VRay 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 Shader V-Ray