Raytrace object requires 2-4 input channels:
input1: ray origin (usually 'Coordinates' channel)
input2: ray direction (e.g. 'Reflected ray' or 'Normal'). Does not have to be a unit vector.
input3: weight color (signal strength of the traced rays). The illumination value of the traced ray is multiplied with this value.
input4: an optional half space selector for keeping randomized rays in the appropriate side of the defined direction. The 'Surface:Normal' channel is usually suitable for this purpose. Input4 is also used when 'Weight by Angle' is set, in which case the value should have unit length.
The raytrace object outputs the result of ray tracing which is usually added to the contents of the illumination channel.
The object has the following options:
Ray Count: defines how many rays are traced.
Randomness: defines how much the traced rays are scattered randomly around the defined main ray direction. 0=no randomness, 1=fully randomized ray direction (up to 180 degrees from given ray direction)
Side Check: if set, the ray randomization is done so that the rays remain on a given half-space (e.g. on the same side of a surface). The side is defined by the parameter input2 (ray direction) and input4 (side selector)
Weight by Angle: If set, the contribution of each ray is weighted by the dot product sampled_ray*input4. This is a useful option for illumination effects, input4 being the surface normal.
|Occlusion and distance rays do not interfere with other shaders, which process or manipulate traced rays.|
|Trace Range channel controls all tarcing Modes of the Raytrace object.|