Switch

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

CONFIGURATION

This shader consists of several inputs for available textures, a selector input determining the texture to choose as an output.
 
Crowd Switch Shader 3Delight 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.
Renderman Code Attributes These parameters should not be modified, they are the source code enabling the shaders to build its parameter list and run in 3Delight
 
The Switch Shader for 3Delight 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 3Delight 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 3Delight