NVIDIA Cataclysm Realtime Liquid Solver

Hey Jamie,

That’s good news about the 980, I have not tested Cataclysm on that. There are some things you can do to speed up the simulation. If you are ok with the grid crawling artifacts, you can set LS_MULTIPLIER to 1 instead of 2. That will save some. You may also want to play with the life of the partilces so there are not 2M in there, or lower the rate in cascade so less come out (there is a careful balance between how many particle appear per voxel and how well the simulation behaves, so be aware of that, see answer #3 below).

There is a complex answer to that, and the question can be interpreted in a few ways, so bear with me.

  1. If by weight, you mean you want some particles to float, and some to fall faster, then yes. On a per-emitter basis, you can change the Const Acceleration module on the emitter in cascade. In fact using the cascade to change around the attributes is one of the great powers of Cataclysm. The image below shows two emitters. The emitter on the right has the a slight leftward acceleration added, it’s particles are going toward the wall like gravity has changed. For the emitter on the left, I decreased the acceleration down by an order of magnitude, and added som edo the right, so those particles stay in the air longer and rush to the right. So each emitter has it’s own gravity, and that is taken into account in the simulation, the same way other cascade particle attributes are for GPU particles.

  2. If by weight you mean, you have 10 particles in a voxel and you want 1 to affect the velocity more then the other 9, then no, all the particles have the same weight in that sense. However, Cataclysm sees all the per particle attributes that Cascade passes to the GPU particles. So if you wanted to take over one of those and use it as a weight you may be able to do that. You could also add your own per-particle attribute in ParticleGPUSimulation.cpp. Similar to how class FParticleStateTextures has RandomSubImageTexture, or if you just want it for the liquid you would add it to class FLiquidParticleStateTextures similar to FLIPVelocityTexture. Then, you could access it inside FluidVelocityToGrid.usf the same way VelocityTexture is used but use it as a weight that blends with the normal distance weighted contribution.

  3. If by weight you mean how much mass a particle has then the short answer is that FLIP particles have no mass, and they are only used as tracer particles to define the volume in the voxel grid to simulate. So you can’t really make them heavier in that sense. However, for FLIP to work well, you really want to have more than one particle per voxel contributing. 8 particles per voxel is a common target in research papers, and 4 seems to work good. Anything above MAX_SPLAT_COUNT (defaults 12) will be ignored for velocity/smooth density/surface contribution (that trick is specific to Cataclysm, and not normal FLIP behavior). You can see how large the grid voxels are by using the console variable Fluid.ShowBricks 1. When you do that, you will see the walls of the max domain outlined in red, and you will see in the center a brick in green, and a set of 8 voxels in purple.
    GridSize.jpg
    The splat radius for the velocity is fixed. So each particle is guaranteed to contribute it’s velocity to a voxel. But if you lower the Smooth Kernel Radius (which defines the liquid domain if Surface At Density is > 0) of the Particle Radius(which defines the liquid domain ifSurface At Density<= 0), your particle will have less affect on the simulation and you will get less liquid volume. For less visual volume, separate from the simulation volume, you can lower theRadius Multiplier` which only affects the rendered liquid surface.

I hope that answers your question. If not, please ask again in a different way :slight_smile: