0
$\begingroup$

Why do the logical outputs (is Diffuse, is Glossy, etc) of the Light path node always return False (0) for a Light object, such as a Point Light Object? The presented image shows a pure Diffuse cube and a Point Light source with an applied Light Path node. The cube should be red because the ray reflected from the cube to the light object is diffuse, but the output returns 0. Why? Whereas the same node construction works as expected for a World light source.

Light path node applied for a Point light source: enter image description here

Light path node applied for the World: enter image description here

$\endgroup$
7
  • $\begingroup$ I think your nodes are really not setup as intended. Light Path should be use on the cube, not on the light. Reason being : your point light isn't displayed (you only see the light it casts on other surfaces), so using a light path won't do anything. No rays comes from the light itself. Also Background shader is probably not a good idea for a light source. Let us know if you get anything new. $\endgroup$
    – Lutzi
    Commented Oct 3 at 21:11
  • $\begingroup$ Your light shader is basically asking to Blender "is there any diffuse ray that comes from the point light" ? Answer is no, diffuse rays will come from the cube. $\endgroup$
    – Lutzi
    Commented Oct 3 at 21:17
  • 1
    $\begingroup$ First of all, thank you for your reply. But I can't agree with you: 1) "Light Path should be used on the cube, not on the light." Light Path node CAN BE used for a Light object, for instance, I often utilize Ray Length and Ray depth outputs to restrict the light source for lighting optimization. 2) "Also Background shader is probably not a good idea for a light source." Why? All people use background HDRI maps, in many scenes it's a great option to light the scene. Completely disagree with you or I misunderstand what you $\endgroup$ Commented Oct 4 at 7:25
  • 1
    $\begingroup$ 3) "Your light shader is basically asking to Blender 'is there any diffuse ray that comes from the point light'? Answer is no, diffuse rays will come from the cube." Sorry, but that's not correct logic. Blender's engine renders in the backward direction from the camera to the light source (not from the light source to the camera). The Light Path node tests falling rays on an object, not rays reflected or emitted from the object. It's important to understand considering ray tracing. $\endgroup$ Commented Oct 4 at 7:25
  • 1
    $\begingroup$ The logic works for all objects and background (as I showed on the second image) but apparently wrong for light object like point light, that is my question $\endgroup$ Commented Oct 4 at 7:37

1 Answer 1

0
$\begingroup$

Oh I figured this out, this is because all rays in reference to a light source are shadow rays

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .