Ray Switch

 

This shader makes it possible to evaluate different shader trees per ray. This decreases the shading complexity of a scene and thus the render times, and increases artistic control. It can be used to remove unnecessary secondary rays (specular/sss), make speculars even more glossy in specular rays, control the color of opacity in shadow rays to fake light scattering through tissue or add a second specular lobe in-camera rays only.

For an example of how the Ai Rayswitch node can be helpful, see the reducing noise (although note that the precise method described there would not be necessary if you use the Ai Skydome light instead of the Ai Sky).

Camera

Plug the output of the shader you wish to use when calculating camera rays here. 

Red Standard Surface shader connected to 'Camera' attribute of ray_switch_shader

Shadow

The shader evaluation that happens for transparent shadows on objects. A use for this parameter could be to connect a ray_switch shader to the opacity parameter of a standard_surface shader. That way you can get a shadow that's different than the actual transparency of the object. For example, to reduce the amount of shadow cast by the object, or to use a different cutout opacity pattern.

Body object's standard_surface shader has red transmission_color (opaque is disabled)

Remember that the 'Opaque' attribute must also be disabled for the mesh when using opacity or transparency.

Diffuse Reflection 

Plug the output of the shader you wish to use when calculating diffuse reflection rays here.


Red emissive shader connected to Diffuse Reflection attribute of ray_switch_shader

Specular Reflection

Plug the output of the shader you wish to use when calculating glossy rays here. 

Red standard_surface shader connected to ray_switch_shader specular_reflection attribute

Diffuse Transmission

Plug the output of the shader you wish to use when calculating diffuse_transmission rays here.

Red emissive shader connected to diffuse_transmission attribute of ray_switch_shader

Specular Transmission

Plug the output of the shader you wish to use when calculating specular_transmission rays here. 

Red standard_surface shader assigned to specular_transmission attribute of ray_switch_shader.

Volume

Plug the output of the shader you wish to use when calculating volume rays here. 

 

 

 

 

Example use of Rayswitch shader

 

 

 

 

Pepe model by Daniel M. Lara (Pepeland)

  • No labels