Ray Switch Shader

 

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 a tissue or add a second specular lobe in camera rays only.

There is also the Ray Switch RGBA shader for adjusting colors instead of shaders.

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. 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, and 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 Shader Ray Switch

Specular Reflection

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

Red Standard Surface shader connected to Shader Ray Switch 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 Shader Ray Switch

Specular Transmission

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

Red Standard 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. 

 

 

 

 

Pepe model by Daniel M. Lara (Pepeland)

  • No labels