Houdini 16.5 Particles

Using groups to organize particle behavior

On this page

Overview

You can divide particles into groups. The Group POP lets you sort its input particles into groups based on an various criteria. The Proximity POP creates a group for each particle containing other particles that are nearby. Other operators may create groups as a side effect as they work. For example, the Kill POP lets you create a new group with the killed particles.

Groups are very useful because almost every node gives the option to apply the node’s effects only to one or more groups in the input stream, instead of every particle in the stream. So, you can identify groups of particles based on certain properties, and then only apply some nodes to those groups, and not other particles.

For example, if you only want a node to affect particle older than one second, you could create a Group POP, set the group name to old_enough, and set the rule to $AGE > 1. Then, downstream from the group node, you can set the Source group parameter of another node to old_enough to have it only act on the particles in that group (that is, particles older than one second).

How to create particle groups

To...Do this

Create a group based on an expression

  1. Create a Group node and connect the particle stream to its input.

  2. In the parameter editor, enter the Group Name, then turn on the Enable checkbox on the Rule sub-tab of the Create tab.

  3. Enter an expression in the Rule field, or choose a commonly-used rule from the pop-up menu.

    The node will evaluate this expression on each input particle, and if the expression returns true (non-zero), it puts the particle in the new group.

Create a group from the particles inside a boundary shape

  1. Create a Group node and connect the particle stream to its input.

  2. In the parameter editor, enter the Group Name, then turn on the Enable checkbox on the Bounding sub-tab of the Create tab.

  3. Use the parameters to set up the bounding shape. You can use an abstract box or sphere, an object, or metaballs.

    The node will put any particles inside the bounding shape into the new group.

Create a group for each particle containing its closest neighbors

  1. Create a Proximity Node and connect the particle stream to its input.

  2. Set the Group Name Root.

    This is the base name for the new groups that will be created, one for each input particle. The group names are created by appending the particle’s ID to this name.

Divide particles into multiple groups

  1. Create a Group node and connect the particle stream to its input.

  2. In the parameter editor, enter the Group Name, then turn on the Enable checkbox on the Random sub-tab of the Create tab.

  3. Set the Number of Groups.

    The groups will use the Group Name with a number appended.

  4. The default simply sorts the particles in order into the different groups (the first particle goes in the first group, the second particle goes in the second group, and so on). See the documentation for the Group Index field for how to control the sorting with an expression.

Group particles based on the node that created them

  1. Create a Group node and connect the particle stream to its input.

  2. In the parameter editor, enter the Group Name, then turn on the Enable checkbox on the Generator sub-tab of the Create tab.

  3. In the Generators field, enter a space-separated list of the generators whose progeny you want to group together.

    The node will put any particles in the input stream that were originally created by the generators into the new group.

Group particles based on their instanced geometry

  1. Create a Group node and connect the particle stream to its input.

  2. In the parameter editor, turn on the Enable checkbox on the Instances sub-tab of the Create tab.

  3. In the Instances field, enter a space-separated list of the instanced objects whose particles you want to group together.

    The node will put any particles in the input stream whose instance attribute matches a value in the list into the new group.

How to combine and filter particle groups

The controls on the Group POP's Combine tab let you create a group that is a combination of existing groups.

  1. Create a Group node and connect the particle stream to its input.

  2. In the parameter editor, click the Combine tab.

  3. Enter the name of the new group to create in the left-hand field on the first row.

  4. Enter the name of the group from which to take particles in the right-hand field (or click the box beside the equal sign so the exclamation point is visible if you want to start with particles not in the right-hand group).

    Once you set up the top row, additional rows become available to further combine and/or filter the contents of the new group.

  5. For the additional rows, on the right-hand side, enter the name of another group of particles you want to combine with or filter from the new group.

  6. Use the menu on the left side to choose how to combine/filter the groups.

  7. Use the menu to choose how to combine this group with the new group.

    Click the box beside the equal sign so the exclamation point is visible if you want to do the logical opposite of the operation in the menu.

How to use groups to control a particle simulation

Almost all particle operators include a Source group parameter that lets you limit the effect of a node to only the members of a given group in the input stream. So once you've grouped the particles, you can apply different nodes selectively to the particles in the groups.

Some complex operators such as the Follow POP, Orbit POP, and Stream POP use groups to divide the input stream into distinct classes (such as followers and leaders).

Particles

Getting started

Behavior

Next steps

Guru-level