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 http://imgur.com/a/DQYyx

$\endgroup$
5
$\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$
  • $\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 '18 at 0:52

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.