This page includes details on the Switch utility material in V-Ray.
Overview
VRaySwitchMtl can be used to switch between different materials based on a value sampled from a texture.
Parameters
Switch – The texture which is sampled to switch between the assigned materials.
No Map – Assigns a texture map to the Switch material.
Material 1 - Material 10 – Materials to be used based on the value of the the switch texture.
Material 0 is assigned for values 0 - 0.499
Material 1 is assigned for values 0.5 - 1.499
Material 2 is assigned for values 1.5 - 2.499
Material 3 is assigned for values 2.5 - 3.499
Material 4 is assigned for values 3.5 - 4.499
Material 5 is assigned for values 4.5 - 5.499
Material 6 is assigned for values 5.5 - 6.499
Material 7 is assigned for values 6.5 - 7.499
Material 8 is assigned for values 7.5 - 8.499
Material 9 is assigned for values 8.5 and larger.
Values are defined by the assigned Switch map, or the Switch field when no map is specified. When no material is linked to the current value the geometry doesn't have a valid shading so it won't be visible in the render.
The VRaySwitchMtl doesn't have a default material. If the switch value points to an empty (undefined) material slot the result shading will use the first valid material (the one with the lowest switch value) specified in the VRaySwitchMtl.
Notes
- VRaySwitchMtl is very powerful when used with the VRayUserScalar texture to enable switching sub-materials to be applied based on object's user defined attributes. Check the Using Custom Attributes to Match Proxy and Material tutorial for further information.