blenderNetwork patreon blender-logos d heart user th book photo pencil map-marker chevron-right comment comments twitter facebook rss chain navicon google-plus envelope linkedin calendar-o tumblr reddit stumbleupon share-alt blogger flattr flag

Fluids Basics

Blender 3d tutorial

Fluids in Blender

To create fluids in Blender 3D, this tutorial covers the basics of fluid simulations. This includes a rundown of how to set up a fluid simulation and how to use inflows, outflows, obstacles, and foam particles.

Quick Fluids

To get started we will use the Quick Fluids feature. To use it, select the default cube (add one if you don't have it), press the Spacebar in the 3D View window, and type in Quick. Then select Quick Fluid.

Quick Fluid starts you off by creating an area in which fluids will exist, called a Domain. This is the tall rectangular box added to the scene. The selected cube is turned into a Fluid. To see things better, press Z to go into Wireframe View. Quick Fluid also applies a basic water material to your fluid.

To view the fluids in action, you to Bake the fluids. Select the domain, go to the Physics section of the Properties window, and click on the button labeled Bake (Req. Memory #.##). You should see the domain disappear and a blob of fluid in the shape of the cube appear. Once your computer is finished baking, click on the play button in the Timeline window.

If you find that baking the fluids is taking far too long, turn down the Resolution. This way, you can test at a low resolution and raise it up when you are ready for the final render.

Inflow

To generate a continuous flow of fluid, rather than the single blob of fluid, you can turn the cube from a Fluid into an Inflow. To do this, select the cube, go to the Physics panel, and change the Type setting from Fluid to Inflow.

Controlling the amount of fluids being added to the scene is done by changing the Inflow Velocity. The higher the velocity, the more fluids that will be created. I am going to change the Z value to -0.500.

To see what our changes have done, select the Domain, now in the shape of the fluids, and click on Bake.

Once done baking, play the animation again. This time, instead of a single plop of fluids, the cube continually adds fluid into the domain until the domain is full.

Outflow

One way to control how much fluid is in the scene is to use an outflow. While the inflow is like a faucet, the outflow is like a drain. Any fluid that touches the outflow object will be removed from the domain.

To create an outflow object, add a sphere to the scene (Shift-A, Mesh, UV Sphere). Scale it down by, say, 0.5 (S, 0.5, Enter) and place it into a bottom corner of our domain, as shown in the image here.

Now go into the Physics settings again and click on the Fluid button to add the fluid simulator to the sphere. Change the Type from None to Outflow.

Like usual, select the domain and bake your fluids again. Once done, play the animation. You should see the domain fill until the outflow is removing as much fluid as the inflow is putting in, causing the water level to stop rising after it engulfs the output object.

Obstacles

Now that we have an inflow and outflow, we want the fluid to interact with an object. To do this, add a cone to the scene (Shift-A, Mesh, Cone). Place that cone directly under the inflow object. Then in the Physics panel, click on the Fluid button to attach the fluid system to the mesh. Finally, change the Type setting to Obstacle.

That is all it takes to create an obstacle for fluids to go around. However, keep in mind that if you choose to use an object that isn't a single solid object as an obstacle, you cannot use Volume for the Volume Initialization setting. You must use Shell or Both.

Again, bake the fluids and replay the animation. If you cannot tell if it is working, try scaling down the inflow object so that the fluid does not simply engulf the cone.

Particles

There are three things the particles may be when talking about the fluid simulator. The first are Drops that break away from the main parts of your fluid. The second are Float particles, which act like foam on the surface of the fluid. The last are Tracer particles, which are particles that follow the flow of the fluid.

Let's start with Drops. You can increase the number of droplets breaking off of the fluid by going to the Fluid Particles section of the Physics panel. Change the Generate setting to 1.000.

Once you've done that, you have to bake your fluids again to include the small drops in your simulation. However, keep in mind that these drops may not be noticable until you render, so you do not have to assume it is not working if it is not showing up in the preview.

Tracers and Floaters

To create the other types of particles, we must create a fluid object that is given a type of Particle. Instead of adding a new mesh, select the outflow sphere and go to its fluid settings. Change Type to Particle.

Then check off the types of particles you want to have generated. These particles will be created with a particle system, which you can use to add materials to a make look different from the rest of the fluids.

Like usual, to get these particle to appear in your simulation, select the domain and bake it again. You should see the particles appear when you play the animation.

With that, you've learned the basics of the fluids system. Feel free to comment and make suggestions about this tutorial below!

 

Keep Learning!

No single tutorial will cover everything, so if you want to dig deeper, here are some resources for you to check out. If you have other resources you think I should add to this list, feel free to let me know!

Blender Docs

Tutorials

Books

Popular Now

Comments

  •  irascibleone / 2556 / AAA
    Yep, I'm still uploading tutorials here. I'm mainly focused on updating and expanding on my old game engine tutorials right now and finishing getting all of my tutorials into this step-by-step format.
  •  anonymous / 39 / rookie
    I have another question, not pertaining to this tutorial. Do you still upload tutorials? Your tutorials are incredibly easy to understand I was wondering if you still upload them to here or if you upload them somewhere else.
  •  irascibleone / 2556 / AAA
    You want to select the existing fluid domain. If you were to change the cube from inflow to a domain, then you wouldn't have any fluids in your scene to bake because Blender would only see two domains in your scene.
  •  anonymous / 39 / rookie
    After changing the Z value to -0.500, do I select the Fluid Domain, or do I change the Cube from Inflow to Domain and then Bake it?