Articles

Houdini Connectivity SOP: Grouping and Isolating Geometry Pieces

Includes one exclusive complete course

The exclusive course — a full production tutorial you won't find anywhere else, never sold alone.

Best Seller
Most Loved
Tutorial Camera Rig

ADVANCED CUSTOM CAMERA RIG

ANIMATION · CONSTRAINTS · CUSTOM UI

BUILD A FULLY CUSTOM CONSTRAINT-BASED CAMERA RIG IN HOUDINI WITH A CUSTOM UI PANEL. DESIGN FLEXIBLE SYSTEMS FOR PRECISE, CINEMATIC CAMERA ANIMATION ON ANY PROJECT.

€29.99

Freebies
Free Studio HDRI Pack box by Artivoxa showing 60 studio lighting setups with softboxes wrapped around the packaging

Studio HDRI Collection

ASSETS · EXR & HDR · 60 HDRIS

DOWNLOAD 60 STUDIO HDRIS CAPTURED IN A REAL PHOTO STUDIO. LIGHT YOUR PRODUCT AND BEAUTY RENDERS LIKE A PHOTOGRAPHER — SOFTBOX, LANTERN, STRIP AND GRID SETUPS, READY FOR ANY RENDERER.

FREE

ARTILABZ™

Everything You Need to master Houdini.

ARTILABZ™ gives you unlimited access to all Houdini courses, 3D assets, simulation files, textures and tools. updated every month.

01

Premium Houdini Tutorials

Full access to every course — fluid simulation, procedural FX, brand visuals and more.

02

Monthly New Content

Fresh tutorials and assets added every month — your library grows with you.

03

Instant Access to Everything

The moment you join, the full library is yours — no drip-feed, no waiting.

04

Project Files Included

Every tutorial comes with the full Houdini scene file — open every node, learn every detail.

FROM 14.99€/MONTH

Houdini Connectivity SOP: Grouping and Isolating Geometry Pieces

Houdini Connectivity SOP: Grouping and Isolating Geometry Pieces

Ever found yourself stuck manually clicking through countless polygons just to isolate a single chunk of your model? Do you feel the frustration when your geometry pieces refuse to stay neatly organized in a procedural network?

Working in Houdini often means juggling hundreds of fragments that need precise control. Hand-selecting each cluster can eat into your productivity and introduce errors when you least expect them.

The Connectivity SOP offers a streamlined way to assign unique identifiers to connected regions of your mesh. By automatically tagging each region, you can instantly create groups or extract isolated pieces without manual selection.

In this guide, you’ll see how to configure the Connectivity SOP’s parameters, leverage its point or primitive attributes, and set up group expressions for targeted processing. You’ll also learn tips to handle complex topologies with ease.

After working through these examples, isolating and grouping geometry in your procedural workflows will become a quick, reliable step rather than a chore.

What does the Connectivity SOP do and when should you use it?

The Connectivity SOP analyzes a mesh and assigns a unique integer attribute—commonly named “class” or “connectivity”—to each connected region of primitives. In procedural terms, it performs a graph traversal over shared edges or points to identify islands of geometry that are topologically linked.

Under the hood, the node builds an adjacency list of primitives sharing vertices or edges. It then labels each island with a sequential ID, stored as a primitive attribute. This attribute can be referenced downstream for grouping, masking, or driving operations that target individual pieces without manual selection.

You should reach for the Connectivity SOP whenever you need automated separation of geometry into logical units. Typical scenarios include:

  • Fracturing: tag each shard after a Voronoi fracture for custom shading or RBD constraints
  • Boolean outputs: isolate overlapping shells generated by Boolean intersections
  • Scatter domains: distribute points or instances per island for variation control
  • Procedural cleanup: remove small disconnected debris by size-based filtering

By leveraging this SOP early in your network, you gain granular control over complex meshes. Whether you’re driving copy-to-points on broken fragments or masking regions for material assignment, the Connectivity SOP provides a robust, non-destructive way to isolate and manipulate geometry pieces.

How do you configure the Connectivity SOP to produce per-piece attributes?

To emit a unique piece attribute on each connected component, drop in a Connectivity SOP right after your fractured or imported geometry. In the parameter pane, set “Connectivity Style” to “Primitive” so each face cluster receives its own ID. Rename the default “class” to something meaningful, like piece, in the “Attribute Name” field.

  • Group: leave blank (or specify a subset to isolate)
  • Connectivity Style: Primitive
  • Attribute Name: piece
  • Compute Unique Values: on (resets IDs per cook)

