From BlenderWiki

Jump to: navigation, search

Fluid Simulation

Mode: Object mode / Edit mode (Mesh)

Panel: Physics sub-context → Fluid

Hotkey: F7

Description

While modeling a scene with blender, certain objects can be marked to participate in the fluid simulation, e.g. as fluid or as an obstacle. The bounding box of another object will be used to define a box-shaped region to simulate the fluid in (the so called “simulation domain”). The global simulation parameters (such as viscosity and gravity) can be set for this domain object.

Using the BAKE button, the geometry and settings are exported to the simulator and the fluid simulation is performed, generating a surface mesh together with a preview for each animation frame, and saving them to hard disk. Then the appropriate fluid surface for the current frame is loaded from disk and displayed or rendered.

A breaking dam example.


Process

In general, you follow these steps:

  1. Model the scene (objects, materials, lights, camera).
  2. Designate the portion of the scene where the fluid will flow (the domain).
  3. Specify the functions of the various objects as they relate to the fluid (an inlet, outlet, or obstruction, etc.).
  4. Create the fluid source(s), and specify its (their) material, viscosity, and initial velocity.
  5. Bake in a preliminary simulation.
  6. Revise as necessary, saving changes.
  7. Bake in a final simulation.

When you Bake, the version identifier in the User Preferences header changes to a status bar, showing the number of frames baked and the total number to go. Baking takes a lot of compute power (and time). Don’t watch it, because we all know that a watched pot does not boil, a watched cake does not bake, and watching fluid bake is like watching grass grow. Baking is best done overnight.

Because of the possibility of spanning and linking between scenes, there can only be one domain in an entire .blend file.

Options

The basic (and frequently needed) fluid simulation options.
Less frequently needed advanced options.
Domain/Fluid/Obstacle/Inflow/Outflow/Particle/Control
Selecting one of these buttons determines how the enabled object will be used during the simulation. Each button determines a different functionality/interaction, and each has different further options that will become available.
Mesh rendering
If the mesh has modifiers, the rendering settings are used for exporting the mesh to the fluid solver. Depending on the setting, calculation times and memory use might exponentially increase. For example, when using a moving mesh with Subsurf as an obstacle, it might help to decrease simulation time by switching it off, or to a low subdivision level. When the setup/rig is correct, you can always increase settings to yield a more realistic result.


Domain

10cm mug at Resolution 70.
10cm mug at Resolution 200.

The bounding box of the object serves as the boundary of the simulation. All fluid objects must be in the domain. Fluid objects outside the domain will not bake. No tiny droplets can move outside this domain; it’s as if the fluid is contained within the 3D space by invisible force fields. There can be only a single fluid simulation domain object in the scene.

The shape of the object does not matter because it will always be treat like box (The lengths of the bounding box sides can be different). So, usually there won’t be any reason to use another shape than a box. If you need obstacles or other boundaries than a box to interfere with the fluid flow, you need to insert additional obstacle objects inside the domain boundary.

This object will be replaced by the fluid during the simulation.

Resolution

The granularity at which the actual fluid simulation is performed. This is probably the most important setting for the simulation as it determines the amount of details in the fluid, the memory and disk usage as well as computational time.

Note that the amount of required memory quickly increases: a resolution of 32 requires ca. 4MB, 64 requires ca. 30MB, while 128 already needs more than 230MB. Make sure to set the resolution low enough, depending on how much memory you have, to prevent Blender from crashing or freezing. Remember also that many operating systems limit the amount of memory that can be allocated by a single process, such as Blender, even if the machine contains much more than this. Find out what limitations apply to your machine.

Be sure to set the resolution appropriate to the real-world size of the domain (the actual physical size of the domain, in meters, is set in the Advanced Settings). If the domain is not cubic, the resolution will be taken for the longest side. The resolutions along the other sides will be reduced according to their lengths (therefore, a non-cubic domain will need less memory than a cubic one, resolutions being the same).

Preview-Res

This is the resolution at which the preview surface meshes will be generated. So it does not influence the actual simulation. Even if “there is nothing to see” in the preview, there might be a thin fluid surface that cannot be resolved in the preview.

Start and End time

Start is the simulation start time (in seconds). This option makes the simulation computation in Blender start later in the simulation. The domain deformations and fluid flow prior to the start time are not saved.

For example, if you wanted the fluid to appear to already have been flowing for 4 seconds before the actual first frame of data, you would enter 4.0 here.

End is the simulation ending time (in seconds).

Start and end times have nothing to do with how many frames are baked, but instead are based on physical force and fluid viscosity.

