4
$\begingroup$

I'm trying to create a cycles lamp shader that only lights up the diffuse component of the materials around it. Kinda like having its Glossy component turned off in the Ray Visibility box under the object tab. But it is not working. I seem to be missing something quite basic.

Here's my node setup:

enter image description here

When the material is reflecting sharply (with roughness turned down to zero), the node setup works. But with blurry reflections, it stops working. What is it that I'm doing wrong?

$\endgroup$
2
$\begingroup$

I think it might be the node setup for the light. When I set up a similar scene with a pure emission shader on the plane, everything worked as I think you wanted.

Massive specular highlight when glossy ray visibility is active

No specular highlight when glossy ray visibility is inactive

In the scene I have a plane with a 50/50 blue diffuse/white gloss mixed shader, a 100% green diffuse shader and a 100% red glossy shader all at about .2-.3 roughness. There is also the default amount of light being emitted by the world

Finally just to prove that the red glossy plane isn't reflecting the light, I turned off the world light and you can see that the red plane is no longer being lit by any light source and is completely black.

No world light

Hope this helps you.

| improve this answer | |
$\endgroup$
  • $\begingroup$ But that wasn't my question. I had set up the light's shader in a way that it'll it'll light up only the diffuse and transmission component of any shader. As in, when a camera ray cast by the camera hits the glossy surface, and the point of impact subsequently shooting a "glossy ray" into the lamp, that ray will only see a purely transparent material. But it doesn't seem to work that way. $\endgroup$ – timAugustine Mar 24 '14 at 20:00
  • $\begingroup$ After some experiments, I find that my setup works when the reflecting surface is 100% reflective. But as I increase the roughness of the surface, the lamp shader's effect decreases. I'm supposing that when I keep increasing the roughness, the glossy material starts resembling a diffuse material (and since my lamp set up affects only the glossy component), and it gradually stops working. $\endgroup$ – timAugustine Mar 24 '14 at 20:05
  • $\begingroup$ But all this is plain supposition and I've no idea how blender handles these things under the hood ( this understanding, I'm sure, will clear my doubts. Certainly (: ) $\endgroup$ – timAugustine Mar 24 '14 at 20:06
  • $\begingroup$ Oh I'm sorry, I misread your question. I thought you said turning off ray visibility wasn't working. My bad :( Is your floor plane an entirely glossy shader? $\endgroup$ – drent Mar 24 '14 at 23:24
  • $\begingroup$ Hi drent, yes the floor is completely glossy. So by theory, the lamp should have no effect on it. But it doesn't seem to be working that way. I wonder what is it that I am missing. $\endgroup$ – timAugustine Mar 26 '14 at 5:48
2
$\begingroup$

It seems to me that this might be a bug caused by multiple importance sampling. If you disable it (for the mesh light), it works as expected (the floor is a 50% mix of glossy and diffuse):

enter image description here

Unfortunately, this makes it extremely slow to converge..

| improve this answer | |
$\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.