Foam Object

This object enables you to add foam, trapped air and spray to the fluids. A simple setup using a PBD Fluids object and a cube to act as a collider to contain the fluid particles can give this sort of result. The blue particles are the main fluid particles and the white particles are the foam, generated by a separate emitter:

Note that you can use the Foam object with both PBD Fluids and Fluid FX, the Domain object and indeed any source of particles.

Interface

The object's interface looks like this:

For the 'Groups Affected' and 'Falloff' tabs, and for the buttons at the bottom of the interface, please see the 'Common interface elements' page.

Emission settings

Emitter

Drag the emitter to use to spawn foam particles into this link.

Create

Click this button to create a new spawning emitter and add it to the 'Emitter' link field. This emitter will be used to create the foam particles.

Crest Rate

This is the spawn rate (can be fractional) for particles created at the crest of waves (using the 'Min Crest' and 'Max Crest' settings).

Air Rate

This is the spawn rate for foam particles created as trapped air between colliding fluid particles (controlled with the 'Min Impact' and 'Max Impact' settings)'

After Age

Only those fluid particles which are older than this setting will create foam particles. This enables an emitter to fill or flow before creating the foam particles (otherwise on emission foam particles would be created immediately).

Variation

Add some variation to the 'After Age' setting for each particle so that not all foam is created at the same time.

Life

The maximum lifespan of the foam particles. Their actual lifespan depends on how they were created (potential of creation/velocity of particles).

Variation

Adds some variation to the life of the foam particles so that they don't all disappear at once.

Radius

This parameter controls the spawning radius - that is, the radius of the sphere around each fluid particle that creates foam. It gives more control over the offset of the foam from the fluid surface.

Surface

This parameter controls the smoothing radius used to calculate the fluid surface. At 100% it matches that used by the fluid solver (i.e. either Fluid FX or PBD Fluids), but at this value the foam may be located too far away from the meshed surface. At around 50% the fluid surface is closer to the mesh and gives better results for the foam offset from the surface.

Min Speed and Max Speed

This is the speed range needed by the fluid particles to create the foam particles. The highest speed (most energetic) fluid particles of your simulation should be set to create foam particles.

Min Crest and Max Crest

These settings represent the curvature of the wave crest needed to create foam particles. A low value implies something flat (which would not realistically create spray) and high values mean something like a wave curving right back on itself (again not realistic) so mid-range value are more natural.

Min Impact and Max Impact

These are the impact speeds between particles needed to trap air and generate foam.

Advection settings

Buoyancy

This is the force with which the particles resist the effect of gravity. The lower this value, the more likely is it that particles will sink below the surface of the fluid.

Drag

This controls how much the fluid drags the foam/air particles, but does not affect spray.

Gravity

Drag a Gravity modifier into this link to specify which modifier to use. Otherwise the fluid object will use the first gravity modifier it finds when evaluating modifiers for this emitter (used for buoyancy, opposite to gravity direction).

Spray

On creation of the foam particles this controls how much random velocity is given to them to spray them away from the creation point.

Rotation

If this is set then the foam particles are given a rotation which is then aligned (Y axis) to the fluid surface (when near the surface).

Please Note: if the foam spawning emitter is emitting particles this setting will only align their rotation if 'Use Rotation' in the spawning emitter was enabled.

Foam Density and Spray Density

The surrounding fluid density below which particles are considered to be spray or foam.