Page Contents


Overview


The foam simulation follows several simple rules: underwater bubbles rise up, bubbles in the air fall down, bubbles can stick to each other and can be resistant to external pressure.

The foam may be born from the liquid, splash droplets, a Source, or a script. The foam disappears when it exits the grid (see the Max Outside Age parameter), or randomly (see the Half Life parameter). You can see the FLIP Particles Life Cycle for more information on how Foam particles are created or destroyed.

UI Path: ||Select Liquid Simulator | LiquidSim object|| > Modify panel > Foam rollout

 

Parameters


 

Enable | foam – Enables the birth and simulation of Foam particles.

Birth


Foam Amount | fbirth – Specifies the number of particles to be born when a given cell meets the birth condition, in thousands per second. This parameter does not affect the foam born by splashes.

Birth Threshold | fbthres – Foam is born where the liquid movement is turbulent. If the difference in velocity between two neighbor voxels is higher that this threshold, foam particles should be born. This means that the lower this option is, the more foam will be born and also the more places in the simulator would allow foam to be born. The scale of the option is in units/sec. For more information, see the Birth Threshold example below.

Birth Volume | usefbconfgeom, fbconfgeom – When enabled, allows the foam to be born naturally by the simulation only inside a specified geometry object. This includes foam born according to the conditions set by the Foam Amount and Birth Threshold parameters of the Foam, as well as the Foam on Hit parameters of the Splash. The foam born inside the Birth Volume can travel outside the volume without a problem. The difference between this approach and spawning foam inside a volume manually from a Source object is that using a Birth Volume, the foam birth will follow the simulation criteria of the simulation and will look and behave more naturally.

By default, the birth volume geometry is not automatically converted to a non-solid and it will behave as a rigid body in your simulation. In this case, the Volume Fadeout can be used to expand an area around the object where Foam/Splash births are possible. You can convert the geometry to a non-solid from its PhoenixFD properties.

Volume Fade Dist |  fbconfgeomfade – Controls how far the foam particles will spawn around the specified Birth Volume geometry object.

 

 

Example: Birth Threshold


The following video provides examples to show the differences of Birth Threshold values of 50100, and 200.

 

Lifespan




The particle Age channel must be exported in order for these options to take effect (from the Source or from the Output panel, depending on the way the foam is generated).

Half Life fhlf – The time required for the particles to reduce to half of their initial count, in seconds. Affects only the foam bubbles above the liquid surface - those inside the volume will not burst until they reach the surface. You can force this process by increasing the Rising Speed.

Vary | hlvary – In nature, not all the bubbles have the same half life. Bigger bubbles burst quicker than smaller ones, and bubbles inside foam live longer. When this option is enabled, the Half Life of each bubble is modified taking into account its size and its surroundings.

Max Outside Age | foutlife – If a particle exits the grid, and its age (in seconds) exceeds this parameter, the particle will be killed instantly.

 

Size



 


Size | fsize – Specifies the size of the bubbles.

Larger bubbles rise faster while they are underwater, while smaller ones rise more slowly.

Variation Small | fshrink – Specifies how much smaller the bubbles can be, relative to the Size parameter. 0 means that all bubbles are always at least as big as Size. 1 means that the smallest bubbles are two times smaller than Size. 10 means that the smallest bubbles are 11 times smaller than Size. For more information, see the Variation Small example below.

Variation Large | fsizevar – Specifies how much larger the bubbles can be, relative to the Size parameter. 0 means that all bubbles are never larger than Size. 1 means that the largest bubbles are two times larger than Size. 10 means that the largest bubbles are 11 times larger than Size. You can also use the Distribution parameter to control the balance between the number of small and large bubbles.

Distribution | fszdstrb – Specifies how many times the amount of average bubbles exceeds the amount of the biggest bubbles. 0 means that all sizes will be equally distributed. 100 means that there will be 100 times more bubbles with the average size than the biggest ones. For more information, see the Distribution example below.


 

Example: Variation Small


The following video provides examples to show the differences when Variation Small is set to 01, and 50.

 

 

Example: Distribution


The image below provides more details on the differences between Distribution values of 1, 20, and 100.

 

Dynamics


 

 

B2B Interaction | fcycles – Controls the internal interaction between bubbles (bubble-to-bubble interaction). This option is used when the foam should have a volume. It forces a proper distance between the bubbles and keeps them stuck together. This parameter controls the number of interactions per second. Higher values result in better preservation of the foam's volume. This parameter has linear growth order. In other words, the time taken for calculation is longer when the value is higher. For more information, see the B2B Interaction below.

Rising Speed | frise – Affects only the foam particles which are inside the liquid volume. This is the maximal speed of ascent of the average-sized bubbles. Bubbles larger than Size rise faster and smaller bubbles rise more slowly. Note that bubbles inside the liquid volume are carried by the velocity of the liquid, and also affected by this parameter. The scale of the option is in units/sec. For more information, see the Rising Speed example below.

Falling Speed | ffall – Affects only the foam particles which are outside of the liquid volume. This parameter controls the drag force of foam flying through the air. Lowering this parameter towards zero would cause foam to rapidly slow down when flying in the air, or hang in the air for a long time until it falls down. Note that this parameter affects only foam which is outside the liquid volume, while foam inside of the liquid mesh or which is mixed up with flying Liquid particles would have the same velocity as the liquid. In the second case, if the Falling Speed is too low, the foam might abruptly slow down at the moment it separates from the liquid that carries it. The scale of the option is in units/sec. For more information, see the Falling Speed example below.

The Falling Speed parameter affects how far a flying foam particle may travel. A higher Falling Speed may lead to separate bubbles thrown far away from the simulator which leads to huge bounding box and thus slower rendering. 

Therefore, this parameter can dramatically affect the rendering speed.

Sticky Foam | fstickyControls the ability of the bubbles to stick to a geometry. This option requires that the B2B interaction is greater than zero.

Surface Lock | fsrflock – Affects the bubbles placed on the liquid surface. It controls the influence of the liquid movement over the surface bubbles. In most cases, this parameter is used together with the patterns generator. It can dramatically change the result.

 

 

Example: B2B Interaction


The following video provides examples to show the differences when B2B Interaction is set to 0500, and 1000.

 

 

Example: Rising Speed


The following video provides examples to show the differences when Rising Speed is set to 020, and 100.

 

 

Example: Falling Speed


The following video provides examples to show the differences when Falling Speed is set to 1050, and 100.

 

Patterns


 


Strength | fptrn – Controls the simulation of the foam patterns caused by the fine vertical liquid movement. For more information, see the Strength example below.

Radius | fptrnsz – The average radius in scene units of a single circular pattern core.

 

 

Example: Patterns Strength


The following video provides examples to show the differences of Pattern Strength values of 00.5, and 1.0.