Houdini 20.0 Grains

Changing the behavior of grains

For more information, see How to simulate a stable pile of sand without grid patterns.

To...Do this

Make objects break apart

Use the controls in the Explicit Constrains section of the POP Grains node. Turning on the Break Constraints checkbox and setting a Break Threshold, will make objects break apart when forces are applied. If the constraints stretch beyond the threshold, the bonds will break apart.

Make granular solid objects less bouncy

Increase the Stiffness parameter in the Explicit Constrains section of the POP Grains node. This will control how stiff the bonds between particles are.

Create fluffy piles that look like snow

Increase the Shock Scaling Power on the POP Grains node to tame the initial bounce and create fluffier piles that almost look like snow.

Set the height of your sand pile

Use the Constraint Iterations parameter on the POP Grains node to control how many particles high you want the pile to be. This is set relatively low by default for speed purposes.

Make your simulation faster

Turn on the Use OpenCL toggle on the Solver tab of the POP Grains node. This may make things really fast, but it only supports a subset of features. The OpenCL code path operates on all PBD particles, not just the ones in this stream, which is only an issue if you have more than one POP Grains node in your network.

Create continuous streams

Turn on the Remove Overlapping option on the POP Source node. Creating new particles where particles already exist will generate explosions.

Stop grains from bouncing/exploding

  • Increase iterations. However, more iterations will make your simulation slower.

  • Max Acceleration can be altered, but needs to be used with some care.

  • Turning off Enable Mass-Shock Scaling will also reduce the bounce, since the higher particles are heavier and won’t move as much on the second frame, but your piles will lose stability.

Keyframe particles

  • Set the targetP and targetstiffness attributes on a per-particle basis to create a sort of pin constraint. This is done as a constraint, so the particle won’t necessarily end up at targetP every frame, it will just try to get there. This is useful for soft constraints.

  • Set the mass of grain particles to zero (mass == 0). They will stop responding to external forces and the PBD update, giving you complete control over their motion. If you are driving their positions from external animation, remember to set their velocities correctly.

Pin a PBD simulation

Set the mass of the particles to 0.

Grains

Getting Started

Next Steps