Pouring fluid from a cup or bottle

I’m playing with fluids and I’m happy with making a big sphere of fluid which crashes down into the domain area, but now I want to get more precise…

I want to have a cup (or bottle) which gets upturned so the liquid in it spills out.

I have tried doing this by having a liquid-assigned mesh (physics panels) inside an obstacle cup, which is overturned (movement keyed over the timeline)

I calculate the flow, but when I run the animation, the cup moves right through the liquid, leaving the liquid suspended in the air. It is as if Blender only sees the cup from where it is in the first frame of animation.

What steps do I need to get my cup to pour out the water it is holding?

P.S. I am using Blender 2.5

Seems like the thing to do is check the box “Export Animated Mesh” under the cup obstacle.

I am unable to control fluids well. I have good results ( I like to think they are ok )( without fluids) making a mesh, sculpting in sculpt (many faces / fine mesh ). Then putting a animated displacement ( wood ) . If you can animate the mesh then the displacement.
If you learn how to do it in fluids you should make a tutorial . I see so many tutorials and they are mostly all the same.

Hi kazinger, I think we might be talking about different things. I’m meaning the Blender physics fluid simulation, your animated displacement method sounds more of a rendering materials thing.

I’m attaching an example file which isn’t working properly. Can someone please look at it and tell me why the physics are making the render stop at about frame 28, why the liquid seems to be falling sideways, and what to do in order to make it act more like water?

To see what’s going wrong…

  • hit the “Bake Fluid Simulation” button,
  • if it seizes up calculating around frame 28, hit [ESC] to cut the process,
  • then [ALT][A] or scrub the timeline to examine the results.

Could a fluids-guru please direct me on how I should tweak the settings?

Attachments

bad_mug.blend (181 KB)

http://www.screencast.com/users/blenderwho/folders/Jing/media/6bcddc4c-c8d7-4bd1-84b8-265b986ba608
Deleted the ‘Export Animated Mesh’ selection. Just bake the simulation and it takes into account the mug animation as a moving obstacle. You should also clear all the objects scale value to make sure it runs correctly (Ctrl+A). Also used arecent build of blender 2.5, increased the resolution and change the Domain Viewport Display to Final to show the high resolution mesh.
bad_mug1.blend (183 KB)

Hi Richard.

Thanks heaps for replying, and for looking at the file.

I’m at a bit of a dilemma here, you see I’m writing the final chapters of a Blender book (which I need to hurry along because of Publisher demands) and the chapter on particles and physics is towards the end, hence I’ve been playing with them a bit lately (though my particular strengths are rigging and animation).

I am assuming that readers will be downloading the provided Blender 2.5 as is available from rhe main download page, and that they won’t be going about making their own builds. Is the simple fact of the matter that Blender 2.5-alpha2 is just not up to the animation I’m attempting? If not, then perhaps that should be my official word when publishing.

A small thing; in my current build, Blender crashes if I try to look at the physics tab for the cup of your posted file… I’m assuming you may have made changes to the panels somewhere?

I tried your file (thanks again) and it baked, but when I ran the result, the fluid was left behind as if the cub never moved. I’m assuming the “Export Animated Mesh” is meant for?

If that’s not what “Export Animated Mesh” is about, could you please let me know what the story is? I don’t want to put the readers wrong by saying so if it’s really something else.

The tooltip for the Export Animated Mesh looks like it is used with something like an armature but not affected with plain location/scale/rotation ipos.
Tried my amended blend in 2.5a2 and the fluid does not follow the cup even with the export animated mesh selected. My video is using revision 29421.
I may be mistaken but I believe recalling someone else having the same issue with alpha2 so it may be something that had not yet been ported over in that build.

That’s interesting… on my earlier attempt, the fluid follows the cup (badly… it kind of goes all over the place), but only when “Export Animated Mesh” is enabled for the physics of cup model… the same animation, which is plain old keyframes object positions.

I’m thinking I should get a recent build as you suggest. I am running Ubuntu 10.04, so are there premade builds available, or should I be going for the scons thingamie? I’m behind on my publishing as it is, so don’t have time to faff around with install experiments… I’m assuming I need to follow the steps at http://wiki.blender.org/index.php/Dev:Doc/Building_Blender, or more specifically (for my distro): http://wiki.blender.org/index.php/Dev:2.5/Doc/Building_Blender/Linux/Ubuntu/Scons

Correct?

Thanks for the video by the way, which looks great. I only saw it now I am at school (I’m a teacher) and using their fast internet connection.

Hey Richard, I’d like to say thanks for your input on this one. You were right - SVN is a lot better at this than the official alpha2 release. I haven’t worked out all the specific settings as yet, but the source from the last link of my last post was easy to compile (done it before in the past… they’ve really explained the process down to an art). Here it is working, so I can get the screenshots I need and continue writing. Will have to think about how I explain versions differences, as the chances are that Blender could be upgraded by September when my book is supposed to be released.

Thanks heaps.