Baking always starts at Frame #1:
The fluid simulator disregards the Sta setting in the Anim panel, it will always bake from frame 1.
If you wish the simulation to start later than frame 1, you must key the fluid objects in your domain to be inactive until the frame you desire to start the simulation. See below for more information.
Baking always ends at the End Frame set in the Anim panel:
If your frame-rate is 25 frames per second, and ending time is 4.0 seconds, then you should (if your start time is 0) set your animation to end at frame 4.0 × 25 = 100.
“Start Time” and “End Time” are expressed in simulation time (seconds):
If you set Start time to 3.0, and End time to 4.0, you will simulate 1 second of fluid motion. That one second of fluid motion will be spread across however-many frames are set in your End setting in the Anim panel.
This means, for example, that if you have Blender set to make 250 frames at 25 fps (Scene context → Render sub-context → Anim and Output panels), the fluid will look like it had already been flowing for 3 seconds at the start of the simulation, but will play in slow motion (one-tenth normal speed), since the 1 second fluid sim plays out over the course of 10 video seconds. To correct this, change the end time to 3.0 + 10.0 = 13.0 to match the 250 frames at 25 fps. Now, the simulation will be real-time, since you set 10 seconds of fluid motion to simulate over 10 seconds of animation. Having these controls in effect gives you a “speed control” over the simulation.


Disp.-Qual

How to display a baked simulation in the Blender GUI (first pulldown menu) and for rendering (second one):

  • Geometry : Use the original geometry (before simulation).
  • Preview : Use the preview mesh.
  • Final : Use the final high definition mesh.


When no baked data is found, the original mesh will be displayed by default.

After you have baked a domain, it is displayed (usually) in the Blender window as the preview mesh. To see the size and scope of the original domain box, select Geometry in the left dropdown.

Bake directory

REQUIRED! Directory and file prefix to store baked surface meshes with. This is similar to the animation output settings, only selecting a file is a bit special: when you select any of the previously generated surface meshes (e.g. “untitled_OBcube_fluidsurface_final_0132.bobj.gz”), the prefix will be automatically set (“untitled_OBcube_” for this example). This way the simulation can be done several times with different settings, and allows quick changes between the different sets of surface data.

The default value is “/tmp/”, which is probably not what you want. Choose an appropriate directory-name and file prefix so that these files will be stored in an appropriate location and named in such a way that two different fluid-simulations won’t conflict with one another (if you’re intending to specify only a directory-name here, i.e. without a filename-prefix, don’t forget the trailing “/”).

“BAKE” Button

Perform the actual fluid simulation. The Blender GUI will freeze and only display the current frame that is simulated. Pressing Esc will abort the simulation. Afterwards two “.bobj.gz” (one for the Final quality, one for the Preview quality), plus one “.bvel.gz” (for the Final quality) will be in the selected output directory for each frame.

Notes…

Freeing the previous baked solutions
Deleting the content of the “Bake” directory is a destructive way to achieve this. Be careful if more than one simulation uses the same bake directory (be sure they use different filenames, or they will overwrite one another)!
Reusing Bakes
Manually entering (or searching for) a previously saved (baked) computational directory and filename mask will switch the fluid flow and mesh deformation to use that which existed during the old bake. Thus, you can re-use baked flows by simply pointing to them in this field.
Selecting a Baked Domain
After a domain has been baked, it changes to the fluid mesh. To re-select the domain so that you can bake it again after you have made changes, go to any frame and select (RMB Template-RMB.png) the fluid mesh. Then you can click the BAKE button again to recompute the fluid flows inside that domain.


“St”/“Ad”/“Bn”/“Par” Buttons

Till now, we were in the Standard buttons. Clicking another one of these buttons will show other “panels” (groups of controls: Advanced, Bn for boundary, and Particle) of more advanced options, that often are fine set at the defaults.

Standard
The settings in this set are already been described above…
Advanced
Gravity vector
Strength and direction of the gravity acceleration and any lateral (x,y plane) force. The main component should be along the negative z-axis (in m.s-2).
Please Note: All of the x,y,z values should not be zero, or the fluid won’t flow! Imagine a droplet floating in the nothingness of deep space… It must be some small number in at least one direction.
Viscosity
The “thickness” of the fluid and actually the force needed to move an object of a certain surface area through it at a certain speed. You can either enter a value directly or use one of the presets in the drop down (such as honey, oil, or water).
For manual entry, please note that the normal real-world viscosity (the so-called dynamic viscosity) is measured in Pascal-seconds (Pa.s), or in Poise units (P, equal to 0.1 Pa.s, pronounced “pwaz”, from the Frenchman Jean-Louis Poiseuille, who discovered the laws on “the laminar flow of viscous fluids”), and commonly centiPoise units (cP, equal to 0.001 Pa.s, “sentipwaz”). Blender, on the other hand, uses the kinematic viscosity (which is dynamic viscosity in Pa.s, divided by the density in kg.m-3, unit m2.s-1). The table below gives some examples of fluids together with their dynamic and kinematic viscosities.
Manual entries are specified by a floating point number and an exponent. These floating point and exponent entry fields (scientific notation) simplify entering very small or large numbers. The viscosity of water at room temperature is 1.002 cP, ou 0.001002 Pa.s; the density of water is about 1000 kg.m-3, which gives us a kinematic viscosity of 0.000001002 m2.s-1 - so the entry would be 1.002 times 10 to the minus six (1.002×10-6 in scientific notation). Hot Glass and melting iron is a fluid, but very thick; you should enter something like 1.0×100 (= 1.0) as its kinematic viscosity (indicating a value of 1.0×106 cP).
Note that the simulator is not suitable for non-fluids, such as materials that do not “flow”. Simply setting the viscosity to very large values will not result in rigid body behavior, but might cause instabilities.
Viscosity varies
The default values in Blender are considered typical for those types of fluids and “look right” when animated. However, actual viscosity of some fluids, especially sugar-laden fluids like chocolate syrup and honey, depend highly on temperature and concentration. Oil viscosity varies by SAE rating. Glass at room temperature is basically a solid, but glass at 1500 degrees Celsius flows (nearly) like water.


