group nodes

7 node types in the group category.

delete#

aliases: blast remove keep

Delete (or keep only) points/prims/vertices matching a group pattern, or the prims using an edge group (Houdini Blast).

Inputs

#namedescription
0geogeometry

Parameters

nametypedefaultrangedescription
groupgroup""what to delete: group name, "!name", range "0-10", or "@P.y<0"
classenum"prim"element class of the pattern. vertex: removes those corners (polygons losing one are deleted, polylines shrink); edge: deletes every prim that uses one of the edges (edge_mode dissolve, or the dissolve node, merges faces instead)
options: prim point vertex edge
keepboolfalseinvert: keep the matches, delete the rest
aliases: invert negate delete_non_selected
remove_unused_pointsbooltruedrop points no longer used by prims (prim, vertex and edge modes)
edge_modeenum"prims"class edge: prims = delete the prims using the edges (leaves holes); dissolve = remove the edges and merge their faces (dissolve node with defaults)
options: prims dissolve

Example

{ "type": "delete", "params": { "group": "@P.y<0", "class": "point" } }

Used in the examples asset_cleanup, guided_town, image_cutouts, lsystem_tree, market_street, scifi_panel, sparks.

group#

aliases: group_create groupcreate select

Create/modify a point, prim, vertex or edge group by pattern, JS expression, bounding box, normal direction or random %.

Edge groups are sets of point pairs. Edge patterns add selectors: "boundary" (unshared edges), "shared", "angle>30" (dihedral angle in degrees), "length<0.1", "border:top" (border of a prim group), "p3-7" and chains "p0-1-2-3-0", "2e1" (side 1 of prim 2); index ranges address the unique-edge list. See help topic "groups".

Inputs

#namedescription
0geogeometry

Parameters

nametypedefaultrangedescription
namestring"group1"group name
classenum"prim"element class (edge = point pairs)
options: prim point vertex edge
patterngroup""base pattern ("" = no pattern filter): names, ranges, "@P.y>0", "!grp"; edges also "boundary", "angle>30", "p3-7", "border:grp"
exprcode""JS wrangle-style boolean expression per element, e.g. "@P.y > 0.5 && @N.y > 0.9" or "@P.y > height" with a graph var (vertex class runs over vertices; edge class: the expression must hold for both points of the edge)
bbox_minvec3[-1000000000,-1000000000,-1000000000]keep elements inside this box (points; prims use centroid; vertices their point; edges their midpoint)
bbox_maxvec3[1000000000,1000000000,1000000000]box max
normalvec3[0,0,0]keep elements whose normal is within spread_angle of this direction ([0,0,0] = off; vertices use vertex normals, edges the mean of their polygons)
spread_anglefloat30normal test cone half-angle in degrees
randomfloat10..1keep this fraction at random (1 = all)
seedfloat0random seed
modeenum"replace"combine with an existing group of the same name
options: replace union intersect subtract
invertboolfalseinvert the selection

Example

{
  "type": "group",
  "params": {
    "name": "top",
    "class": "prim",
    "normal": [0, 1, 0],
    "spread_angle": 20
  }
}

Used in the examples asset_cleanup, lsystem_tree, scifi_panel, weathered_cabinet, worn_machine.

group_combine#

aliases: groupcombine combine_groups group_bool groupbool

Boolean combination of groups into a new group: "a & !b | c" (| or, & and, ^ xor, ! not, parentheses).

Operands are group names (wildcards allowed) or any single group-pattern token of the class, e.g. "@P.y>0", "0-10", "boundary" or "angle>30" for edges; a group of another class is converted like in patterns. Precedence: ! then & then ^ then |; operands written next to each other are unioned.

Inputs

#namedescription
0geogeometry

Parameters

nametypedefaultrangedescription
namestring"combined"output group name (replaces an existing group of that class)
aliases: output
classenum"prim"element class
options: prim point vertex edge
exprstring""boolean expression, e.g. "top & !side*", "(a | b) & @P.y>0", "boundary ^ seams"
aliases: expression pattern

Example

{
  "nodes": {
    "box": { "type": "box", "params": { "divisions": [3, 3, 3] } },
    "upper": {
      "type": "group",
      "in": ["box"],
      "params": { "name": "upper", "expr": "@P.y > 0" }
    },
    "top": {
      "type": "group",
      "in": ["upper"],
      "params": { "name": "top", "normal": [0, 1, 0] }
    },
    "walls": {
      "type": "group_combine",
      "in": ["top"],
      "params": {
        "name": "upper_walls",
        "class": "prim",
        "expr": "upper & !top"
      }
    }
  },
  "output": "walls"
}

group_delete#

