In fluid simulation as it is done on a grid with a resolution definable even choosing a higher value for the resolution (as in our example below, 200) it is not enough to have a realistic shape of the simulated fluid with respect to the obstacle, here a glass.
One may suggest that after simulation scale up the glass up to a size that the artifact disappear. This is a bad idea. The obstacle is not going to be a simple shape. Scaling causes many issues.
One may also suggest that trying to apply Boolean operation on the resulting fluid (domain) with the obstacle (here glass) e.g., applying fluid(domain)-glass. This is also bad idea as it will not remove parts of fluid on outer surface of the obstacle.
Is there any better way to do this: to generate a fluid that respects the surface of the obstacle in a more realistic way?
- For those may suggest even higher resolution, please note that for just such a simple simulation shown in the figure, it consumes gigabytes for baking! If you could increase the resolution to infinity, yeah, this may solve!
Update:
Check the following example.
Left is what you get if you don't do anything.
Right is what you get if apply Boolean operation properly on stack.
We put this example here to demonstrate that clipping (which is very costly, BTW) may work only for simple situations as this example. It cannot be done for complex shapes. The results (after couple of hours) will be very disappointing. We believe something should be applied in more low-level during fluid simulation. Say, each frame (step or stage) of fluid simulation a post=processing should apply to match the grid output with the obstacles' surfaces.
Only for simple situation like this