Blender Viscosity Unit Conversion
Fluid dynamic viscosity (in cP) kinematic viscosity (Blender, in m2.s-1)
Water (20°C) 1.002×100 (1.002) 1.002×10-6 (0.000001002)
Oil SAE 50 5.0×102 (500) 5.0×10-5 (0.00005)
Honey (20°C) 1.0×104 (10,000) 2.0×10-3 (0.002)
Chocolate Syrup 3.0×104 (30,000) 3.0×10-3 (0.003)
Ketchup 1.0×105 (100,000) 1.0×10-1 (0.1)
Melting Glass 1.0×1015 1.0×100 (1.0)
Realworld-size
Size of the domain object in the real world in meters. If you want to create a mug of coffee, this might be 10 cm (0.1 meters), while a swimming pool might be 10m. The size set here is for the longest side of the domain bounding box.
Gridlevel
How many adaptive grid levels to be used during simulation - setting this to -1 will perform automatic selection.
Compressibility
If you have problems with large standing fluid regions at high resolution, it might help to reduce this number (note that this will increase computation times).
Bn (Boundaries)
Boundary type
This is the same as for obstacle objects below, it will basically set the six sides of the domain to be either sticky, non-sticky, or somewhere in between (this is set by the PartSlip Amount value).
Surface Smoothing
Amount of smoothing to be applied to the fluid surface. 1.0 is standard, 0 is off, while larger values increase the amount of smoothing.
Surface Subdivision
Allows the creation of high-res surface meshes directly during the simulation (as opposed to doing it afterwards like a subdivision modifier). A value of 1 means no subdivision, and each increase results in one further subdivision of each fluid voxel. The resulting meshes thus quickly become large, and can require large amounts of disk space. Be careful in combination with large smoothing values - this can lead to long computation times due to the surface mesh generation.
Generate SpeedVecs/Disable
If this button is clicked, no speed vectors will be exported. So by default, speed vectors are generated and stored on disk. They can be used to compute image based motion blur with the compositing nodes.
Particles
Here you can add particles to the fluid simulated, to enhance the visual effect.
Tracer Particles
Number of tracer particles to be put into the fluid at the beginning of the simulation. To display them create another object with the Particle fluid type, explained below, that uses the same bake directory as the domain.
Generate Particles
Controls the amount of fluid particles to create (0=off, 1=normal, >1=more). To use it, you have to have a surface subdivision value of at least 2.
An example of the effect of particles can be seen here - the image to the left was simulated without, and the right one with particles and subdivision enabled.


Fluid

All regions of this object that are inside the domain bounding box will be used as actual fluid in the simulation. If you place more than one fluid object inside the domain, they should currently not intersect. Also make sure the surface normals are pointing outwards. In contrast to domain objects, the actual mesh geometry is used for fluid objects.

Volume init type
  • Volume will initialize the inner part of the object as fluid. This works only for closed objects.
  • Shell will initialize only a thin layer for all faces of the mesh. This also works for non closed meshes.
  • Both combines volume and shell - the mesh should also be closed. See the picture below.
Example of the different volume init types: Volume, Shell and Both. Note that the shell is usually slightly larger than the inner volume.
Initial velocity
Speed of the fluid at the beginning of the simulation, in meters per second.
Blender3D FreeTip.gif
The direction of Surface Normals makes a big difference!
Blender uses the orientation of the Surface Normals to determine what is “inside of” the Fluid object and what is “outside”. You want all of the normals to face outside (in Edit mode, use CtrlN or press Space and choose Edit → Normals → Calculate Outside). If the normals face the wrong way, you’ll be rewarded with a “gigantic flood of water” because Blender will think that the volume of the object is outside of its mesh! This applies regardless of the Volume init type setting.


Obstacle

This object will be used as an obstacle in the simulation. As with a fluid object, obstacle objects currently should not intersect. As for fluid objects, the actual mesh geometry is used for obstacles. For objects with a volume, make sure that the normals of the obstacle are calculated correctly, and radiating properly (use the Flip Normal button, in Edit mode, Mesh Tools panel, Editing context [F9]), particularly when using a spinned container. Applying the Modifier SubSurf before baking the simulation could also be a good idea if the mesh is not animated.

