PBD Fluid Object
In X-Particles 3.5 this object was known as the SPH (Smoothed Particle Hydrodynamics) Fluid object. In X-Particles 4 this object uses a better algorithm, Position Based Dynamics (see http://mmacklin.com/pbf_sig_preprint.pdf if you are interested in the technical details).
Brief details on using this object can be found below.
See also the Fluid FX object for a second fluid simulator in X-Particles 4.
Foam is now controlled in a separate object, the X-Particles Foam object.
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.
When considering these parameters, it may be helpful to show short video demonstrations of what they can do. For reference, here is a simple setup with the PBD Fluid object parameters at their defaults:
This sets the fluid simulated viscosity. However, this isn't "true" viscosity, it is an approximation. It adds the velocity influence of the surrounding particles, which gives a more viscous motion. To make a really viscous fluid it might help to add some particle-particle attraction.
You may need to increase this value quite markedly to see significant changes. Here is the reference scene with Viscosity set to 300%:
This increases the curl of the particles motion by adding back in any vorticity already present in the fluid. This will gives a more swirling and turbulent motion. If your fluid needs added vorticity then this can be added using Curl Turbulence (see the Turbulence modifier).
The vorticity in this scene has been increased to 100% and you can see the added turbulence it introduces:
This causes this fluid particles to pull together giving an attraction much like surface tension. You might think this leads to a smoother, more coherent particle stream, but in fact it is attracting particles into clumps, causing the stream to break up. This is the effect with attraction set to 25%:
Causes the fluid particles to be push away from each other to force them to spread out more. This can be used to help to reduce particle clumping when only a few particles are close by. In this video repulsion has been increased to 100%:
This is a factor applied to the particles to prevent them from breaking up into lots of tiny clumps. The effect is to simulate an increase in surface tension which pulls neighbouring particles together. In this video the pressure has been increased to 100%:
The radius over which the properties of the fluid are smoothed (such as density). When this is reduced the smoothing effect is reduced and the result is more chaotic, as seen in this video where the radius is set to 50%:
Damping helps to reduce explosive forces. If you simulate a fluid with a density that is very low then the forces trying to keep the density can become very large, if the smoothing radius isn't sufficiently large enough to smooth over enough particles (low density means the particles are spaced further apart, and if this is beyond the smoothing distance it can become unstable). Increasing this setting damps the forces but also reduces motion from the fluid.
Be careful not to set this too low. If you set it to less than 1% you may find the simulation becomes unstable.
In this video damping is set to 1% and the forces acting on the particle are now greater:
Fluids are normally incompressible so have a constant density. If this parameter is turned on (as it is by default) the density will be checked to ensure consistency in the particle stream. If it is off, no check will be applied and the stream will be more chaotic and perhaps less realistic as a result. The value used in the density check is found in the 'Density' setting.
In this video check density has been disabled:
The value to use when 'Check Density' is on. Note that it cannot be lower than 100%.
Using the PBD Fluid object
PBD Fluids vs. Fluid FX
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 the PBD Fluid Object
The PBD Fluid object is similar to a particle modifier so you need an emitter to generate the particles.
This means that you can treat the object as you would any other modifier. For example, you can drop the PBD Fluid object into an emitter's include/exclude modifiers list if you need to.
You can use other modifiers in conjunction with this object, such as a Gravity modifier, or other dynamics objects such as the Constraints object. If you want the particles to collide with a an object, use a Collider tag in the usual way. The PBD Fluid object simply governs the behaviour of the particles to make the particle flow seem more fluid-like.