3
$\begingroup$

The Blender documentation says the following about the Light Path node support in Eevee:

Eevee has no real concept of rays. But in order to ease the workflow between Cycles and Eevee some of the outputs are supported in particular cases. This node makes it possible to tweak indirect lighting in the shader.

It further provides a list in which Is Diffuse Ray is indicated as "Supported" in Eevee.

What does this mean, exactly? What are some use cases in Eevee in which Is Diffuse Ray is valuable?

For context, this question was motivated by my noting that I can use Is Diffuse Ray in Cycles to render an object's mesh as transparent but to retain the effect of light hitting the object's mesh and bouncing onto other objects. For example, I have this simple scene:

enter image description here

If I switch to render preview in Cycles with the material pictured below on the sphere, then the sphere itself doesn't appear in the render, but the light scattered through its surface onto the rectangles does:

enter image description here

If I switch instead to Eevee (note: with Screenspace Refraction, and Blend Mode=Alpha Blend set in Material Properties, and with Screenspace Reflections enabled in Render Properties), then in the render preview, the sphere still "disappears"/is fully transparent, but the green light scattered off/through the object's surface and onto the rectangular objects does not appear:

enter image description here

This example left me wondering: this does not appear to be an intended use case for Is Diffuse Ray in Eevee -- but, if that's so, then what are some examples of its intended uses in Eevee? Or, is this an example of an intended use case, and I am missing a relevant Eevee setting(s)? Mathematical/algorithmic explanations of the difference between Eevee and Cycles behavior in this case would also be appreciated, if available.

Version notes: the above was produced in Blender 2.90.0 alpha, but I have seen similar behavior in 2.83 and 2.90 (non-alpha) as well.

$\endgroup$

1 Answer 1

4
$\begingroup$

While with regular viewport rendering alone it is hard to find a use case, while using probes it can have a visible effect.

If you use an Irradiance Volume probe and bake baking indirect lighting, you use it to change object color for direct visibility, while indirect light sees it differently.

In the example below the sphere color is is red, but through the Is Diffuse output we tell the rays bouncing off the surface it is blue, as such you can see a faint bluish tint to the color bleed effect on the wall.

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ Oh, lovely -- it didn't occur to me to try indirect lighting, but it makes quite a lot of sense that use of Is Diffuse Ray would be linked to doing so, now that you point it out. I haven't quite replicated the Cycles' visual behavior in my example, yet, but between a ReflectionCubemap and an IrradianceVolume I was quickly able to get pretty close. Marking as Accepted answer. $\endgroup$ Oct 26, 2020 at 2:16

You must log in to answer this question.

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