Volume init type
Same as for a fluid object above.
Boundary type (see picture below)
Determines the stickiness of the obstacle surface, called “Surface Adhesion”. Surface Adhesion depends in real-world on the fluid and the graininess or friction/adhesion/absorption qualities of the surface.
  • Noslip causes the fluid to stick to the obstacle (zero velocity).
  • Free(-slip) allows movement along the obstacle (only zero normal velocity).
  • Part(-slip) mixes both types, with 0 being mostly noslip, and 1 being identical to freeslip.
Note that if the mesh is moving, it will be treated as noslip automatically.
Example of the different boundary types for a drop falling onto the slanted wall. From left to right: no-slip, part-slip 0.3, part-slip 0.7 and free-slip.
Animated Mesh/Export
Click this button if the mesh is animated (e.g. deformed by an armature, shape keys or a lattice). Note that this can be significantly slower, and is not required if the mesh is animated with position or rotation Ipos (i.e. only object transformations).
PartSlip Amount
Amount of mixing between no- and free-slip, described above.
Blender3D FreeTip.gif
Animated Objects are No Slip
If an obstacle is moving, Blender treats it automatically as no slip (sticky). If you want fluid to splash off of a moving object, put an transparent plane in the spot where the fluid will hit the moving object, exactly aligned and shaped as the object, but just a tiny bit in front of the object between the object and the fluid. As the object whizzes by and the fluid splashes, the splash will actually contact the stationary transparent plane and slide off, and the object will continue on its merry way.


Impact Factor
Amount of fluid volume correction for gain/loss from impacting with moving objects. If this object is not moving, this setting has no effect. However, it if is and the fluid collides with it, a negative value takes volume away from the Domain, and a positive number adds to it. Ranges from -2.0 to 10.0.


Inflow

This object will put fluid into the simulation (think of a water tap).

Volume init type
Same as for a fluid object above.
Inflow velocity
Speed of the fluid that is created inside of the object.
Local Coords/Enable
Use local coordinates for the inflow. This is useful if the inflow object is moving or rotating, as the inflow stream will follow/copy that motion. If disabled, the inflow location and direction do not change.
Animated Mesh/Export
Same as for an obstacle object above.


Outflow

Any fluid that enters the region of this object will be deleted (think of a drain or a black hole). This can be useful in combination with an inflow to prevent the whole domain from filling up. When enabled, this is like a tornado (waterspout) or “wet vac” vacuum cleaner, and the part where the fluid disappears will follow the object as it moves around.

Volume init type
Same as for a fluid object above.
Animated Mesh/Export
Same as for an obstacle object above.


Particle

This type can be used to display particles created during the simulation. For now only tracers swimming along with the fluid are supported. Note that the object can have any shape, position or type - once the particle button is pressed, a particle system with the fluid simulation particles will be created for it at the correct position. When moving the original object, it might be necessary to delete the particle system, disable the fluidsim particles, and enable them again. The fluidsim particles are currently also unaffected by any other particle forces or settings.

Particle type
Drops
Surface splashes of the fluid result in droplets being strewn about, like fresh water, with low Surface Tension.
Floats
The surface tension of the fluid is higher and the fluid heavier, like cold seawater and soup. Breakaways are clumpier and fall back to the surface faster than Drops, as with high Surface Tension.
Tracer
Droplets follow the surface of the water where it existed, like a fog suspended above previous fluid levels. Use this to see where the fluid level has been.
Size Influence
The particles can have different sizes, if this value is 0 all are forced to be the same size.
Alpha Influence
If this value is >0, the alpha values of the particles are changed according to their size.
Path (bake directory)
The simulation run from which to load the particles. This should usually have the same value as the fluid domain object (e.g. copy by CtrlC, CtrlV).


Control

Fluid control options.
Time
You specify the start and end time during which time the fluid control object is active.
Attraction force
The attraction force specifies the force which gets emitted by the fluid control object. Positive force results in attraction of the fluid, negative force in avoidance.
Velocity force
If the fluid control object moves, the resulting velocity can also introduce a force to the fluid.
Quality
Higher quality result in more control particles for the fluid control object.
Reverse
The control particle movement gets reversed.

See these release notes for more information.

Another example animation of a falling drop, simulated in Blender and rendered in Yafaray.


Animating Fluid Property Changes

A new type of Ipo Curve, FluidSim, is available for fluid domain objects. Unlike most other animatable values in Blender, FluidSim Ipos cannot be keyframed by simply using the I key; you must manually set values by clicking in the Ipo window. In order to set a keyframe, you must select the property you wish to animate in the Ipo window and CtrlLMB Template-LMB.png click to set the keyframe to the desired location in the Ipo window.

Blender3D FreeTip.gif
Enter Properties
Note that you do not have to be exact on where you click; we recommend that after you set the control point, open the Transform Properties panel (N) and round the X value to a whole frame number, and then set the Y value that you wish.


