I'm stuck with this cycles scenario:

-I have a translucent tube inside a glass room

-The tube is being lit by an emitter object, which has ray visibility turned off for "camera"

-The emitter doesn't show up in the camera, but unfortunately it shows up in the glass material

-I can't turn off "transmission" ray visibility, because then the emitter doesn't light up the tube any more

-I would prefer a solution that doesn't require render layers, since compositing is hard because of partially transparent objects

My question is: Is it possible to limit the transmission bounces for the emitter object, so that the rays hit the tube, but don't reach the glass?

Here is the render:

enter image description here

Here's the .blend:

  • $\begingroup$ Go to the Ray Visibility part of Object info in the Properties tab. $\endgroup$ – VRM Jul 2 '15 at 16:45
  • $\begingroup$ I already did.. $\endgroup$ – Antti Jul 2 '15 at 16:50
  • $\begingroup$ Ah I see . . . Well that is more of a puzzle $\endgroup$ – VRM Jul 2 '15 at 17:02
  • $\begingroup$ Could you add thickness to the surface of the tube so that it needs 2 Transmission bounces for the light to get through, and turn the scene Transmission bounces down to 2. Then it would not get through the cube surface? $\endgroup$ – Todd McIntosh Jul 2 '15 at 17:18
  • 1
    $\begingroup$ I experienced this problem not too long ago, and unfortunately I couldn't find a solution. I think this is why many people (myself included) really want light groups. I'm curious to see if anyone has a workaround though. $\endgroup$ – Andrew Price Jul 8 '15 at 5:50

I just added a light path node to the emitter material, with the Is Glossy Ray switching between emission and transparency, and got this.

example image

Is this what you had in mind?

Edit: in case you'd ever want to control both Is Glossy Ray and Is Camera Ray from the shader instead of using the Ray Visibility tab in object properties, you can do that with a math node. Connect both Is Glossy Ray and Is Camera Ray to the math node via Add. Maximum also works. You will get zero only if both are zero, meaning you get visibility only if it's neither a camara ray nor a glossy ray, which is what we want.

enter image description here

  • 1
    $\begingroup$ Indeed! What a simple and elegant solution! You deserve the bounty! $\endgroup$ – Antti Jul 11 '15 at 18:50
  • $\begingroup$ Wow, thank you so much! Made my day :). Glad I could help. $\endgroup$ – Sanne Jul 11 '15 at 20:51

Would you be able to achieve your effect by making the material of the tube have a texture that affects an emission shader inside the material?

screenshot of material with texture-controlled emission shader

  • $\begingroup$ I'm not sure if I follow.. The tube should have a translucent material. Isn't that part missing from your answer? $\endgroup$ – Antti Jul 8 '15 at 18:55
  • $\begingroup$ You have a point. Go ahead and include some translucency in your nodes, but my original suggestion of mixing in an emission shader (controlled by a texture or something) still stands. $\endgroup$ – Mutant Bob Jul 8 '15 at 19:13

I made something similar to Mutant Bob, but I want to be more detailed.

  1. I put some UV map on translucent tube to have coordinate basis, but you can use other method, like manual calculations with math node based on global XYZ, or UV projection modifier with some addition animated object as projector;
  2. ColorRamp node gave a more or less approach to specific light spot distribution. Or you can draw it manually in texture and place texture node instead.
  3. ColorRamp not using #ffffff for maximum mixing value because it works together with Emission node with strength more than 1.0 - I think this combination provides better control over translucency/emission.

Hope we helped.


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.