Skip to content

ParkerBritt/houdini-attribute-connectivity

Repository files navigation

Attribute Connectivity



Attribute Connectivity is a Houdini surface operator for indexing attributes by connectivity.

Overview

The Attribute Connectivity sop provides connected component labeling for Houdini attributes using flood fill analysis. In other words it provides an index based on attribute values. It achieves this by separating foreground and background components based on the threshold parameter, then assigning a unique index to each discontinuous island.

This node was written in C++ using the HDK.

Parameters

Parameter Type Description
Group String A subset of points in the input geometry to run the program on. Leave this blank to affect all points in the input.
Include Whole Islands Toggle Include islands that have at least one point in the group.
Threshold Float A threshold that separates the background and foreground values.
Attribute Name String Name of the attribute to analyze.
Output Index Attribute String Name of the label attribute.

Build

Dependencies

For Build

  • Cmake
  • ninja
  • Houdini 20.5.X (other version are likely to work but untested)

For Tests

  • gtest
  • python 3.11
  • pytest

Installation

To compile the program you can run the build script that's included.

./build.sh

The resulting .so file should be automatically placed in your $HOUDINI_USER_PREF_DIR/dso/ directory.

Next copy ./static/SOP_attribconnectivity.svg to $HOUDINI_USER_PREF_DIR/config/icons/

Example

Input attribute visualized as color

image

Output indexing visualized as color

image

Output indexing values

segmentation_example

About

Houdini library for the Attribute Connectivity SOP

Resources

Stars

Watchers

Forks