This page provides information on the V-Ray Ray Switch Map.
The VRayRaySwitch is a utility texture that can return different colors or textures when a surface is sampled by different rays i.e. GI, reflection, refraction etc. For example, this allows for a material where the diffuse is one color when viewed directly from the camera and another color when viewed through a reflection.
The example on the right uses VRayRaySwitch on the grey ball to make it render Red when it comes to Global Illumination, Blue when it's seen in Reflections, and Yellow through Refractions.
This is similar to Extra V-Ray Material Overrides Attributes, but on a texture level instead of at the shader level. Also, it doesn't matter where the Ray Switch is plugged in to the main material, unless you're adjusting the texture for Shadow rays. It it commonly connected to the Diffuse Color channel so it's easy to find and adjust later.
||Hypershade|| > Create panel > VRay section > 2D Textures > VRay Ray Switch
||Create Render Node|| > VRay section > 2D Textures > VRay Ray Switch
Default texture – Specifies the texture for when the surface is sampled by camera rays (i.e. when the surface is directly visible to the camera). If connected to the Diffuse Color of the material, whatever is connected to this parameter, renders as that value.
Shadow rays texture – Specifies the texture for when the surface is sampled by shadow rays. Note: To see this effect in your renders, the Ray Switch must be connected to the Opacity Map channel of your material.
GI rays texture – Specifies the texture for when the surface is sampled by global illumination rays.
Reflection rays texture – Specifies the texture for when the surface is sampled by reflection rays.
Refraction rays texture – Specifies the texture for when the surface is sampled by refraction rays.
The V-Ray Ray Switch Texture has many ways that it can be used. Below are a few examples.
A complex texture can be replaced with a simpler one for GI/reflections.
Standard GI calculation: 399067044 GI rays (623.54 per pixel)
Render time: 4 min. 28.6 sec.
GI calculation with simple color in Ray Switch: 346604148 GI rays (541.57 per pixel)
Render time: 3 min. 53.4 sec.
For artistic purposes you can make the object appear differently in its GI, reflections, or refractions, from its diffuse texture.
GI rays texture set to Red
Reflection rays texture set to Blue
Refraction rays texture set to Yellow