With this setup, Houdini scans primitives depth-first, tags each contiguous island with an incremental integer, and stores it in prim attribute piece. You can then drive downstream nodes—Blast, Delete, or Partition SOPs—using expressions like @piece==2 to isolate or color-code individual shards.

How can you convert the Connectivity attribute into usable named groups or selections?

Method A — Create groups with the Group SOP using the class attribute

After running a Connectivity SOP, each connected piece carries a class attribute on primitives. To automatically generate named groups, drop in a Group SOP set to “Primitives” and switch the creation mode to “Convert Attributes to Groups.” Specify class as the attribute name. Houdini will spawn one group per unique class value (e.g., class_0, class_1).

  • Entity: Primitives
  • Operation: Convert Attributes to Groups
  • Attribute Name: class
  • Group Prefix: class

This approach scales in production: no manual scripting, automatic updates when connectivity changes, and immediate access for downstream SOPs or render masking.

Method B — Isolate pieces with Blast / Delete / Attribute Wrangle using @class

For one-off extraction or procedural loops, use expressions on Blast or Delete SOP. For example, to isolate piece number 3, set the group field to:

@class==3

To generate named groups via VEX, insert an Attribute Wrangle (Detail or Primitive Run Over primitives) with this snippet:

string g = sprintf("piece_%d", @class);
setprimgroup(0, g, @primnum, 1);

This creates a dynamic piece_0, piece_1… group per primitive. You can then loop with a For-Each SOP keyed on the generated group names or feed them directly into simulation or shading networks.

How do you isolate specific pieces (largest piece, nth piece, or pieces by area/volume)?

To isolate individual geometry fragments, start by feeding your mesh into a Connectivity SOP. Set the Attribute Class to “Primitive” and name the new attribute (for example, “piece_id”). This tags each connected component with a unique integer. Next, use a Measure SOP to calculate area or volume on those primitives and store it in “piece_area” or “piece_volume.”

For isolating the largest or nth component, chain a Sort SOP after the Measure. In Sort, choose to sort by your area or volume attribute in descending order. The largest piece becomes index 0, the second largest index 1, and so on. Finally, apply a Blast SOP (or Delete SOP) with a group expression like @piece_id==0 for the largest piece or @piece_id==N for the nth piece.

  • Largest piece: sort by “piece_area” descending, blast @piece_id==0.
  • Nth piece: in Sort, set “Offset” to N, then blast @piece_id==0 on the sorted result.
  • Pieces by threshold: use a Group Expression SOP with @piece_area>min_area and <max_area.

To isolate multiple fragments based on area or volume ranges, skip the Sort SOP. Instead, after Measure, drop in a Partition SOP set to “Expression” mode with a VEX condition like piece_area>100 && piece_area<500. That creates a group you can feed into a Blast SOP to remove or keep those specific pieces. This workflow stays fully procedural, letting you tweak thresholds or switch between area and volume without rebuilding the network.

What common pitfalls affect Connectivity results and how do you troubleshoot them?

When using the Connectivity SOP, unexpected piece counts often trace back to hidden geometry issues. Non-manifold edges, unmerged points, or stray primitives can fragment your mesh into dozens of tiny “groups” instead of the intended clusters. Similarly, upstream transforms or non-uniform transformations on input objects may break adjacency tests, causing pieces that should be contiguous to appear isolated.

Attribute name collisions and mode mismatches also skew results. If an attribute called Cd or class already exists, Connectivity may overwrite or ignore it. Choosing “Points” instead of “Primitives” (or vice versa) for the Connectivity method can lead to fewer or more segments than intended. Always verify your attribute scope matches your workflow.

  • Non-manifold geometry: open edges, unwelded verts creating micro fragments
  • Unbaked transforms: separate transforms preventing adjacency
  • Attribute overwrite: existing ‘class’ or custom attributes
  • Mode mismatch: Points vs. Primitives connectivity

Troubleshooting starts with a Clean SOP to weld points, remove degenerate primitives, and fill holes. Use a temporary Visualize SOP or color by the connectivity attribute to identify unintended splits. Bake transforms or collapse objects under a single merge to restore adjacency. Rename any conflicting attributes before running Connectivity again. Finally, sample on simple geometry to isolate the problematic stage in your procedural chain.