Transparency behind transparency in Eevee with and without alpha | Blender 2.8X

Hello everyone ! So there is this believe still that you cannot
have tranpsrency behind transparency in the Eevee viewport Lets just spoil it right away, off course
you can Here i have a sphere and it has a transparent
material. One principled shader, and its blend mode
in the options tab is set to alfa blend, as the usual workflow with eevee transparency. Inside of it there is a particle system, which
is instancing an object, a simple UV sphere. And the only tricky part in the shading of
this instance object, which is basically two principled shaders, one white and one red,
is the distance based node setup, here on the left, to combine them by a mix shader. Since the radius of the big sphere is around
5 units, i have set the distance from it (the origin) between the two shaders to five. So the particles will change color above the
surface immidiately, which is pretty cool. So if i play it now, you can see how does
it play out. And there we go ! What if i would like to make the particles
inside the sphere transparent ? First, off course, i would jump back to the particle
material, and set the blend mode to alfa blend, as usual, when we want transparency. Then change the first shader, which by the
distances nodes is shading the particles inside 5 units (inside the sphere), to be fully transmissive. And now if i play it, the sphere is empty. So, it seems you really cannot see transparent
objects behind glass. So what to do now ? Just change the blend mode back to opaque. The glass material, which in Eevee by default
is a simple principled shader, set to transmission, has a transparency on itself, you don’t have
to play around with blend modes at all! Here you go, all your problems are gone ! On the other hand, if you are forced to use blend
modes for some reason, you can still render complex transparency. Your option in this case is the view layers. These view layers act as different sets of
render data. Disable all collections in your original view
layer, but the sphere and name it as you wish. I named it “Only sphere”. Then duplicate it by clicking here, and on
this view layer enable all collections, but the sphere. I named it without sphere. Whatever. Now if you render, you will get two images,
which you can combine in the compositor soon. Don’t forget to check the transparent option
in the film tab in the render settings. Since your first object is transparent, you
need to render with transparency, otherwise it wouldn’t be see trough to reveal the second
object behind. Before we hit render, off course, you might
need a background, an hdri to be visible. For it you need to uncheck the transparency
in the film tab, and it is a global setting. You cannot just check the transparent option
for one view layer and disable it for the other, it’s effect is global in the scene. So it will be unchecked in both. The solution is obvious, just create a new
scene ! The scenes are different beasts altogether, they contain basically everything you see
in your blend file, global settings included. So just duplicate your scene, by clicking
here, rename it to, let’s say scene background, disable all collections to render the world
only, and combine this render with the previous ones in the compositor. Here you have 3 inputs. The first two from your original scene, view
layer one and view layer two, first transparent object and second transparent object. And the third one is from the scene two, which
is our background. Simply add them together by alfa over nodes, and you are done
! And that’s all ! Thanks for watching, it’s
been a pleasure ! See you next time !

1 thought on “Transparency behind transparency in Eevee with and without alpha | Blender 2.8X

Leave a Reply

Your email address will not be published. Required fields are marked *