You are here: Shading and Lighting > Shading Nodes > Ray Type Node

Ray Type Node

When rendering an image, the first rays fired into the scene are Camera Rays. These are used to evaluate what the camera sees. When a particular ray hits a surface, the shading of that surface is evaluated to produce the final pixel. For simple surfaces this may be the only ray fired, but in most cases additional rays are created based on the surface settings, such as when hitting a mirrored surface a Reflection ray is created, or with global illumination Indirect (light bounce) rays are generated. All the results of these various ray types are combined to make the final image. The Ray Type node allows you to be able to selectively control attributes based on the type of ray used to compute the value.

Each of the Ray Types work as boolean value, they either are that type, or they are not, returning what would essentially look like a fully black or white image. This allows for all kinds of interesting combinations, such as changing values on a surface when it reflected off of another surface, a sphere appearing red, but reflecting green for instance.

Usage

The Ray Type node is added to the Schematic viewport using the Add function, found in the pop-up menu under Shader Inputs > Ray Type. There are no specific inputs for the node, but each type of selected ray is evaluated automatically for each sample and returned to its specific output.

NOTE:  For information on working with node graphs, see Schematic Viewport

Ray Type example video:

Schematic Node: Ray Type

Ray Type

 

Option

Description

Camera Ray Output

A Camera Ray would be a ray that leaves the rendering camera for evaluation and intersects a geometric surface.

Shadow Ray Output

A Shadow Ray is generated from a surface to determine if it is lit by a direct light source or blocked by an object.

Reflection Ray Output

A Reflection Ray is a ray generated bouncing off of a reflective surface.

Refraction Ray Output

A Refraction Ray is a ray that is traced through a transparent/translucent surface.

Indirect Ray Output

An Indirect Ray is generated from a surface to determine if it is illuminated by surrounding objects.

Caustic Ray Output

A Caustic Ray is a light ray that is focused through a transparent surface or reflected off a mirrored surface.

Subsurface Ray Output

A Subsurface Ray is a light ray that is bounced through a surface and blended with its diffuse color value.

Texture Ray Output

A Texture Ray is a geometric surface with a Texture layer applied to it to control its shading.

Occlusion Ray Output

An Occlusion Ray is generated in semi-random directions from a surface to determine how much of the environment is visible, evaluating if the position is blocked by surrounding surfaces or not.