Maxwell Arnold and such started to implement a nested dialectric approach where the you use priority flags to ignore object / materials resulting into the glass surface that is inside the liquid to be ignored to my understanding.
This shader approach allows to model vessel and fluids as is making them suitable to animate without the old trick of slicing up the mesh for rendering.
I actually hacked together a patch for that a week ago, but currently it’s just a quick test - it works nicely, though, you can even do CSG-like stuff with a IOR=1 material.
I’ll upload it to dev.b.org as soon as I got it cleaned up.
No, not nearly as powerful as full booleans.
Essentially, all it does is keeping track of IORs: Currently, Cycles always assumes the ray comes from air or leaves into air (depending on surface orientation). With that patch, Cycles knows what IOR it is currently in and refracts accordingly.
An example where that is relevant is a glass with water: Currently, it’s rather tricky to get the glass-water-interface correctly. Add air bubbles or ice cubes, and it gets pretty much impossible to do it manually.
The boolean example I mentioned is just two spheres overlapping, where one has IOR=1 and one has IOR=1.5. The first one is invisible, but as soon as the ray hits the second one as well, you get refraction => What you see in the end is the difference of the 2 spheres.
Anyways, that’s just a neat side effect, not the indended usage.
The problem might be that water from a fluid sim might not always be tight close to the glass surface mesh, so if you do this it should have some way of ignoring water-air-glass and to render it as IOR water-glass (thus if air distance smaller than … ignore air-IOR).
I think the code needs to have something like this.
But specifically with motion picture if here and there is a flaw you might not notice it that much because
as long as the refraction pattern looks well belivable the human eye cannot see if it is physically correct
This would be so cool. I actually brought up this very subject a year or so back. If it can be made to work in Cycles - it would allow effects like this to be reproduced accurately:
Encouraging to hear that Lukas is already working on it…Cycles just keeps getting better and better.