FAQ: Simulating sand, grains and other gritty materials.


•  How do I simulate sand/grains/etc?

Granular forces can be applied to particles using a Particle Physics operator. By changing the collision/cohesion settings, you can influence how individual particles will interact with each other.

Addition inter-particle bindings can be added using a Particle Bind operator. By using a combination of Particle Physics and Particle Bind operators, you can simulate any number of different materials: dry sand, wet sand, dirt, clay, mud, dust, etc.

•  Why are my granular particles so unstable?

While granular simulations don’t typically require a high number of Particle Bind Solver steps (5-10 is usually more than enough), they do require a high number of overall simulation substeps. A value of at least “14 frame” is usually necessary, with values of “18 frame” or even “116 frame” sometimes being necessary to maintain simulation stability when a lot of dense particle stacking is occurring. The number of overall simulation substeps necessary is usually dependent on the overall strength of gravity in the simulation, and the size of the granular particles. The smaller the particles, the more substeps are required to keep them stable.

You can also alleviate some stability issues independent of the solver step count by increasing inter-particle collision tolerance, and increasing the collision mass z-bias, within the Particle Physics operator.

•  How do I increase framerate when displaying my granular particles in the viewport?

Granular simulations often feature huge numbers of particles, but trying to display so many individual pieces of geometry in the viewport (even with GPU instancing) can be a frustratingly laggy process.

tyFlow’s Display operator has a “Sprite” mode, designed specifically for granular simulations. When displaying particles as sprites, they will appear as spheres in the viewport, whose size is determined by each particle’s scale value. The spheres are not fully geometric though – they are actually just 2D textures projected on camera-facing planes. So instead of rendering hundreds/thousands of triangles for each granular particle’s mesh, the GPU only needs to render two. This provides a massive performance boost in the viewport, and makes it easy to visualize granular simulations at a reasonable framerate.

Viewport sprites are not renderable. If you wish to render granular particles, you will still need to assign appropriate Shape/Mesh operators to the flow.