3D Gallery | Blender Tutorials | Dance Workshops | Essays | Letters | Quantum Entanglement | Technobabble | Contact

Blender Tutorial

by Dave Jarvis
Last Updated: (none)
Blender Version: 2.43

Animation: Liquid in Bowl

This tutorial describes how to animate liquid.


Liquid animation in this tutorial involves:


This tutorial uses the previous one:

  1. Read the Two-toned Bowl tutorial.
  2. Download its .blend file.
  3. Start Blender and load tutorial-07.blend.

Adjust View

  1. Click RMB on the camera.
  2. Press F9.
  3. Change the Lens to 75 to zoom into the bowl.
  4. Press g then z then .5 to centre the bowl in the camera's view.
  5. Press NUM7.
  6. Press z to reveal meshes.
  7. Press NUM- until the light object appears.
  8. Click RMB on the light.
  9. Press F9.
  10. Click Hemi.

    Lights, Camera and ... Bowl!

Provide Sphere of Fluid

  1. Press NUM1.
  2. Press NUM+ to zoom into the bowl.
  3. Click RMB on the bowl to select it.
  4. Press F9.
  5. Click Centre New.
  6. Press SHIFT-S.
  7. Click Cursor-> Selection.
  8. Press SPACE.
  9. Click Add » Mesh » IcoSphere.
  10. Click OK.
  11. Press s then .5 to scale the IcoSphere.
  12. Press g then z then .5 to move the IcoSphere.
  13. Press F7 twice to view the Physics buttons.
  14. Click Enable to activate fluid mechanics for the IcoSphere.
  15. Click Fluid to make the IcoSphere behave like liquid.
  16. Press Tab for Object mode.

Provide Bowl of Obstacle

  1. Click RMB on the bowl to select it.
  2. Click Enable to activate fluid mechanics for the bowl.
  3. Click Obstacle to make the bowl interact with liquid.
  4. Click Init Shell.
    The liquid should interact with the bowl's surface (that is, its mesh), not volume. Many other tutorials neglect to mention this step. The result is that the liquid will leak through the obstacle's mesh. Other ways to reduce the chance of leaking liquid include:
    • Add a subsurface to the mesh (Subsurf).
    • Increase the number of vertices in the mesh (Subdivide).
    • Increase the Resolution.
    • Increase the thickness of the mesh.
    These solutions might help, yet will increase the amount of animation render time. And they might not help as much as expected.
  5. Press Tab for Edit mode.
  6. Press CTRL-n then Enter to recalculate the normals to the outside.
    This step may not be necessary, but it serves to emphasize the idea that the rendered surfaces should be facing to the outside.
  7. Press Tab for Object mode.

Provide Cube of Domain

  1. Press NUM7 to view from the top.
  2. Press a to deselect the bowl.
  3. Press SPACE.
  4. Click Add » Mesh » Cube.
  5. Press s then x then 2 to scale the cube along the X-axis.
  6. Press s then y then 2 to scale the cube along the Y-axis.
  7. Press NUM1 to view from the side.
  8. Press g then z then .5 to shift the cube up the Z-axis.

    Fluid, Obstacle and Cube

  9. Click Enable to activate fluid mechanics for the cube.
  10. Click Domain to restrict the fluid's area of motion to the cube.

Fluid Settings

  1. Provide a directory for the Blender-generated fluid files (e.g., //bowl/anim).
  2. Create a bowl directory in the same spot as the .blend file.
  3. Press F10.
  4. Change End from 250 to 50.

Generate Mesh Sequence

  1. Press Tab.
  2. Press F9.
  3. Click Set Smooth.
  4. Press F7.
  5. Click BAKE and wait a while.
  6. Press ALT-a to watch the mesh fall.
  7. Press ESC when the joy of watching the mesh fall wears thin.
  8. Press F12 then ESC to return.

    Gravity-defying Liquid

Hide Fluid Object

  1. Click RMB on the fluid object (Sphere.001) to select it.
  2. Press m then 2 then Enter to move the fluid object to Layer 2.

Preview Animation

When satisfied with the way the falling liquid mesh behaves, preview the animation.

  1. Press F10.
  2. Click 25%.
  3. Change the Format from Jpeg to PNG.
  4. Click Render » Render Animation.
  5. Wait a while.

Encode Animation

Here is how I use Ubuntu Linux to generate a video file from a series of images:

  1. Find the directory where rendered files are saved (usually /tmp; check the Output tab).
  2. Change to that directory:
    cd /tmp
  3. Encode using Mencoder, at 25 frames per second (fps):
    mencoder mf://*.png -mf type=png:fps=25 -ovc lavc -o bowl.avi
  4. Play using Mplayer:
    mplayer bowl.avi

Loose Ends

Some issues remain, which may be too subtle to notice, but are nonetheless present. The liquid:

Resolve these as follows:

  1. Press F7.
  2. Click RMB on the bowl.
  3. Click Part.
  4. Change PartSlip Amount to 0.25.
    This is between sticky and frictionless, producing drops of liquid that slide down the bowl's surface.
  5. Press NUM1.
  6. Click RMB on the Plane object.
  7. Click Enable.
  8. Click Obstacle.
  9. Click Init Shell.
  10. Press Tab then e then z then -0.1 to extrude the plane, giving it thickness.
    This step is optional because Init Shell has been selected. If, instead, Init Volume was clicked, then you would have to extrude the Plane. That said, the extrusion will not affect the outcome.
  11. Press Tab to return to Object mode.

    Extruded Plane

Generate Final Animation

If the preview looks great, bump up the resolution and image size.

  1. Press F10.
  2. Click 50%.
  3. Change End to 150.
  4. Press F7.
  5. Change Preview-Res. to 50.
  6. Change Resolution to 100.
  7. Delete the animfluidsurface_preview_*.bobj.gz files.
  8. Delete the .png files.
  9. Press F10.
  10. Click BAKE and wait.
  11. Click Render » Render Animation.
  12. Go stretch your legs.

When the render has finished, encode the .png files as before.

THE END - Download Video

3D Gallery | Blender Tutorials | Dance Workshops | Essays | Quantum Entanglement

Copyright © 2007-2008 by Dave Jarvis