You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

This page includes details on the Switch utility material in V-Ray.


Page Contents ×


VRaySwitchMtl can be used to switch between different materials based on a value sampled from a texture.


UI Paths



||Hypershade|| > Create panel > VRay section > VRay Switch Mtl

||Create Render Node window|| > VRay section > VRay Switch Mtl


||V-Ray Shelf|| > Right-click to Create V-Ray Materials button > VRay Switch Mtl







Switch – The texture which is sampled to switch between the assigned materials

Material 0 - Material 9 – 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 texture, or the Switch value when no texture is specified. When no material is linked to the current value, the geometry will not have valid shading and will not be visible in the render.


VRaySwitchMtl 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 VRaySwitchMtl.

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.

VRaySwitchMtl is very powerful when used with VRayUserScalar texture that enables switching sub-materials to be applied based on geometry specifics and not just a single animatable value.