Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

When possible, build emitters and Simulators to real-world scale. Phoenix FD uses real-world calculations to create its effects, so working with real-world units will make your task much easier. E.g. a waterfall should be tens of meters tall (thousands of centimeters), while a glass of water should be 0.2 m / 20 cm tall. It does not matter which unit you choose for displaying the units - meters, centimeters, inches, etc., as long as it corresponds to the real-world size of the effect.

Section
Column
width40%

To follow along this tutorial, you must first go through the Creating a Simple Liquid Simulation tutorial, or if you already have an existing liquid-only simulation setup, you can modify it following the steps from this tutorial steps.

Column
width60%

 

...

 

Section
Column
width40%

With the Simulator node selected, go to the Foam tab rollout and select Enable Foam. A message box asking if you want a particle shader generated will appear. Choose Yes.

Note that in the Outliner, 3 new items have appeared - a shader Particle Shader, a new set and a particle group inside the set.

Rename the shader node to phx_foam_shader_01. The shader, unsurprisingly, The Particle Shader contains the shading parameters for the foam particles. You can choose the render mode for the particles, adjust their size sizes and count, or enable/disable Motion Blur, etc.

Rename the set to phx_foam_set. This set The phxParticle_set1 set is used to specify what particle groups systems the shader Particle Shader is responsible for shading at rendertimerender time. In some cases you may want to have multiple particle groups affected systems drawn by the same shader, or multiple shaders affecting drawing the same particle groupsystem.

Expand the phx_foam_set and rename the node inside to pg_ phxParticle_set1. Inside it there is the particle system for the Simulator's foam. You can think of the particle groups systems as a reference references to the particles in the simulation. A single Simulator can create several particle systems and these particle system nodes allow you to pick individual systems in Particle Shaders or for example in the Phoenix Particle Texture.

There are five groups types of particles that the Phoenix FD Simulator can output - Liquid, Foam, Splash, Mist and Drag.

Column
width60%

 

...

 

Section
Column
width40%

Foam, Splash and Mist particles are Any of these particles can be rendered using a custom Phoenix FD Particle Shader that references the particlees particles in the Particle Systems set.

Column
width60%

...

Section
Column
width40%

In the Foam tab rollout of the Simulator node, reduce the Foam Amount to 1. This parameter specifies the number of foam particles to be born when a given cell/voxel satisfies the birth condition, in thousands per second.

Reduce the Birth Threshold to 2.

The Birth Threshold specifies the velocity threshold above which the liquid is considered turbulent enough for foam birth. Foam birth only occurs under these three circumstances:
1. When a liquid experiences turbulent movement.
2. When a splash particle collides with the liquid.
3. When an emitter is adding foam particles to the simulation

The Max Outside Life Age parameter specifies the number age of seconds a particle may live outside of the particle at which it would die if it exits the simulation grid.

The Size parameters control the size of the Foam particles. Even though it's possible to override those values at rendertime render time using the particle shader Particle Shader, it's a good idea to set them to some reasonable values because the B2B (bubble to bubble) Interaction relies on them.

The B2B Interaction controls the internal interaction between bubbles. This option is used when the foam should have a volume. It forces a proper distance between the bubbles and keeps them stuck together. It's very useful when doing fuzzy drinks/beer simulations, and you'll notice that the Beer preset has some very specific B2B Interaction settings.The Variation Small/Large parameters specifiy specify how much smaller/larger the bubbles are relative to the Size parameter.

  • 0 means that all bubbles are always at least as small/big as specified by the Size parameter.
  • 1 means that the smallest/largest bubbles are two times smaller/larger than the Size value.

Size Distribution specifies how many times the amount of average bubbles exceeds the amount of the largest bubbles.

The B2B Interaction controls the internal interaction between bubbles. This option is used when the foam should pile up and form volume, like a beer cap. It forces a proper distance between the bubbles and keeps them stuck together. It's very useful when doing fuzzy drinks/beer simulations, and you'll notice that the Beer preset has some very specific B2B Interaction settings.

Column
width60%

 

...

 

Section
Column
width40%

Start the simulation to see the result.

You can go to the Preview -> Particle Preview tab rollout of the simulator and disable Show Mesh and the preview of Liquid particles by deselecting Show Selected System. This allows you to isolate specific particle types and troubleshoot their behavior.

