How to Simulate Fluid Spray and Foam in Blender

This guide provides a comprehensive walkthrough for generating realistic secondary fluid particles—specifically spray, foam, and bubbles—using Blender’s built-in Mantaflow physics engine. By enabling and fine-tuning these particle systems within your liquid domain, you can drastically enhance the realism of splashes, ocean waves, and turbulent fluid simulations.

1. Set Up the Base Fluid Simulation

Before adding secondary particles, you must have a functioning liquid simulation:

  1. Create a scene with at least a Domain object (a bounding box) and a Flow object (an inflow or geometry set to liquid).
  2. Select the domain, navigate to the Physics Properties tab, and add a Fluid modifier.
  3. Set the Fluid Type to Domain and the Domain Type to Liquid.
  4. Set up your Flow object by assigning a Fluid modifier, setting the type to Flow, the Flow Type to Liquid, and the Flow Behavior to Inflow or Geometry.

2. Enable Secondary Particles in the Domain

Blender groups spray, foam, and bubbles under the domain's particle settings:

  1. Select the Domain object and go to the Physics Properties tab.
  2. Scroll down to the Liquid panel and check the box labeled Particles.
  3. Under this section, enable the specific particle types you want to generate:
    • Spray: Particles launched above the fluid surface due to high kinetic energy.
    • Foam: Particles that rest and accumulate on the liquid surface where waves collide or churn.
    • Bubbles: Particles trapped underneath the fluid surface that rise slowly to the top.

3. Adjust Particle Generation Parameters

Fine-tune how and when the particles are generated to control density and realism:

  • Wave Crest Potential: Controls how easily foam forms on the tips of turbulent waves. Lower values produce more foam.
  • Trapped Air Potential: Governs bubble creation when water folds over itself.
  • Kinetic Energy Potential: Determines how much force is needed to throw liquid into the air as spray.
  • Particle Scale: Adjusts the overall density and generation count of the particles. Higher numbers yield more particles but increase simulation time and memory usage.
  • Particle Lifetimes: Set maximum and minimum lifespan values to control how long foam lingers before dissolving.

4. Bake the Simulation

Once parameters are configured, bake the cache to generate the physics data:

  1. Scroll down to the Cache panel in the Domain settings.
  2. Set the Cache Type to Modular or All.
  3. If using Modular, click Bake Data for the base mesh first, then click Bake Particles to simulate the secondary dynamics.

5. Render the Secondary Particles

Blender creates separate particle system slots on the Domain object for spray, foam, and bubbles. To make them visible in renders:

  1. Create a small UV Sphere or Icosphere to act as your particle instance object.
  2. Assign a transparent, glass, or water-like material to the instance object using a Principled BSDF with high Transmission and low Roughness.
  3. Select the Domain object and go to the Particle Properties tab.
  4. Select the corresponding particle system (e.g., Liquid Foam or Liquid Spray).
  5. Open the Render panel, change Render As from Halo to Object, and select your instance sphere in the Instance Object field.
  6. Adjust the Scale and Scale Randomness to match the scale of your fluid domain.