FLIP and Volumetric Rendering

Overview

X-Particles contains a FLIP (Fluid Implicit Particle) system for the simulation of fluids, fire and smoke. Alternative fluid solvers are provided by the Fluid FX and PBD Fluid objects.

The FLIP solver is handled by the xpDomain object. It is important to remember that unlike the other components of X-Particles, and unlike the SPH fluid object, the domain only works within the space that it encloses. Particles or objects outside the domain are unaffected by it.

Fluids

Using the domain for fluids is very simple. After creating a Domain object, add an emitter and ensure it is within the domain. You might also want to add something like a Gravity modifier to ensure the liquid flows downwards. Play the animation and you will see something like this:

You can see that the particles stay within the domain bounds by bouncing off the walls (this is because all the walls are in place - they will flow out if a wall is not present. See the Domain object for details.).

That's all there is to it. You can alter the other properties in the domain, especially Vorticity and Viscosity, then render the particles either with an X-Particles Material or by using the Skinner to generate a mesh. You can use other modifiers to influence the flow: Wind, Turbulence and Drag all produce nice effects. You can add objects to the scene and use the Collider tag to create an 'obstacle' (FLIP systems don't have collider objects, they have obstacles the particles will flow round) or the Avoid modifier for slightly different results.

FLIP fluids are very fast and powerful, the main disadvantage being that they are confined to the boundaries of the domain.

Fire and Smoke

To generate these effects, select 'Gaseous' as the type of domain. You will need a source for the fire/smoke, which can be an emitter if you like, but can be an object instead. If you use an object no separate emitter is required.

Using an Emitter

Add an emitter to the scene, inside the domain, and attach a Domain Tag to it. This indicates that the emitter is to be used as a source of the fire or smoke.

You can leave the particle display on if you like, but it usually helps to turn it off in the emitter's Display tag.

If you run the simulation, nothing will seem to happen. To get some results you need to do two things. First, in the emitter's Extended Data tab, you should set the temperature and smoke values. Try a temperature of 75 and smoke of 20. Secondly, in order to see what is happening you must use one of the display modes in the domain object's Display tab. Since we have added temperature and smoke, either of those would be appropriate. Optionally, you could also add a Gaseous modifier to make the smoke rise. If you don't do that the smoke will stay more or less where it is. Having done all that, with the smoke display you might see this:

Once again you can add the usual modifiers to the system, such as Wind. Note that you may need to turn up the values in the modifiers very high in order to see significant effects.

Using an object

Instead of an emitter, add an object such as a Sphere to the scene, and attach a Domain Tag. The source of the simulation is now the object, and you don't need an emitter - the domain will create an internal one for its own use.

The rest of the setup is the same as for an emitter. However, the temperature, etc. is now controlled by the domain tag, so in the tag set the various parameters to the same as in the emitter. Playing the animation will generate a similar (though not quite identical) result.

Using an Emitter with an object

In Gaseous mode the domain uses its own internal emitter to generate the 'air' particles for the simulation. This is easy and convenient, but you have no access to those particles and cannot change their parameters. If you need to do that, set the domain type to 'Particles (Gas)'. Now you have to supply an emitter which you drag into the 'Particles' field. Note that this emitter's emission mode is set automatically to 'Controlled Only'. We recommend you do not change that setting.

The simulation will behave in the same way but now you can alter the emitter's parameters.

Rendering the result

To render the smoke, fire etc., create an X-Particles Gaseous Material and apply it to the domain object. With the default settings in the material, and after adding some fire to the domain tag on the sphere, this sort of effect may be seen:

Of course, much better results can be obtained but this is to demonstrate how simple it is to set up and render fire and smoke using the FLIP system in X-Particles.

Further information

For more information about the FLIP system you can see the following pages:

Domain Object
Domain Tag
Gaseous Modifier
Vorticity Modifier
Gaseous Material

Volumetric Rendering

In addition to the FLP system, the X-Particles Material can render particles volumetrically to give smoke-like effects without the overhead of the domain.

To do this, apply the material to an emitter and in the material turn on 'Volumetric' in the volumetric tab. You can alter the colour, transparency, etc. in the usual way.