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$

1 Answer 1

5
$\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$
4
  • $\begingroup$ Thanks. Just a thing - Does this mean that the earth will lose in its opacity? $\endgroup$
    – Vladimir
    Commented Sep 17, 2014 at 19:58
  • $\begingroup$ @Vladimir What do you mean? $\endgroup$
    – gandalf3
    Commented Sep 17, 2014 at 19:58
  • $\begingroup$ Is the setup for the Earth or the cone? $\endgroup$
    – Vladimir
    Commented Sep 17, 2014 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
    Commented Sep 17, 2014 at 20:11

You must log in to answer this question.

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