5
$\begingroup$

I am trying to create a shader that renders visible when looking at it from behind another invisible object, and vice versa. However, when the object is supposed to be invisible, it renders a black artifact in it's place. Is there any way to get rid of this and simply keep it transparent?

enter image description here https://i.stack.imgur.com/M6eRZ.jpg

$\endgroup$

1 Answer 1

6
$\begingroup$

I believe the issue you're having is due to a circular dependency. You're counting the number of Transparent Shaders the ray is passing through, but what happens when the material that that number depends on is a Transparency itself? I believe that's why Blender creates a Null shader.

You can do something similar with a Glass Transmission Shader set to IOR of 1.0 for your "transparent window" thingy. Disable everything but Camera in the Cycles Setting:

enter image description here

Then instead of Transparent Depth, just use the Transmission Depth input for your object:

enter image description here

enter image description here

$\endgroup$
1
  • $\begingroup$ I have a question that I feel is a bit relevant to the discussions here. I wonder could you please take a look at my question here? I basically want to render depth maps or surface Normals by somehow ignoring the transparent materials. Do you think that's possible? $\endgroup$
    – Amir
    Feb 25, 2018 at 0:52

You must log in to answer this question.

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