aliases: groupdelete delete_group remove_group

Delete groups by name (wildcards, "^name" keeps) from one or all classes.

Inputs

#namedescription
0geogeometry

Parameters

nametypedefaultrangedescription
groupsstring""names to delete: "tmp*", "a b c", "* ^keep"
aliases: group names pattern
classenum"all"which classes
options: all point vertex prim edge

Example

{
  "nodes": {
    "box": { "type": "box" },
    "tmp": {
      "type": "group",
      "in": ["box"],
      "params": { "name": "tmp_top", "normal": [0, 1, 0] }
    },
    "clean": {
      "type": "group_delete",
      "in": ["tmp"],
      "params": { "groups": "tmp*" }
    }
  },
  "output": "clean"
}

Used in the examples blob_creature, lsystem_tree, machined_bracket, rail_along_curve, scifi_panel.

group_expand#

aliases: groupexpand grow_group groupgrow shrink_group

Grow or shrink a point, prim or edge group by N steps across connectivity (negative steps shrink).

Grow adds every neighbour of the group per step; shrink removes every member that has a neighbour outside the group. Neighbours: points share an edge; prims share an edge (or a point, connectivity = point); edges share a point.

Inputs

#namedescription
0geogeometry

Parameters

nametypedefaultrangedescription
groupstring""group to expand (name); a group pattern also works when new_name is set
aliases: name base_group
classenum"prim"element class of the group
options: prim point edge
stepsint1-100000..100000steps to grow (negative = shrink)
aliases: iterations amount numsteps
connectivityenum"edge"prim class: neighbours share an edge or only a point
options: edge point
new_namestring""output group ("" = overwrite the input group)
aliases: output newname

Example

{
  "nodes": {
    "ball": { "type": "sphere", "params": { "type": "quad" } },
    "top": {
      "type": "group",
      "in": ["ball"],
      "params": { "name": "top", "normal": [0, 1, 0], "spread_angle": 15 }
    },
    "grown": {
      "type": "group_expand",
      "in": ["top"],
      "params": { "group": "top", "class": "prim", "steps": 2 }
    }
  },
  "output": "grown"
}

Used in the example asset_cleanup.

group_promote#

aliases: grouppromote promote_group group_convert groupconvert

Convert groups between point, vertex, prim and edge classes, with any/all inclusion (Houdini Group Promote).

An element of the target class joins when any (or all) of the source-class elements touching it are in the group. Touching: a prim touches its points, vertices and sides; an edge touches its two points; a vertex touches its point, its prim and the two sides it bounds. Examples: point→prim any = prims with a selected point, all = prims entirely in the group; prim→point = all their points; prim→edge = all their sides; edge→point = endpoints; edge→prim any = prims using a grouped edge, all = prims whose every side is grouped; point→edge all = edges with both points selected.

Inputs

#namedescription
0geogeometry

Parameters

nametypedefaultrangedescription
groupstring""source group name(s); wildcards and several names allowed ("top", "side* rim")
aliases: groups group_name
fromenum"point"class of the source group
options: point vertex prim edge
aliases: fromtype from_class in_class
toenum"prim"class to convert to
options: point vertex prim edge
aliases: totype to_class out_class
includeenum"any"any = touched by at least one grouped element; all = every touching element is grouped (Houdini "include only elements entirely contained")
options: any all
new_namestring""name of the converted group ("" = keep the name; several matched groups are unioned into it)
aliases: output newname
delete_sourcebooltrueremove the source group after converting

Example

{
  "nodes": {
    "box": { "type": "box", "params": { "divisions": [2, 2, 2] } },
    "top": {
      "type": "group",
      "in": ["box"],
      "params": { "name": "top", "class": "point", "expr": "@P.y > 0.4" }
    },
    "faces": {
      "type": "group_promote",
      "in": ["top"],
      "params": {
        "group": "top",
        "from": "point",
        "to": "prim",
        "include": "all"
      }
    }
  },
  "output": "faces"
}

group_rename#

aliases: grouprename rename_group

Rename a group (any class).

Inputs

#namedescription
0geogeometry

Parameters

nametypedefaultrangedescription
fromstring""existing group name
tostring""new name (replaces a same-named group of that class)
classenum"auto"class (auto = first class that has the group: point, vertex, prim, edge)
options: auto point vertex prim edge

Example

{
  "nodes": {
    "box": { "type": "box" },
    "top": {
      "type": "group",
      "in": ["box"],
      "params": { "name": "top", "normal": [0, 1, 0] }
    },
    "roof": {
      "type": "group_rename",
      "in": ["top"],
      "params": { "from": "top", "to": "roof" }
    }
  },
  "output": "roof"
}