Houdini 20.0 Grains

About Grains

Grains uses Position Based Dynamics to simulate grains of sand and other granular matter.

On this page

The main advantages of Position Based Dynamics (PBD) are its simplicity and controllability: unlike sophisticated solvers such as FLIP and FEM, PBD uses only positional constraints to determine the movement of the points in the system. It resolves penetrations by projecting points to valid locations. This completely avoids the overshooting problems common in force based solvers. It handles collision constraints easily, and is useful for simulating sand and snow.

PBD is often used in games because there is little variance from frame to frame in simulations times. For example, if frame 2 takes 30 seconds, frame 120 will most likely take the same amount of time, assuming there are no additional particles or constraints.

You can use use PBD to simulate a floppy “bag of stuff” look, such as a bean bag chair or a stuffed animal.

You can use PBD to simulate a stringy objects, such as a string of pearls or a necklace. You can simulate sheets of particles to create a fast cloth-like look.

Grains vs traditional POPs

The advantage of the POP Grains over regular POPs is that it allows particles to stack. For a simple sand storm, POPs may be sufficient. However, to create footprints in the sand or crumble a sand castle, you will need to use POP Grains. Using grains doesn’t exclude the ability to take advantage of POPs. You can first use POP Grains to create physical realism to the movement of sand, then apply typical POP nodes to art-direct that motion.

Unlike POPs, which use forces to prevent particles from penetrating, grains use the PBD approach to directly move the particles apart. In addition to being able to stack, this approach allows for a more stable enforcement of the constraints without the sort of explosions that very high forces would produce.

PBD vs FEM

The Particle Based Dynamics grain solver uses a set of constraints between pairs of grains. These constraints express the rest distance between pairs of points, and PBD enforces these constraints to preserve their shape during the simulation. The solver works primarily in terms of point positions. The main advantages of the PDB approach are the consistently fast solve speed and the ability to change point positions directly. You would primarily want to use this for simulating bouncy objects with elastic energy, or background objects.

The finite element solver is based on a physical model, which includes stresses based on strain and volume preservation. The solver works primarily by solving systems of forces and partial derivatives of forces. The main advantages of the finite element approach are the realism of the physically-based simulation and the predictability of the material behavior for varying mesh resolutions and substep sizes. You would primarily want to use this for detailed, physically accurate objects.

Grain Tools

Use the tools on the Grains shelf tab to turn objects into grains of sand.

Dry Sand

Creates a grain object from a piece of geometry.

Wet Sand

Creates a grain object from a piece of geometry, with a clumpy wet look.

Sand Box

Creates a patch of sand with a collision object which contains the sand.

RBD Grains

Fills an object with spheres and uses the Bullet solver to drive them.

Upres Sand

Takes each particle from your original simulation and replaces each one with a cluster of new ones.

Granular Solid

Fills an object loosely with grains and creates constraints to hold it together into one object.

Granular Sheet

Fills the surface of an object with densely packed grains and makes constraints to hold them together.

Granular Strand

Fills grains along the edges of polygons, creating a beaded wire effect.

Auto-Sleep Particles

Allows grains to wake up and go to sleep based on the velocity of nearby particles.

Awaken By Geometry

Activates particles near animated geometry.

Grains

Getting Started

Next Steps