Fluid simulation problem.

Heres the problem:
I want a martini glass with liquid in it.
I made a glass and assigned in the physics tab - Fluid Obstacle
Then i placed a little cube above it and assigned it with - Fluid
I then made a cube around them and assigned - Fluid Domain
But when i hit bake the fluid just goes through the glass.
Whats the problem?
Attached a screenshot and the scene
question.fluid.blend (691 KB)


Your obstacle needs to be pretty thick in order to work. You’re better off making a second mesh in the same shape as the inside of the glass, then using the solidify modifier to give it some very deep thickness (it should look like at least a half-inch thick compared to the glass’s scale). Apply the modifier when you’re satisfied, uncheck its visibility in render (the eye icon next to it in the Outliner), and make that the obstacle instead of the glass itself. It won’t be visible when you render, but it will give the fluid something to bounce off of. The simulator just can’t figure out thin surfaces, unfortunately.

Also make sure you have applied the scales and rotations of all objects before baking (Ctrl-A in Object Mode).

Thanks man, it almost fixed it, but it is still not perfect.
I made it really thick and added a solidify modifier, but the liquid still penetrated the first layerof the glass and goes through and stops, but passes the first layer. Any ideas?


It’s never going to be perfect, but there are a few ways to improve it incrementally until the imperfections are small enough to ignore.

  • Give it a little more geometry to work with. Subdivide your Obstacle mesh once.
  • Scale the inner surface of the Obstacle inward slightly, so it is just a little smaller than the bowl of the rendered glass. Then the little bit of surface penetration will still rest inside the glass.
  • Increase the resolution of the fluid. 100 is a good start, but isn’t nearly enough for realism.
  • Decrease the size of your domain as much as possible. The closer it is to the size of the fluid, the better. But you’ll of course be limited if your glass is going to move around or if you need the fluid to splash around. If you shrink it too much, any splashing could end up hitting the side of the domain in midair like an invisible, unrealistic force field. :confused: And of course if you do shrink it, make sure to apply the new scale!
  • Use less vermouth. :smiley:

yeah i’ll try it out, but it just seems like too much effort to do something that simple, i thought there is an easier way . if this is just a problem with the simulator, i hope they fix this this in the next updates. thanks anyway for the help

It’s just an inherent limitation of this type of simulation and the hardware you’re using. Fluid simulations aren’t simple, period. The biggest problem causing slippage right now is number 3: resolution. 100 is really low resolution. You could get rid of almost all of the penetration by bumping the resolution way way up, but your home computer would probably fry first. All the other suggestions I made are ways of cheating and faking better looking results given the fact that you aren’t a professional studio with a huge cluster of high end computers. The next Blender update isn’t going to give you that.

That said, future versions of Blender may eventually use a completely different method of simulating fluids, which will look better and possibly be easier to use, but also have its own limitations. Computer graphics is a game of faking the results you want, so you’re going to have to learn little tricks like this, even for simple things.

There IS a simpler way. I don’t have a lot of difficulty with thin objects when using the fluid simulator. Three things:

  1. Increase your resolution, as already suggested. Try 150 at least (I do most of mine at 300 but it takes a LOT longer).
  2. Change the volume initialization of the glass (i.e., the obstacle) from “volume” to “shell”.
  3. Under “Fluid Boundary” (at the bottom), make subdivisions “1” and change “partial slip” to “free slip”.

Also, when viewing the results, make sure to change the Viewport Display option to “final” instead of “preview” OR change the preview resolution to the same as the final resolution.