The fluid domain has several channels that control the fluid over time:

Fac-Visc
A multiplicative factor in the fluid’s viscosity coefficient. It must be set before baking, and changes the viscosity of the fluid over time, so you can turn water into wi… oil, for example!
Fac-Tim
Changes the speed of the simulation; like the Speed Control in the VSE can speed up or slow down a video, this curve can speed up or slow down the fluid motion during a frame sequence. If the value for Fac-Tim is less than or equal to zero, time (and the fluid) stands still; the fluid freezes. For values between 0.0 and 1.0, the fluid runs slower and will look thicker. 1.0 is normal fluid motion, and values greater than 1.0 will make the fluid flow faster, possibly appearing thinner.
GravX/GravY/GravZ
The XYZ vector for gravity changes; aka inertia of the fluid itself (think drinking a cup of coffee while driving NASCAR at Talladega, or sipping an espresso on the autobahn, or watering the plants on the Space Shuttle). Changes in these curves make the fluid slosh around due to external forces.

The Fluid, Obstacle, Inflow, Outflow and Particle objects can use the following channels:

VelX/VelY/VelZ
Spurts of water from the garden hose can be simulated via these curves, to mimic changes in pressure and/or direction. It also can be used to simulate the effect of wind on a stream of water, for example.
Active
When Active transitions from 0.0 to something greater than 0 (such as between 0.1 and 1.0), the object’s function (designated as an Inflow, or Outflow, etc.) resumes its effect. Crossing down to 0.0 and then at some point, back up, re-establishes the effect and the resulting fluid sim. Use this for dripping, or any kind of intermittent inflow. This active status also works for objects designated as Outflow and Obstacle, so you can also simulate (for example) a drain plugging up.

You can also control the force settings of Control objects:

AttrForceStr, AttrForceRa
These curves control the values of the attraction force settings.
VelForceStr, VelForceRa
These curves control the values of the velocity force settings.


Technical Details

“My cup runneth over”, created with Blender and Yafaray.

Fluid animation can take a lot of time - the better you understand how it works, the easier it will be to estimate how the results will look. The algorithm used for Blender’s fluid simulation is the Lattice Boltzmann Method (LBM); other fluid algorithms include Navier-Stokes (NS) solvers and Smoothed Particle Hydrodynamics (SPH) methods. LBM lies somewhere between these two.

In general, it is really hard for current computers to correctly simulate even a 1-meter tank of water. For simulating a wave crashing through a city, you would probably need one of the most expensive supercomputers you could get, and it might still not work properly, no matter which of the three algorithms above you’re using. Therefore, to achieve “the effect that you really want”, you’ll need to resort to strategies very similar to what filmmakers have been doing (quite successfully…) in “analogue” movies for many years: “fake it!

A good fluid simulation is a very important part, but not the only part, of achieving a satisfactory image. Let Blender do the computational dirty-work of calculating the basic fluid simulation, then create realism by adding carefully selected details that match the viewer’s expectations for “the real-life maelstrom that you have created”.

For example, you can pretend to have a wave in a gigantic city by: building a smaller model, modeling a small wave in the model at very high resolution, and hope that nobody will notice the difference between a 100m and a 1m wave (they won’t). Texture the wave front with lots of noise and clouds affecting the color. Add lots of smoke (mist) emitters on the various surfaces that the wave hits, timing each of them to emit at the moment of impact in a direction incident to the surface and collision. Animate cars and trash (and drowning people…) to float and bob on the wave front using the baked mesh. Use a string of mist emitters pointing up positioned at the wave crest to simulate the mist that blows off the top of the crest into the air. Consider exactly where you want to put the camera, whether you want to use a zoom lens or a wide angle, and so on (is the viewer to be “looking down upon the poor unfortunate actors”, or “drowning along with them”?). This is the kind of attention to detail, above and beyond the fluid simulation itself, that will carry the shot.

For Blender’s LBM solver, the following things will make the simulation harder to compute:

  • Large domains.
  • Long duration.
  • Low viscosities.
  • High velocities.

The viscosity of water is already really low, so especially for small resolutions, the turbulence of water can not be correctly captured. If you look closely, most simulations of fluids in computer graphics do not yet look like real water as of now. Generally, don’t rely on the physical settings too much (such as physical domain size or length of the animation in seconds). Rather try to get the overall motion right with a low resolution, and then increase the resolution as much as possible or desired.

