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.
$\begingroup$
$\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$– LutziCommented 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$– LutziCommented 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$– Vitalii SadovshikovCommented 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$– Vitalii SadovshikovCommented 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$– Vitalii SadovshikovCommented Oct 4 at 7:37
|
Show 2 more comments
1 Answer
$\begingroup$
$\endgroup$
Oh I figured this out, this is because all rays in reference to a light source are shadow rays