3
$\begingroup$

I made an earth object and gave it a material including the usage of the new input of the "Light path" node "Transparent depth" which makes the back faces invisible. However, when an object has transparency on it, the input ignores the object with the "Transparent depth" input behind it and makes it invisible.

  • The object itself - enter image description here enter image description here

  • Using a transparent object behind it - enter image description here enter image description here

Here's the file - http://www.pasteall.org/blend/31655

$\endgroup$
4
$\begingroup$

One thing you can do is make the material invisible only after it goes through two layers of transparency, rather than just one, by adding a greater than node:

enter image description here

The transparent depth output is incremented each time the ray goes through a transparent surface.

With your current setup, it is used to mix between a partially transparent shader and a completely transparent shader based on the number of transparent surfaces the ray has passed through. The partially transparent shader is used if no transparent faces have been encountered, and the completely transparent shader is used if more than 0 transparent surfaces.
For example, the logic looks something like this:

if transparent_depth >= 1:
    use_transparency()
else:
    use_shader()

Since you put another transparent surface in front of the sphere, you need to allow for that by only making the shader completely transparent after at least two transparent surfaces have been encountered.

By using a greater than node like in the setup above, the logic should look more like this:

if transparent_depth >= 2:
    use_transparency()
else:
    use_shader()
$\endgroup$
  • $\begingroup$ Thanks. Just a thing - Does this mean that the earth will lose in its opacity? $\endgroup$ – Vladimir Sep 17 '14 at 19:58
  • $\begingroup$ @Vladimir What do you mean? $\endgroup$ – gandalf3 Sep 17 '14 at 19:58
  • $\begingroup$ Is the setup for the Earth or the cone? $\endgroup$ – Vladimir Sep 17 '14 at 20:04
  • $\begingroup$ @Vladimir The earth. All you need to do is add the greater than node between the light path node and the mix shader node. $\endgroup$ – gandalf3 Sep 17 '14 at 20:11

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.