6
$\begingroup$

Why don't mesh lights affect the shadow pass?

For example:

I have a simple scene with a mesh light and an area lamp:

enter image description here

However, you can see that the mesh light does not affect the shadow pass:

enter image description here

enter image description here

Why is this?

Is there some technical limitation of mesh lights that prevents separating the shadows?

$\endgroup$
3
  • $\begingroup$ Any news on this? That's a real crucial feature in compositing and I wonder why is no more on todo list since 2.7. Is there any updated workaround? $\endgroup$
    – user21768
    Feb 12, 2016 at 14:13
  • $\begingroup$ @user21768 AFAIK nothing new. It's still mentioned on this todo list, albeit in the "smaller features" section $\endgroup$
    – gandalf3
    Feb 14, 2016 at 8:20
  • $\begingroup$ @user21768 There has now been a start on development of this feature; you can read along and try out experimental code here $\endgroup$
    – gandalf3
    Feb 16, 2016 at 22:24

2 Answers 2

7
$\begingroup$

That is simply how the shadow pass works. According to the wiki, the shadow pass is only affected by lamp objects, not mesh objects.

I mad a little experiment and was quite surprised, but It may shed some light on this. I also edited my previous speculation since I was wrong (check revision history).

I rendered a little scene with both an area light and a light emitting plane. It was the default cube sitting on a plane and on the opposite side from the light source was another plane with a glossy shader (roughness 0).

This is the render with the area light.

render with area light

This is the render with the mesh light.

render with mesh light

The one with the area light have no caustics! This simplifies things a great deal when it comes to calculating shadows. Also, mesh light can be any shape while area light can only be square and rectangular. I'm guessing that devs made a choice. Mesh lights would be to complicated or expensive to calculate shadows for since they behave more complex. Area lights are simpler (only rectangles and no caustics) so calculating shadows are easier and/or cheaper.

$\endgroup$
5
  • $\begingroup$ Thanks, I never noticed that before.. But I'm wondering why this is. What is different about how mesh lights are calculated that makes it impossible to use in the shadow pass? $\endgroup$
    – gandalf3
    Dec 9, 2013 at 23:14
  • $\begingroup$ But what is different about a mesh light that makes it so you can't separate shadows? Lamps (AFAIK) behave more or less the same way as mesh lights, (there are probably internal differences I don't know about, which is what I'm getting at) shining through refractive objects etc. It seems to me that if it's possible with an area lamp, it should work with mesh lights too. I don't understand why it's not possible with mesh lights. Could you explain? $\endgroup$
    – gandalf3
    Dec 10, 2013 at 8:01
  • $\begingroup$ I have found that lamps do have caustics, see this .blend. Perhaps this was/is a bug or you might have had caustics disabled? $\endgroup$
    – gandalf3
    Dec 27, 2013 at 23:29
  • $\begingroup$ The scene is lost in the fog of time. I'm pretty sure I didn't disable caustics, otherwise the first scene wouldn't have them. But I must have done something wrong. Don't know what or why. $\endgroup$
    – Gunslinger
    Dec 28, 2013 at 8:50
  • 1
    $\begingroup$ In case anyone else is reading at this point, caustics are disabled on lamps which don't have multiple importance sampling enabled. $\endgroup$
    – gandalf3
    Apr 15, 2015 at 7:10
3
$\begingroup$

Like Gunslinger said in his answer, the shadow pass doesn't have mesh lights. However, I found a (rather imperfect) workaround. If you separate the diffuse direct, you can kind of control the mesh light shadows. enter image description here

Node setup: enter image description here

$\endgroup$

You must log in to answer this question.

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