Column
width60%

...

Section
Column
width40%

Go to the Splash/Mist tab rollout and select Enable Splash/Mist. When prompted with a message asking if you'd like a new particle shader Particle Shader generated, choose Yes.

Rename the generated nodes to phx_splash_shader_01, phx_splash_set and pg_splash.

Keep the settings at their default values.

The concept of splashes in Phoenix FD is a bit more complicated than it is with foam. Simply put, splashes are generated when the surface of the liquid deforms. For more information, check FLIP Particles Life Cycle.

The lower the Birth Threshold parameter is, the more places on the liquid surface will produce splashes.

Splash particles are generated FROM the liquid - meaning , that by default the liquid disappears and splash particles are created in its place. Then, when the splash particle returns back to the main body of water, it's converted back into liquid (controlled by the Affect Liquid parameter).

The Splash Amount determines how many splash particles are equal to a single liquid particle in volume. This value also affects the particle size - larger values decrease the size of splash particles.

Splash particles can also generate Foam when they hit the liquid surface. The Foam on Hit parameter control controls this behavior.

Lastly, Splash particles can split into Mist particles while in mid air. During its motion, a splash particle constantly produces breaks down into smaller splash particles, ultimately converting to mist particles, decreasing the volume of the splash. The Split to Mist parameter controls how fast the splash particles are converted into mist.

Column
width60%

...

Section
Column
width40%

Even though the tickbox reads Enable Splash/Mist, only a Splash particle shader is automatically generated. If you'd like to also render the mist Mist, follow the steps below:

First, create a new Particle Shader from the Phoenix FD Menu or from the Phoenix Self.

Set the Mode ot Points.Rename the shader node to phx_mist_shader_01 and the generated set to phx_mist_set of the Particle Shader to Points.

Note that this time around the set of the Particle Shader is empty. You need to manually add the particle group to the set and connect the simulator node to the shadersystem Particles_Mist_of_0_PhoenixFDSimulator1 to phxParticle_set3 (by middle button dragging the system under the set, or by editing the sets via the Edit Particle Systems button on the Particle Shader).

Column
width60%

 

...

 

Section
Column
width40%

Select Also connect the PhoenixFDSimulator1 node to the Liquid Simulator slot of the Particle Shader, by selecting the Simulator and then shift select the mist particle shader and click +selecting the Particle Shader and pressing the Set Selected Object button in the mist shader's Attribute Editor windowas Liquid Simulator button.

Column
width60%

 

...

 

Section
Column
width40%

Run the simulation again.

Hide the Phoenix Simulator which is responsible for rendering the liquid mesh, and also the Foam and Splash Particle Shaders.

Hit render - you should now be able to see the mist particles rendered as points

With the Simulator selected, go to Windows -> Node Editor. Graph the Input/Output connections for the simulator and find the PG_ ... _Mist node. Middle mouse button drag it into the phx_mist_set so the mist shader is aware of it.

Then, rename it to pg_mist to keep things consistent.

Column
width60%
Before after
afterLabelShow Only Mist
beforeLabelShow All
Panel
borderStylenone

Image Added

Panel
borderStylenone

Image Added

Image Removed

 

...

 

Section
Column
width40%

There are too few Mist particles and furthermore they are barely visible in the combined render when they are rendered as Points.

Increase the Count Multiplier of the Particle Shader to 10. This will create additional Mist particles at render time to make the mist render thicker.

Switch the Mode of the Particle Shader to Fog. Under the Particle Shader's Fog rollout, reduce the Fog Voxel Size to 0.1 (the same as the Simulator's Cell Size), and also increase the Fog Density to 1 to make the mist thicker.

Hide all Phoenix FD nodes but the phx_mist_shader.

Hit render - you should now be able to see the mist particles rendered as points

Column
width60%
Image Added

 Image Removed

 

...

 

Section
Column
width40%

That is all. You should now have a working particle setup with Foam, Splashes and Mist. Play with the Simulator properties and the Particle Shader attributes to get a good understanding of how everything ties together. You may also like to go through the Particle Shader tutorial or head over to the documentation page.

Column
width60%
Before after
afterLabelShow Only Mist
beforeLabelShow All
Panel
borderStylenone

Image Added

Panel
borderStylenone

Image Added

Image Removed