Fluid Help

Hello,

I’m tring to animate a fluid shaken in an ampule but it never quite works out, lots of geometric pixelation and fluid bleed.
This is the object i want to animate.


The domain works fine and the liquid even stays in the ampule for a few frames but it doesnt take the shape of the ampule exactly.


And when i add animation to it, it roughly sticks with the shape but starts bleeding out in to the domain space.


Does anyone have any advice on how to
A) Get the Fluid to fill the shape of the ampule properly
B) Stop the fluid from leaking out of the container

Cheers

Maybe post a blend? How many blender units high is the ampule? Is that reasonably consistent with the domain size? How subdivided is the ampule? Have you tried increasing the fluid resolution?

Here is the blend file.

ampule_animation_test.blend (1.18 MB)

Here is the blend file

[ATTACH]219418[/ATTACH]

After you bake your fluid, you can apply a boolean modifier set to ‘Difference’ that is approx. the shape of your ampule (maybe a bit thicker). I’ve found that this works quite well for more “open” type obstacles like a glass, for instance. In this case though, I found that for some reason the Boolean modifier “miss calculated” on a few frames, resulting in most of the fluid disappearing, so I had to fiddle around with the Boolean modifier settings to get a good result.

The advantages of using the Boolean modifier, is that you get a nice clean edge along the obstacle, and you don’t need to use as high a resolution setting. The disadvantage, is that it really drags down the UI performance, and you may find that you need to disable the fluid to make adjustments.

I used a slightly thicker ampule wall and also a higher resolution. + I gained some resolution by animating gravity and then parenting everything to an Empty afterwards to animate the motion (though this did produce a slightly different result). You can see in the animation also that it is a bit too fast, perhaps:

http://users.xplornet.com/~gimble/fluid_test4b4.avi

Fluid sims aren’t really at all suited for what you’re trying to do. You’d save yourself a lot of headaches by faking it.