Announcement

Collapse
No announcement yet.

Prevent liquid from penetrating an object's geometry

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Prevent liquid from penetrating an object's geometry

    Hi!
    I am creating a simulation where a liquid is being poured from a bottle into a transparent drinking glass. Things look pretty good in general, but a problem is that the liquid penetrates the glass geometry at some places (less than 1 millimeter into the glass) during the simulation, which creates refraction artifacts when I render the sequence with Corona. Is there a way to make sure that the liquid is not able to penetrate the glass mesh at all? The glass has a watertight mesh with no open edges and a thickness of approximately 2 mm.
    /Joakim

  • #2
    Hey,

    Does it help if you increase the grid resolution? Also how about if you enable the Clear inside option in the Phoenix properties righ-click menu of the glass geometry?
    Georgi Zhekov
    Phoenix Product Manager
    Chaos

    Comment


    • #3
      Hey Georgi, thanks for the reply!

      I tried now to enable Clear Inside on the glass and increase both the grid resolution and the density of the glass mesh, but unfortunately it didn't help. In the attached screenshot, the red polygons is the inside of the glass and the gray ones is the outside and as you can see, the liquid is still penetrating a bit into the geometry. My best solution right now is to make a copy of the glass, which I scale up a bit and use this instead of the original glass when I render the sequence. This way, there is a little gap between the liquid and the glass and I get rid of the refraction artifacts. However it's a bit cumbersome, since I have to scrub through the whole sequence and make sure there are no spots where the liquid is still penetrating the mesh.

      There is no offset parameter for the collisions in Phoenix liquid simulations, right?

      Click image for larger version  Name:	glass.jpg Views:	0 Size:	1.43 MB ID:	1167316
      Last edited by joakim_stenkvist; 07-12-2022, 09:49 AM.

      Comment


      • #4
        Ah, you see, the liquid particles you can see in the particle preview would not intersect the geometry. However, what you are looking at is the liquid mesh, is built from the particles, and it's thicker.

        What is usually done in such scenarios with liquids in a glass is to switch the render mode in the Rendering rollout from Mesh to Isosurface, which would allow you to use the Cutter geometry - by default it renders only the fluid that is inside the cutter geometry, but in this case you can set the glass the cutter geometry and click "Inverse", so only the liquid OUTside the cutter would be rendered, and you will get a precise cut between the liquid and the glass - this is similar to how the clipper works in V-Ray.
        Svetlin Nikolov, Ex Phoenix team lead

        Comment


        • #5
          Hey Svetlin, that sounds like a really cool solution! However, I tried it now in Corona (v8 Hotfix 1) and I get this message: "PhoenixFD/VRay VolumeGrid in Isosurface rendering mode is currently not supported. Scene node with the problem: PhoenixFDLiquid001​". Perhaps it has been fixed on Corona 9, so I should try installing that.

          Comment


          • #6
            Oh, Corona does not support the isosurface mode indeed. I don't think this is available even in version 9. Will ping rhe guys because otherwise I don't think there is a workaround for situations like this one...
            Svetlin Nikolov, Ex Phoenix team lead

            Comment


            • #7
              Oh I see. Thanks for pinging the Corona team!
              I noticed that enabling the "Cutter Geom" and "Invert Cutter" checkboxes does have some effect on the liquid mesh, even though the Mode is set to Mesh. It shrinks a little, but not enough to completely solve the refraction issues. However, I also found a pretty ok workaround - if I add some negative displacement to the glass material, it will remove the intersections during render time, so I don't need to make a scaled up copy of the glass. That way I can have one glass that works for both the simulation and rendering.
              Last edited by joakim_stenkvist; 09-12-2022, 03:29 AM.

              Comment


              • #8
                Ah, clever! Another suggestion from the Corona guys was a slicer material that could cut the mesh with the shape of the glass.
                Svetlin Nikolov, Ex Phoenix team lead

                Comment

                Working...
                X