Fluid FX

This is a new feature in X-Particles 4. To see how to use it, please see the 'Using Fluid FX' section below.

This page describes the Fluid FX modifier.

Interface

The object's interface looks like this:

For the buttons at the bottom of the interface, please see the 'Common interface elements' page.

Parameters

This object is the overall controller of Fluid FX and most of the changes you will want to make are either in the emitter's Fluid Data section or in the Fluid FX Collider tag. You may not need to change much in this object, but you need to add this object to the scene to use Fluid FX.

Min Steps

Fluid FX uses subframes and this parameter is the minimum number of time steps per frame.

Max Steps

Fluid FX uses subframes and this parameter is the maximum number of time steps per frame.

CFL

In each subframe, a particle must never move farther than its own diameter. (Note: which means that the particle radius will have a significant effect on the simulation.)

The CFL parameter controls how aggressively the solver increases subframes to ensure this condition is met. Technically, a value of 40% is safest (you can lower it but the usual result is a slower simulation and not much else).

Practically, in some simulations, you can increase this value to 90% but collision accuracy and also stability may suffer. It is a matter of testing and experience.

Max Iterations

This is the maximum number of solver iterations. If you reduce it the simulation can be faster but at the cost of reduced accuracy.

Max Compression

This is the maximum loss of fluid volume in percentage terms. If you increase it, fewer iterations are required but the amount of bouncing and elasticity increases, which may not be desirable. Smaller values require more iterations (so the simulation is slower) but reduces the bouncing/elasticity effect.

Check Emission Intersection

In a fluid simulation particles which intersect on creation can cause instability and an exploding simulation. To avoid this check this switch (the default is for it to be checked). You can also use one of the special emitter modes for fluids, Regular or Hexagonal.

Using Fluid FX

Fluid FX vs. PBD Fluids

As you will have noticed, there are two fluid simulation objects in X-Particles 4 - the PBD Fluid object (an updated version of the SPH Fluid object from X-Particles 3.5) and Fluid FX. Which one should you use and when?

In general, the PBD Fluid object is simpler and often faster. But it is not as realistic. Being essentially a particle modifier it works in a similar fashion to other modifiers and can be used along with other modifiers and dynamics objects, including the Cloth object.

Fluid FX is more realistic but can be slower. It is a solver in its own right, so takes over control of the particles and can't be used with other objects.

If you need large or medium scale fluid simulation, Fluid FX is the better choice. If you need small scale, fast simulation and the loss of realism is less important, choose PBD Fluids.

How to use Fluid FX

To use this simulator you will need:

  • a particle emitter
  • the Fluid FX object
  • optionally, a container enclosing the emitter - that is, a polygon object such as a cube - which will be filled with fluid; this object must have a Fluid FX Collider tag attached to it
  • optionally, other objects for the particle stream to collide with - these must also have a Fluid Collider tag attached to them (the standard X-Particles Collider tag will not work)
  • optionally, something to mesh the particles such as an OpenVDB object or Skinner object

With a very basic setup you will see something like this:

You can make further adjustments to the simulation in the emitter's Fluid Data section and in the Fluid FX Collider tag. Those settings are usually more important than the ones in the Fluid FX object, for which the default values are often satisfactory.

Hints on using Fluid FX

Leaking particles

If particles are leaking through the container check the following:

  1. DO NOT use the standard X-Particles Collider tag with Fluid FX. The systems are quite different and in fact it may cause leaks. If you need a standard collider tag on an object (perhaps for Foam particles to collide with) use the Exclusions tab in the collider tag to exclude the emitter used with Fluid FX.
  2. Do you have sufficient substeps? Try increasing the minimum and/or maximum substeps. The more substeps you have, the more accurate the simulation but it will be slower. Bear in mind also that altering the substep values may in some cases change the look of the simulation itself.
  3. Are there enough subdivisions in the collision geometry? Try subdividing the geometry or increasing segment or similar values in parametric objects.
  4. Is the collision offset distance in the Fluid FX Collider tag sufficient? The default is zero, but internally this is difficult to resolve and you may see better results with a small non-zero value in this parameter.
Jumpy collisions

Sometimes collisions with geometry or can be rather jumpy, tending to throw particles at high velocity. If this happens, check the collision offset distance in the Fluid FX Collider tag. If it is too small or too high, that can lead to this kind of problem.

As with leaking particles, you may need more subdivisions in the geometry.

Depending on the collision object you may need to change the geometry sampling value in the Fluid FX Collider tag.

Animated geometry

Introducing animated geometry adds to the complexity of the simulation. Geometry is updated only once per frame, but the solver operates on many steps per frame. This means that the solver cannot see what is happening between its own substeps, because to the solver, a geometry object always looks static. This means that information about the animation is effectively lost and this results in possible issues with quickly moving geometry.