Modelling Water in Blender

Modelling water is a requirement for one of my new videos as water is central to the story. The video opens with a large lake surrounded by mountains and a blue sky overhead. At the edge of the lake there is a dockside with lots of coloured shipping containers stacked high in bright blue and red. The far edge of the dockside is bounded by a rail line full of freight wagons loaded with shipping containers ready for onward transportation.

A white and blue boat sits on dark grey water as a vehicle approaches to load a bright red shipping container onto it
Mac’s experimental research facility by a lake
Red and blue shipping containers are sitting on green rail freight wagons
Rail freight wagons with shipping containers loaded

This place is Professor Mac’s research facility where he films experiments teaching the principles of physics and engineering. The scene is set for his new video explaining Archimedes’ Principle. This principle explains why some objects float and others sink.

To demonstrate the principle Mac drops the shipping containers into water. The challenge in creating the video is how to model the water and simulate the objects interacting with the water.

Rendering water

I use Blender for creating my videos. I use it to create objects and I apply a material to the surfaces to give each object colour and texture. Then when I want to create a picture of the object I get Blender to produce the picture through a process known as rendering. You may think of this as the computer firing light rays around the scene and creating the picture from what it sees in the light beam. This takes many minutes depending on the content of the scene.

For a video I need many thousands of images (also known as a frames). During the video each frame is shown one after the other to produce movement of the objects in the scene. Due to the large number of frames required for a 10 minute video, I want to minimise the time to create each frame. The nature of the surface of the objects affects this. If there is a highly reflective surface this requires lots of additional computation during rendering. Unfortunately water is reflective and therefore my images of the lake and Mac dropping objects into it takes a lot of time to render.

Modelling and animating water

The other element of modelling water is that it moves when the wind or other objects interact with it. You may say I’m stating the obvious. However the computer doesn’t know it moves unless I get it to model the movement. One way to do this is to have a texture on the water surface. A texture is a picture of a surface so you can have a picture of real water. By placing this on the surface of the water model in Blender and moving it around, it is possible to make it look like there are small ripples on the water surface. This is very quick to do and looks realistic for water being gently moved by the wind. However in my video I’m dropping objects into the water. These move the water in a way that can only be captured by doing fluid simulation.

Fluid simulation for modelling water

This is a mathematical modelling technique where the motion of a fluid is predicted. It uses equations and computer algorithms to solve the interaction of the fluid with objects such as the boundary wall of a lakeside scene or an object dropping into the fluid. The modelling needs significant computer processing. Blender has a fluid simulator and I use this when modelling objects dropping into water.

Blender fluid simulation is done using software code called Mantaflow. It enables you to define a fluid and the objects that interact with the fluid. So how do I use this to create the animation of Mac dropping shipping containers into the lakeside? Well I define a region of the water in the lake as the fluid and the shipping container as an object that will interact with the water. In order to get the simulation started I need to animate the motion of the container. The fluid simulation then works out how the water moves as it interacts with this moving container.

A solid grey steel plate is dropped into a tank of dark water giving a deep depression in the water surface
A Blender Mantaflow simulation of a steel block being dropped into a tank of water

I’ve made a video of a simulation of Mac dropping a solid block of steel into the lake. This sinks rather than floats. You can see the video at the top of this post. If you want to know why it sinks you will be able to find out once I release my video explaining Archimedes’ Principle.

Before you go

You should check out my video on modelling the vehicle used in the video.

Share

Mac

I teach physics and engineering through animation.

You may also like...

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.