3
$\begingroup$

If you see in the image below, then that particular glass jar has liquid visible from front but not from the back. I am using eevee. Options under screen space reflection, refraction all are turned on. The file link is here. Couldn't add on stack exchange as it exceeds 30mb https://drive.google.com/file/d/1wwzQwqlR2s7uLsIywxNqTIBqOfGMkPOq/view?usp=sharing

enter image description here

$\endgroup$
7
  • 1
    $\begingroup$ Oh boy, transparency and EEVEE again. Well, let’s go through the pre check. Are any materials set to Alpha Blend? Are your normals properly calculated? Do you have any faces in the same position as eachother (causing Z fighting which looks like an animated scratchpad in Solid view)? $\endgroup$
    – TheLabCat
    Jan 26 at 5:02
  • $\begingroup$ Hi. So yes I have set that jar glass and liquid to Alpha Blend. Normals are all good. No faces in same position too. I scaled down the liquid too and checked by rotating around $\endgroup$
    – Jehan
    Jan 26 at 5:10
  • 2
    $\begingroup$ pls provide blend file - else - as TheLabCat tried to do - we can only guess around - so your information you gave us isn't sufficient $\endgroup$
    – Chris
    Jan 26 at 6:53
  • 1
    $\begingroup$ @Jehan Alpha Blend typically has failed with situations like this, where one has multiple faces lined up, some in the same object. Use Alpha Hash instead. $\endgroup$
    – TheLabCat
    Jan 26 at 14:24
  • 1
    $\begingroup$ @TheLabCat I am going to download the file again and see what I get after your and moonboot's solution because after I applied the solution, I can't go back to the state when it disappeared LOL $\endgroup$
    – Jehan
    Jan 26 at 14:41

1 Answer 1

7
$\begingroup$

From what I know, for the moment in Eevee, through an object that has its BSDF Transmission activated (or that uses a Glass node), you can't see another object that has Alpha Blend or Screen Space Refraction activated. So you need to either turn off these options for the liquid, or, for the glass, you can use a mix between glass (your current setup) and Transparent, with an Input > Layer Weight (Facing output) as a factor. It's not perfect but all this is due to Eevee's limitations:

enter image description here

Before:

enter image description here

After:

enter image description here

Edit: As you mention, another solution, in your case, would be to join the objects, as it's not a problem here that the liquid appears in front of the glass:

enter image description here

That said, in some cases, as this last solution makes the liquid appear in front of the glass, it won't work:

enter image description here

See what switching the liquid to opaque, as I recommend, will give (as a side note, the liquid is now opaque but the reflection of the HDRI gives the false impression of transparency):

enter image description here

$\endgroup$
9
  • $\begingroup$ Thanks as always man :) This worked. However, I found a very weird solution. I selected all 3 meshes, joined them and then separated them. LOL. it worked! $\endgroup$
    – Jehan
    Jan 26 at 9:19
  • 1
    $\begingroup$ oh yes, that's a nice idea! Wow that's weird that it's still working after separation. $\endgroup$
    – moonboots
    Jan 26 at 9:22
  • $\begingroup$ Yeah. Dont understand the reason though but it worked :/ $\endgroup$
    – Jehan
    Jan 26 at 9:26
  • 1
    $\begingroup$ @Jehan What I would have guessed is that when combining objects some settings like modifiers, auto smooth etc. that were different in the separate objects before are now all the same as soon as you merge them, and they stay the same once you separate them again. However I couldn't find those settings that might make the difference. It's not the modifiers or otherwise coyping them should do the trick as well... auto smooth settings was the same on both objects before, the individual materials stay individual after joining, visibility settings were the same before as well... I have no idea. $\endgroup$ Jan 26 at 9:46
  • 2
    $\begingroup$ @Jehan It's really mysterious. When I tried to reproduce your result with joining and separating the objects I selected the liquid first and then the bottle, hence joining the liquid to the bottle. Now I tried it the other way around, joining the bottle to the liquid. It still works as long as it's one object - but if I now separate them again, it goes back to the way it was before with the liquid disappearing. I would really really like to know what makes the difference. $\endgroup$ Jan 26 at 9:57

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.