Table of Contents Show
There is always a greater or lesser deposition of organic and inorganic substances in our oceans. This includes, for example, the calcium carbonate shells of diatoms, dead plankton and everything that marine life emits. This continuous shower of material is called marine snow, or ocean dandruff.
The idea of writing a VEX programme for Houdini that simulates the movement of marine snow in the ocean came to me during an exciting presentation at FMX 2024 in Stuttgart. Weta had presented just such a model there, but without going into details or even revealing anything about the code. In the end, it was only clear that the script runs in Houdini.
I have programming experience, but hardly in the simulation area and mainly in Python. So far I had mainly written batch tools, i.e. programmes that execute repetitive processes, e.g. creating shaders, importing assets, etc. The Marine Snow project seemed manageable to me and a good start to do something in the simulation area. So, let’s dive in!
Every beginning is difficult
Ultimately, the big question is always how and where do you start? Apart from the slowly fading memory of the Weta lecture, I had almost no clues as to how the movement of particles could be represented in a physically plausible way. The fact that the simulation was to run in Houdini’s POP solver was almost all I knew at that point. At least the POP system provides a number of ready-made nodes that can be used to transfer forces to particles. Probably the most common example of such a force is gravity, which can be represented with a POP Force DOP. This was once an idea, but it quickly became apparent that POP Force is not flexible enough. Some things can only be solved properly using a script.
So I started by looking for references. What video material was available from which the basic features of the movement or patterns could possibly be derived? Research also involves reading scientific papers. Even if you don’t understand the maths or only have a rudimentary understanding of it, you can often find valuable approaches in the accompanying texts and descriptions. There was film footage of Marine Snow, but no papers that would have helped me. (Here is a link to a video from NOAA, showing a red squid on the ocean, in a “storm” of marine snow. Have a look at the other results from this Expedition, it is amazing and as usual with Deep Sea Science, quite alien. ).
The number of hits for videos was manageable, but sufficient to formulate some assumptions.
- There are two determining forces: gravity and buoyancy.
- The wave motion at the surface amplifies the cyclical up and down motion.
- The particles have different sizes and densities, which influences the buoyancy.
- New particles are constantly formed and enter the system. Other particles are deposited on the seabed and are thus removed from the system.
- The particles are in a medium with a certain viscosity (water).
- Turbulent currents cause swirls and sideways movements.

So how do we get started? What factors should you take into account and what can you try to formulate later? I found it easiest to simulate the forces mentioned in point 1, i.e. the interplay between gravity and buoyancy. Many people will probably remember the formula below from their school days, as it is one of the fundamental equations of Newtonian physics:
F = m * a
The force acting on a particle is the product of its mass and acceleration. For the force of attraction (“gravitation”), acceleration is a constant that is characteristic of every body. Here, on Earth, the constant is not called a, but g and has a value of around 9.81 m/s2. In physics, the mass is given in [kg]. The force is therefore a compound unit and is called Newton [N].
(1) gravity = particle mass in kg * 9.81 m/s2
The equation may seem trivial, but it is of great importance for a script because it already represents a calculation rule. For the buoyancy, however, I had to use the search engine I trust and it spit out Archimedes’ law of buoyancy.
(2) buoyancy = density of water * particle volume * 9.81 m/s2
The factor 9.81 again corresponds to g from the gravitational force. The particle volume can be approximated as a sphere. For a sphere, a collection of formulae says that the
(3) particle volume = 4/3 * PI * particle radius3
The particle mass can now also be derived:
(4) particle mass = density of the particle * particle volume
Before we can start calculating the forces, we first need particles. This is done using a small standard mesh that generates points in a cuboid. These particles in turn are sent to a POP solver, inside which a POP Wrangle performs the necessary calculations. In addition to the POP Wrangle, the interior of the solver also contains a POP Kill Node. A complete description of the network can be found here.(→ see POP Up)
It is also important to define start values. Their size and dimension ultimately determine the behaviour of the particles just as much as the calculations themselves.
// Initial variables
float g = 9.81; // Gravitational acceleration in m/s^2
float radius_p = 0.005; // Particle radius in m
float rho_p = 1050.0; // Particle density in kg/m^3
float rho_f = 1030.0; // Fluid density in kg/m^3, e.g. water
To begin with, the script should determine the particle volume and mass, as these values are then used in the formulae. Equations (3) and (4) therefore result in
// Intitial calculations
float volume_p = (4.0 / 3.0) * M_PI * pow(radius_p, 3);
float mass_p = rho_p * volume_p;
The constant M_PI is the circle number, which is predefined in VEX with sufficient accuracy.
Both forces, i.e. gravity (gravity_force) and buoyancy (buoyancy_force), are vectors, but they only act in the Y direction. Gravity always acts downwards towards the centre of mass, while buoyancy counteracts this force. A standard vector in VEX consists of three components, which here represent the XYZ coordinates.
// Calculate force components
vector gravity_force = mass_p * set(0, -g, 0);
vector bouyancy_force = set(0, (rho_f * volume_p - mass_p) * g, 0);
This corresponds to the formulae defined at the beginning with one small exception. With buoyancy_force, the mass is again subtracted in the brackets to obtain the net buoyancy force. This is particularly relevant if a particle’s density is greater than the density of the liquid. This simulates sinking, as the weight force is greater than the buoyancy.
