# Questions about the Light Path node

I would like to increase my shading skills by understanding the light path node a little bit better. I am a little bit confused as to how this node works, mainly in terms of how some node setups have different output sockets being added together, as well as what is being measured for ray length, and depth.

The first thing that is quite hard for my brain to understand is, how it is possible to mix the camera rays and the glossy rays (like in the picture), as well as turn it into color information. How does the light path node convert the camera ray/glossy ray information into color information? This part stumps me, I can't quite visualize what happens here.

The other thing that stumps me is what is being measured for ray length and depth. In the blender manual, the ray length has this definition:

Distance traveled by the light ray from the last bounce or camera.

and the ray depth has this definition:

Number of times the ray has been reflected or transmitted on interaction with a surface.

From these definitions it is measuring 'a ray', my question is which single ray are both of these options measuring (or am I thinking about this in the wrong way)? From my understanding, aren't there thousands and thousands of rays that are bouncing around?

## Question 1:

Light Path node outputs a single value between 0 and 1.
When plugged directly into RGB input, they correspond to black and white.

Example using the mentioned Ray Length output. The longer the distance, the higher the value.

## Question 2:

The values are calculated for each ray hitting a surface.

• Direct view - 0 bounces
• Mirror reflection - 1 bounce
• Glass panes - 1 to 3 bounces

Lately I've used is glossy ray, and it works like a question with an answer of yes or no, true or false, white or black. So i used this output as factor in a mix. I hope this helped. For the other part of the question, I'm not sure but i think it is as it says, the depth is an integer number showing the bounces, but the length is a float.