V-Ray Switch Material node can be used to switch between different materials based on a value sampled from a texture.
Switch Material doesn't have a default material. If the switch value points to an empty (undefined) material slot, the resulting shading will use the first valid material (the one with the lowest switch value) specified in the V-Ray Switch Material.
If you wish to disable the material preview or adjust its quality to save processing power, you can do so from the Material Node.
Column
width
5%3%
Column
width
40%
47%
Image Added
Click on the image to view it in full size
Materials
...
Section
Column
width
55%
Switch Texture– The texture which is sampled to switch between the assigned materials. Materials used are based on the value of the switch texture.
Values are defined by the assignedSwitchtexture, or the Switch value when no texture is specified. When no material is linked to the current value, the geometry doesn't have valid shading and is not visible in the render.
Round Mode– Determines how to round the switch value.
When Round Nearest is selected, the switch range is taken as follows:
Code Block
ID(x) = [x - 0.5, x + 0.49]
For example, a list of 3 materials will have the following range: Material 1 with ID 1 is assigned for values 0.5 - 1.49; Material 2 with ID 2 is assigned for values 1.5 - 2.49; Material 3 with ID 3 is assigned for values 2.5 - 3.49.
When Round Down is selected, the switch range is taken as follows:
Code Block
ID(x) = [x, x + 0.99]
For example, a list of 3 materials will have the following range: Material 1 with ID 1 is assigned for values 1.0 - 1.99; Material 2 with ID 2 is assigned for values 2.0 - 2.99; Material 3 with ID 3 is assigned for values 3.0 - 3.99.
Loop Materials– If the switch value is out of range, V-Ray goes to the next available material assigned, skipping empty slots and looping from the beginning.
You can add or remove materials from the list by using the Add and Clear buttons.
MATERIAL
Enabled – Select whether the material is used when V-Ray goes through the list.
Move Up– Moves the material with one position up in the list.
Move Down– Moves the material with one position down in the list.
Remove– Removes only the selected material.
ID – Specifies an ID for the switch. This is the value used to loop the texture through the list of materials. See how V-Ray assigns this value based on the Round Mode above.