Before Groups: 1. Oversimplified Attributes — The Data 🟢
A group is a named selection of geometry.
A group is geometry membership, not attribute data.
Groups are similar to a boolean attribute: an element is either in or out of the group.
Groups can overlap. An element can belong to multiple groups at the same time.
<aside>
Attributes → What is this element like?
Groups → Which elements are we talking about?
</aside>
This gives Houdini two complementary ways of organizing geometry:
Attributes → "What is this element like?"
Groups → "Which elements are we talking about?"
For example
100,000 points
↓
group "debris"
↓
Transform
↓
only debris moves

Contain points.
Contain primitives.
Contain vertices.
Contain edges.
Note: Edges aren't a separate geometry element. An edge represents a relationship between two points, but Houdini can still maintain edge groups.
Groups can be created, modified, and used through:
For example, if a node has a Group parameter, you can tell it:
debris
and the node will operate only on the elements in that group.
The simplest way to work with a group is often through the Group parameter on a SOP node.

VEX provides functions for working with groups.
These functions can add or remove elements from groups.
setpointgroup()
setprimgroup()
setvertexgroup()
Returns the number of elements belonging to a group.
npointsgroup()
nprimitivesgroup()
nverticesgroup()
See Groups
Returns whether an element belongs to a group.
inpointgroup()
inprimgroup()
invertexgroup()
Returns an array containing the element numbers belonging to a group.
expandpointgroup()
expandprimgroup()
expandvertexgroup()
Group expressions let you select, combine, exclude, and filter elements.
Select everything belonging to group1.
group1
Select elements belonging to both groups.
group1 &group2