Accurate liquid in glass rendering

When you use thin glass, you can not notice problem. But use thick glass, you can easiliy notice problem if you intersect your surfaces.

Example real life thick glass:

You can easily see thick glass part. But, if you intersect surfaces, then this glass not show, and result will be wrong.

Are you sure about that? I made a test here and it looks ok to me.


Well, maybe it’s not the best example, but I didn’t make it look beautiful, anyway.

I am sure. You did not intersect.

Yes, I did intersect. Why would I say that if I didn’t have?


Actually, what I forgot in that other image was to invert the normals of the liquid as they were pointing inside instead of outside. This is the correct image:

I don’t see well. You can send blend file.

Let me just remove the HDRI.

glass.blend (2.6 MB)
Sorry, I applied the subdivision and the file became bigger than it was supposed.

1 Like

Which Blender version you use? Blender crashed when I open this file.

Blender 3.2 I can save it in another version. Which one do you need?

It doesn’t matter. Maybe you saved when in the Edit Mode. When do this, Blender may crash when open this file.

You intersected a little bit and problems begin. If I increase intersection amount, then this artifacts will cover all of the glass.

This is non-intersected result:

You can see, wrong reflection and refraction gone.

Not if you are compositing the background in. you’ll get some of the reflections, and some of the refractions, but it will just turn the transmission into straight alpha. anything you composite in will not be refracted, which will really flatten the effect.

@Calandro & @Hikmet

Read this article:

@usernew already posted it, but it looks like you both ignored it.

This is the correct way to render fluid in a glass with proper IOR on each interface.

3 Likes

Ah, that’s the one. Couldn’t find it. It’s going right in favourites, thanks.

1 Like

But who said the interception should be big? Actually, the interception is supposed to be minimal. Just enough to make the liquid intercept with the glass, If it can be imperceptible, the better.

My friend, this article is not an academic article, right?

It is not, but it is an accurate assessment of rendering liquid in a glass for CG artists. It is based on accurate physics.

You need to model the water/glass interface as a single surface with the normals correctly setup.

Liquid inside the glass is wrong, liquid intersecting the glass is wrong. It needs its own interface surface.

So, what will you do when use fluid simulation?

If you want realistic render, then you must consider real-life physics.

Animation is much more complicated, yes.

For a still like the OP is asking for, the method outlined in that article is accurate to real-life physics.

While this discussion about rendering glass is both important and useful, the more recent part of it isn’t quite on topic. OP is asking for specific ways to improve their rendering results, so more generalized discussions about the technical minutiae of glass aren’t really applicable. That discussion could be moved to a different thread, for example, in #general-forums:blender-and-cg-discussions, and further discussion on this thread should probably relate specifically to OP’s case :slight_smile:

2 Likes