6
$\begingroup$

I want to understand what the light path node does in blender. For example, here http://www.pasteall.org/blend/35401 I am doing a simple rendering of person. I used a point lamp as a light and the node associated to the lamp is mentioned below:

enter image description here

When I did not use the light path node, I obtained a scene like this (in render settings, I used limited global illumination in the light path)

enter image description here

When I used the light path like this:

enter image description here

I obtain this image which is more realistic.

enter image description here

$\endgroup$
11
$\begingroup$

The Light path node allows you to make shaders do different things based on where the incoming light ray was before. When thinking about where "before" is, keep in mind that cycles is a backwards path-tracer.

The Ray Depth output of the light path node gives the number of bounces the ray went through before hitting the lamp (or whatever is using the shader).
So when tracing backwards from the camera to the lamp, surfaces which are directly illuminated (1 bounce away) will hit a lamp with a corresponding strength of 1:

enter image description here

Surfaces illuminated by indirect lighting (2 or more bounces before hitting a light source) will "see" a correspondingly stronger light source:

enter image description here

To see it in action:

enter image description here

As to why it appears "more realistic", I think this really just an artifact of the lamp being way too bright in the first example (it looks fine when the strength in the light falloff node is then set to 1). In fact the setup with the ray depth is less technically realistic, as explained above.

Normally the light falloff node is plugged into the strength, not the color. Then with the default strength of 100 it looks just fine:

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.