Helpful online articles with No Fluff or Filler.

How to create water simulations with Blender in less than 10 minutes

To create water simulations in Blender, you only need two things:

  • A box that contains the water simulation
  • An object that creates water

The domain object

Let’s start with the “box”. Open up blender and click on the default cube. Make it larger by pressing ‘S‘ and dragging the mouse. Then click to confirm.

With the box still selected, go to the Physics Properties panel and click on Fluid. Then set Type to ‘Domain’ and Domain Type to ‘Liquid’.

Adding water

Until we render the simulation, the domain object will stay as a large cube. To make it easier to see things, lets turn on wireframe mode. To do this, hold down ‘Z‘ and hover your mouse over wireframe. Then either click, or let go of the ‘Z’ key.

Now that we can see, lets create our water object. Hold Shift and press ‘A’. Then, hover your mouse over Mesh and click ‘Cube’. This will create another default cube inside the larger domain object.

With our smaller cube selected, go to the Physics Properties panel, select ‘Fluid’, set Type to ‘Flow’, and set Flow Type to ‘Liquid’.

When selecting the Flow Behavior, you have three options. The two we will focus on are Geometry and Inflow. Geometry is the equivalent of turning any object into water. When you bake the simulation, a cube of water will fall and settle at the bottom of the domain object. But your object isn’t required to be a cube. I could be a character, a donut, even a Suzanne head.

The naming for Inflow and Outflow is a little confusing. Inflow is like turning your object into a water pipe. It will make water flow into the scene. If you set your Flow Behavior to Outflow, it will act like a water drain. Water will flow out of your simulation.

For this tutorial, I will select Geometry.

Baking the simulation

If you haven’t already, make sure to save your Blender file before baking the simulation. By default, Blender will save your simulation data to a random location on your computer. If you are on Windows, it will be somewhere in your AppData directory.

Now, lets bake the simulation. With your domain object selected, navigate to the Properties panel. There are a lot of settings here, but we only need to change a few. Scroll down to the Cache section. This folder path represents where your simulation data will be saved. Simulation data can get quite large, so you can change its location. If it’s set to two forward slashes ‘//‘, this means the data will be saved in the same location as your .blend file. You can, for example, change this to a hard drive with more free space.

Before we hit the bake button, we need to check the Mesh checkbox. If you bake the simulation without having this box checked, it will only generate the particles for the simulation. There will not be an object you can attach a material to. With Mesh enabled, go to the Cache section and change Type to ‘All’. You also have the option of setting Type to ‘Modular’. This allows you to bake the Mesh separately from the fluid particles.

Finally, click the Bake All button.

A progress bar will appear in the timeline. If you cancel the bake, you will have to clear the cache and start over. If you check “Is Resumable” under cache, you will gain the ability to stop and resume a bake. However, it will use more storage space, especially at higher resolutions.

Playing the simulation

Once the bake is complete, you will notice your domain is no longer a square. It has turned into a liquid simulation! Your Inflow/Geometry object will still be visible. To hide it from the viewport and final render, click the eyeball and camera icons in the scene collection to hide it.

To make your water look less pixelated, select the domain (water mesh), right click, and click Shade Smooth.

Finally, if you press spacebar, or hit the ‘Play’ button on the timeline, your simulation should start playing.

Finishing touches

That simulation looks a little boring. Lets make it look a little more realistic. To do this, we are going to do two things:

  • Increase the water’s resolution
  • Add a material and lighting

To increase the simulation resolution, we first have to delete our simulation data by clicking the Free All button. It is in the same location as the Bake All button.

Then, we increase the Resolution Divisions. This setting is located near the top of the Physics Properties panel. For this tutorial, I will set it to 80. But keep in mind, the longer and more complex your simulation it, the longer it will take to bake. I recommend keeping this number low during testing, and turning it up to a reasonable number for the final bake. It will also use more disk space, so be sure your drive has plenty of room. If your simulation is large and complex enough, it can easily take 10-20+ gigabytes.

Scroll back down and click the Bake All button. Once it is finished, you should notice your render has much more detail.

Now lets add a material. First, select the object. Then click on the Material Properties panel. Finally, click the Plus icon to add a new material. You can give it a name, or leave it as “Material”.

To change our material, click on the Shading tab at the top of the 3D viewport. Press Shift + A and search for the Glass BSDF node and the Volume Absorption node. Then, connect the Glass BSDF node the Material Output node. Connect the Volume Absorption node to the Volume connection.

Set the Glass BSDF node’s IOR value to 1.330. Set the color of the Volume Absorption node to hex E7F3FF.

Go back to the Layout Tab. It is to the far left of the Shading Tab. Create a flat ground plane by pressing Shift + A, hover over Mesh, and click Plane. Use G to grab the plane and place it under the simulation. Use S to scale it up.

For lighting, you can duplicate the default point light and change its color and intensity. Alternatively, you can use an HDRI from a site like Poly Haven. Once you have downloaded the HDRI, you can apply it as an Environment Texture in the World Properties.

To make your render look photo realistic, set the Render Engine to ‘Cycles’ in the Render Properties.

Now, when you holdZ‘ and select render, you should see something like this!

This render took about 2 hours to complete in cycles with an RTX 4060


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *