Nodes/ComfyUI-BrainDead/BD Planar Grouping
ComfyUI Node

BD Planar Grouping

Structure-aware mesh segmentation into planar regions. Groups connected faces by normal direction (angle threshold). Marks boundary edges between groups as SHARP for decimation preservation. BOUNDARY STRAIGHTENING (Option 2): - Enable 'straighten_boundaries' to project vertices onto fitted planes - Boundary edges become straight lines where planes intersect - Interior vertices are flattened onto their group's plane - Creates clean, geometric boundaries instead of jagged mesh edges Use BEFORE decimation to preserve flat-shaded planes: 1. BD_PlanarGrouping → marks group boundaries (+ optional straightening) 2. BD_BlenderDecimate → preserves marked edges with delimit Parameters: - angle_threshold: Max angle between normals in same group (lower = more groups) - min_group_size: Merge small groups into neighbors (reduces noise) - straighten_boundaries: Project vertices to make boundaries straight lines - color_by_group: Apply distinct colors to visualize groups

By BizaNator·Created 7 months ago·Updated 16 days ago· 14
BD Planar Grouping
  • mesh
  • mesh
  • edge_metadata
  • status
angle_threshold15
min_group_size10
straighten_boundariesfalse
straighten_weight1.0
project_interiortrue
color_by_grouptrue
mark_boundary_colorstrue
Category🧠BrainDead/Mesh

Inputs (8)

NameTypeDefaultDescription
meshTRIMESH
angle_thresholdFLOAT151–90Maximum angle (degrees) between face normals in the same planar group. Lower = more groups, stricter planes.
min_group_sizeINT101–1000Minimum faces per group. Smaller groups get merged into nearest neighbor.
straighten_boundariesBOOLEANfalseStraighten boundary edges by projecting vertices onto plane intersections. Creates clean geometric boundaries.
straighten_weightFLOAT1.00–1How much to move vertices toward straightened positions (0=none, 1=fully straighten).
project_interiorBOOLEANtrueAlso flatten interior vertices onto their group's fitted plane.
color_by_groupBOOLEANtrueApply distinct colors to each planar group for visualization.
mark_boundary_colorsBOOLEANtrueMark boundary edges with contrasting vertex colors (for BD_BlenderEdgeMarking).

Outputs (3)

NameTypeDescription
meshTRIMESH
edge_metadataEDGE_METADATA
statusSTRING