Hints

  • Don’t be surprised, but you’ll get whole bunch of mesh (.bobj.gz) files after a simulation. One set for preview, and another for final. Each set has a .gz file for each frame of the animation. Each file contains the simulation result - so you’ll need them.
  • Currently these files will not be automatically deleted, so it is a good idea to e.g. create a dedicated directory to keep simulation results. Doing a fluid simulation is similar to clicking the ANIM button - you currently have to take care of organizing the fluid surface meshes in some directory yourself. If you want to stop using the fluid simulation, you can simply delete all the *fluid*.bobj.gz files.
  • Before running a high resolution simulation that might take hours, check the overall timing first by doing lower resolution runs.
  • Fluid objects must be completely inside the bounding box of the domain object. If not, baking may not work correctly or at all. Fluid and obstacle objects can be meshes with complex geometries. Very thin objects might not appear in the simulation, if the chosen resolution is too coarse to resolve them (increasing it might solve this problem).
  • Note that fluid simulation parameters, such as inflow velocity or the active flag can be animated with Fluidsim Ipos (see above).
  • Don’t try to do a complicated scene all at once. Blender has a powerful compositor that you can use to combine multiple animations.
For example, to produce an animation showing two separate fluid flows while keeping your domain small, render one .avi using the one flow. Then move the domain and render another .avi with the other flow using an alpha channel (in a separate B&W .avi?). Then, composite both .avi’s using the compositor’s add function. A third .avi is usually the smoke and mist and it is laid on top of everything as well. Add a rain sheet on top of the mist and spray and you’ll have quite a storm brewing! And then lightning flashes, trash blowing around, all as separate animations, compositing the total for a truly spectacular result.
  • If you’re having trouble, or something isn’t working as you think it should - let me know: send the .blend file and a problem description to nils at thuerey dot de. Please check these wiki pages and the blenderartists-forum before sending a mail!


Limitations & Workarounds

  • One domain per blender file (as of Version 2.42), but you can have multiple fluid objects.
Workaround: For previews, move the domain around to encompass each fluid flow part, and then for final, scale up the size of the domain to include all fluid objects (but computation will take longer). This is actually a benefit, because it lets you control how much compute time is used, by varying the size and location of the domain.
  • If the setup seems to go wrong, make sure all the normals are correct (hence, enter Edit mode, select all, and recalculate normals once in a while).
  • Currently there’s a problem with zero gravity simulation - simply select a very small gravity until this is fixed.
  • If an object is initialized as Volume, it has to be closed and have an inner side (a plane won’t work). To use planes, switch to Shell, or extrude the plane.
  • Blender freezes after clicking BAKE. Pressing Esc makes it work again after a while - this can happen if the resolution is too high and memory is swapped to hard disk, making everything horribly slow. Reducing the resolution should help in this case.
  • Blender crashes after clicking BAKE - this can happen if the resolution is really high and more than 2GB are allocated, causing Blender to crash. Reduce the resolution. Many operating systems limit the total amount of memory that can be allocated by a process, such as Blender, even if the machine has more memory installed. Sux…
  • The meshes should be closed, so if some parts of e.g. a fluid object are not initialized as fluid in the simulation, check that all parts of connected vertices are closed meshes. Unfortunately, the Suzanne (monkey) mesh in Blender is not a closed mesh (the eyes are separate).
  • If the fluid simulation exits with an error message (stating e.g. that the “init has failed”), make sure you have valid settings for the domain object, e.g. by resetting them to the defaults.
  • You may not be able to bake a fluid that takes more than 1GB, not even with the LargeAddressAware build - it might be a limitation of the current fluid engine.
  • Note that first frame may well take only a few hundred MBs of RAM memory, but latter ones go over one GB, which may be why your bake fails after awhile. If so, try to bake one frame at the middle or end at full res so you’ll see if it works.
  • Memory used doubles when you set surface subdivision from 1 to 2.
  • Using “generate particles” will also add memory requirements, as they increase surface area and complexity. Ordinary fluid-sim generated particles probably eat less memory.



TODO: check these links...

See Also

External Documentation



Acknowledgements

The integration of the fluid simulator was done as a Google Summer-of-Code project. More information about the solver can be found at www.ntoken.com. These Animations were created with the solver before its integration into blender: Adaptive Grids, Interactive Animations. Thanks to Chris Want for organizing the Blender-SoC projects, and to Jonathan Merrit for mentoring this one! And of course thanks to Google for starting the whole thing… SoC progress updates were posted here: SoC-Blenderfluid-Blog at PlanetSoC.

The solver itself was developed by Nils Thuerey with the help and supervision of the following people: U. Ruede, T. Pohl, C. Koerner, M. Thies, M. Oechsner and T. Hofmann at the Department of Computer Science 10 (System Simulation, LSS) in Erlangen, Germany.

http://www10.informatik.uni-erlangen.de/~sinithue/img/lsslogo.png http://www10.informatik.uni-erlangen.de/~sinithue/img/unierlangenlogo.png




