Ray Switch


The Ray Switch node allows for different shading results on a surface, based upon the type of ray being evaluated and the direction of a given face, either front or back (figure 1). This node can be used to remove unwanted reflections from inside-facing polygons, for example, or place a different material in the refracted areas of a surface.


Figure 1: The Ray Switch node used to control the shadow visibility using greyscale values from an RGB Spectrum node


Ray Switch Parameters

Camera Ray - Determines the visibility of the object within the image itself. Reflections of the object will still be visible, as will shadows, and AO. If applied to the DiffuseAmount of diffusion, or the reflection of light photons at different angles from an uneven or granular surface. Used for dull, non-reflecting materials or mesh emitters. channel, the material range will be black (0) to white (1). If color is desired, multiply the color by the node output, and then route the result to the diffuse pin of the material.

Shadow Ray - The shadow ray slider affects the visibility of the shadow cast from the object, when the Ray Switch node is connected to a material's Opacity pin. This slider has no effect when connected to other material channels.

Diffuse Ray - If the material has a diffuse component, it can be modulated with this slider. SpecularAmount of specular reflection, or the mirror-like reflection of light photons at the same angle. Used for transparent materials such as glass and water. or Metallic materials will see no effect.

Reflection Ray - Reflections from the object can be attenuated via the value slider or a suitable texture. The range would be the normal reflection (1) of the surface down to a black object reflected, as opposed to the object being invisible in the reflection.

Refraction Ray - Refractions in the material can be attenuated via this slider.

AO Ray - Any ambient occlusion contained in the shading will be attenuated by this value. This effect does not apply to the AO Render Pass.

Photon Ray - Provides an input to add a texture map to the areas where photon rays are traced.