Introduction
What is Blender?
Introduction
Blender’s History
License
Blender’s Community
About this Manual
What's changed with Blender 2.4
Installing Blender
Introduction
Python
Installing on Windows
Installing on GNU/Linux
Installing on Mac
Installing on other Operating Systems
Configuring Blender
Directory Layout
Starting
The Interface
Introduction
Keyboard and Mouse
Window System
Arranging frames
Headers
Console window
Window Types
Screens (Workspace Layouts)
Scenes
Configuration
Modes
Contexts
Menus
Panels
Buttons and Controls
Internationalization
Your First Animation
1/2: A static Gingerbread Man
2/2: Animating the Gingerbread Man
The Vital Functions
Quick render
Undo and Redo
Default scene
Screenshots
Help!
Setting Preferences
Configuring Preferences
Interface
Editing
Themes
File
System
Interaction in 3D
Introduction
Introduction
Navigation
Introduction
3D View
3D View Options
3D View Usage
Camera View
Layers
Local or Global View
Sketch in 3D Space
Introduction to Grease Pencil
Drawing sketches
Layers and Animation
Converting sketches to geometry
Transformations
Introduction
Basics
- Grab/Move
- Rotate
- Scale
- Gestures
Advanced
- Mirror
- To Sphere
- Shear
- Warp
- Push/Pull
Transform Control
Introduction
Precision of Transformations
Numeric Transformations
Transform Properties
Reset Object Transforms
Manipulators
Transform Orientations
Axis Locking
Pivot Point
- Active object
- Individual Centers
- 3D Cursor
- Median Point
- Bounding Box Center
Snapping
Snap to Mesh
Proportional Edit
Data System and Files
Blender's Data System
Blender's Library and Data System
Blender's Datablocks
Scenes
Working with Scenes
The Outliner Window
Appending and Linking
File operations
Introduction
Opening blender files
Saving blender files
Modeling
Introduction
Introduction
Objects
Objects
Selecting Objects
Editing Objects
Groups and Parenting
Tracking
Duplication
- DupliVerts
- DupliFaces
- DupliGroup
- DupliFrames
Mesh Objects
Meshes
- Mesh Structures
- Mesh Primitives
Selecting
- Selectable Elements
- Selection Basics
- Advanced Selecting
- Selecting Edges
- Selecting Faces
Editing
Basic Editing
- Translation, Rotation, Scale
- Adding Elements
- Deleting Elements
- Creating Faces and Edges
- Mirror editing
Vertex Editing
Edge Editing
Face Editing
Deforming Tools
- Mirror
- Shrink/Fatten Along Normals
- Smooth
- Noise
Duplicating Tools
- Duplicate
- Extrude
- Extrude Dup
- Spin
- Spin Dup
- Screw
Subdividing Tools
- Subdivide
- Subdivide fractal
- Subdivide smooth
- Loop Subdivide
- Knife Subdivide
- Bevel
Miscellaneous Tools
Retopo Tool
Sculpt Mode
Multi Resolution Mesh
Vertex Groups
Weight Paint
Mesh Smoothing
Curve Objects
Curves
Selecting
Editing
Advanced Editing
Surface Objects
Surfaces
Selecting
Editing
Text Objects
Texts
Editing
Meta Objects
Metas
Editing
Empty Objects
Empties
Group Objects
Groups
Scripts
Modeling Scripts
Modifiers and Deformation
Introduction
Introduction
Modifiers Stack
Modify
UVProject
Generate
Array
Bevel
Booleans
Build
Decimate
EdgeSplit
Mask
Mirror
Subsurf
Deform
Armature
Cast
Curve
Displace
Hooks
Lattice
MeshDeform
Shrinkwrap
SimpleDeform
Smooth
Wave
Simulate
Cloth
Collision
Explode
Fluid
Particle Instance
Particle System
Soft Body
Lighting
Introduction
Introduction
Lights
Introduction
Light Properties
Light Attenuation
Light Textures
What Light Affects
Lights In Other Contexts
Shadows
Introduction
Shadow Properties
Raytraced Shadow Properties
Volumetric Lights
Introduction
Lamps
Introduction
Lamp Light
- Raytraced Shadows
Spot Light
- Raytraced Shadows
- Buffered Shadows
- Halos
Area Light
- Raytraced Shadows
Hemi Light
Sun Light
- Raytraced Shadows
- Sky & Atmosphere
Lighting Rigs
Radiosity
Introduction
Rendering
Baking
Scene Light
Ambient Light
Ambient Occlusion
Exposure
Exposure
Materials
Introduction
Introduction to Shading
Materials Introduction
Usage
Assigning a material
Material Preview
Material Options
Multiple Materials
Properties
Diffuse Shaders
Specular Shaders
Ambient Light Effect
Color Ramps
Raytraced Reflections
Raytraced Transparency
Subsurface Scattering (SSS)
Strands
Node Materials
Material Nodes
Nodes Editor
Node Controls
Nodes usage
Nodes Groups
Material Node Types
- Input Nodes
- Output
- Color
- Vector
- Convertor
- Dynamic
Vertex Paint
Using Vertex Paint
Halos
Halos
Textures
Introduction
Introduction
UV/Image Editor
Common Options
Texture Stack
Texture Types
Texture Types
Procedural Textures
Image Textures
Video Textures
Texture Nodes
- Nodes Editor
- Node Controls
- Nodes usage
- Nodes Groups
-- Textures Input Nodes
-- Textures Output Nodes
-- Textures Color Nodes
-- Textures Patterns Nodes
-- Textures Textures Nodes
-- Textures Convertor Nodes
-- Textures Distort Nodes
Texture Plugins
Texture Painting
Painting the Texture
- Projection Paint
Mapping
Mapping
Environment Maps
UV Unwrapping Explained
- Unwrapping a Mesh
- Managing the UV Layout
- Editing the UV Layout
- Applying an Image
Influence
Influence
- Material
-- Bump and Normal
-- Displacement
- Particles
- World
World and Ambient Effects
World
Introduction
World Background
Ambient Effects
Mist
Stars
Rigging
Introduction
Introduction to Rigging
Armatures
Armature Objects
Panels overview
Bones
Visualization
Structure
Selecting
Editing
- Bones
- Properties
- Sketching
- Templating
Skinning
Introduction
Linking Objects to Bones
Skinning to Objects’ Shapes
Retargeting
Posing
Introduction
Visualization
Editing Poses
Pose Library
Using Constraints
Inverse Kinematics
Constraints
Introduction
Introduction
Constraints Common Interface
Constraints’ Stack
Transform Constraints
Copy Location
Copy Rotation
Copy Scale
Limit Distance
Limit Location
Limit Rotation
Limit Scale
Transformation
Tracking Constraints
Clamp To
IK Solver
Locked Track
Stretch To
Track To
Relationship Constraints
Action
Child Of
Floor
Follow Path
Null
Rigid Body Joint
Script
Shrinkwrap
Animation
Introduction
Introduction
The Timeline
Markers
3D Views
Animation Editors
Animation Editors
Ipo Editor
Ipo Curves and Keyframes
Ipo Datablocks
Ipo Types
Ipo Editor Interface
Editing
- Ipo Curves
- Keyframes
Ipo Drivers
Action Editor
Editing Action Channels
NLA Editor
Editing NLA Strips
Strip Modifiers
Animation Techniques
Introduction
Animating Objects
- Using Constraints
- Moving Objects on a Path
Animating Shapes
- Shape Keys
- Editing Shape Keys
- Animating Shape Keys
- Shape Keys Examples
Indirect Shape Animation
Animating Armatures
- Stride
Animating Lamps
Animating Cameras
Animating Materials
Animating Textures
Animating World
Physical Simulation
Introduction
Introduction
Dynamics
Force Fields
Collisions
Particles
Particles
Types
Physics
- Newtonian
- Keyed
- Boids
Visualization
Controlling Emission, Interaction and Time
Cache & Bake
Hair
Children
Vertex Groups
Particle Mode
Soft Body
Introduction
Exterior Forces
Interior Forces
Collisions
Simple Examples
Combination with Armatures
Combination with Hair Particles
Reference
Cloth
Introduction
Fluids
Fluid
Using the Game Engine
Using the Game Engine
Rendering
Introduction
Introduction
Camera
The Camera
Perspective (Vanishing points)
Depth Of Field
Render
Displaying Renders
Basic Options
Antialiasing (Oversampling)
Rendering Animations
Panoramic
Render Baking
Using the Command Line
Output
Output
Video Output
Effects and Post Processing
Introduction
Render Layers
Render Passes
Edges & Toon
Stamp
Color Management & Exposure
Depth Of Field
Motion Blur
Render Performance
Rendering Performance
Distributed Rendering
External Render Engines
Introduction
YafRay
Compositing with nodes
Composite Nodes
Introduction
Nodes Editor
Node Controls
Nodes usage
Nodes Groups
Composite Node types
Composite Node types
Input Nodes
Output Nodes
Color Nodes
Vector Nodes
Filter Nodes
Convertor Nodes
Matte Nodes
Distortion Nodes
Editing Sequences
Introduction
Introduction
The sequencer
Usage
Sequencer Modes
Sequence Screen Layout
Effects
Built-in Effects
Plugin Effects
Audio
Audio Sequences
Extending Blender
Introduction
Introduction
Python Scripting
Python Scripting in Blender
Setting up Python
The Text Editor
A working example
References
Python Scripts
Script Catalog
Bundled Scripts
Plugins
Blender's Plugins System
Texture plugins specifications
Sequence plugins specifications
Game Engine
Introduction
Introduction
The Logic Editor
Usage
Game Properties
Sensors
Introduction
Sensor Types
Controllers
Introduction
Expressions
Actuators
Introduction
Action
Camera
CD
Constraint
Edit Object
Ipo
2D Filters
Game
Message
Motion
Parent
Property
Random
Scene
Shape Action
Sound
State
Visibility
Cameras
Cameras
Dome Camera
Physics
Physics Engine
Material Physics
Object Types
- Static
- No Collision
- Dynamic
- Rigid Body
- Soft Body
- Occluder
- Sensor
Python API
Bullet physics
VideoTexture
Various resources
List of Features
External resources
Game Engine Basics (BSoD Tutorial)
FAQ