Polygon Nodes
2D Transform
Translates, rotates, and scales a polygon in 2D.
Inputs
- Polygon (Polygon)
- Offset X (Float)
- Offset Z (Float)
- Rotation (Float)
- Scale X (Float)
- Scale Z (Float)
Outputs
- Polygon (Polygon)
Apply Noise
Displaces polygon vertices with coherent Perlin noise. Scale controls the noise frequency; Strength controls the maximum displacement per vertex. Uses the same noise family as Apply Noise to Points (Track 219).
Inputs
- Polygon (Polygon)
- Strength (Float)
- Scale (Float)
- Seed (Float)
Outputs
- Polygon (Polygon)
Circle
Generates a circular polygon approximation with independent X/Z radii and configurable segment count.
Inputs
- Center X (Float)
- Center Z (Float)
- Radius X (Float)
- Radius Z (Float)
- Segments (Int)
Outputs
- Polygon (Polygon)
Convex Hull
Computes the convex hull of a polygon, removing concavities. Burst-safe via Andrew’s monotone chain.
Inputs
- Polygon (Polygon)
Outputs
- Polygon (Polygon)
Cross Section
Cuts through geometry with a flat plane at a set height and outputs the outline of the cut as a polygon, with courtyards kept as holes: a building’s floor plan at any storey, ready for Offset, Grid Subdivide or Extrude.
Inputs
- Geometry (Geometry)
- Height (Float)
- Direction (Vector3)
- Max Gap (Float)
Outputs
- Polygon (Polygon)
Options
- maxOutputPoints: Maximum float2 points in the output polygon buffer (all contours combined). Default 512. Raise when WarnPolyCapacityTruncated fires; truncation drops whole contours at the boundary.
Limitations
- Polygon Offset and Polygon Extrude handle multi-contour output (outer ring plus holes). Grid Subdivide, Polygon Sweep, OBB Fit, OBB Subdivide, Convex Hull, and Voronoi Cell read the first contour only and raise WarnMultiContourDropped when holes are present.
Tips
- For the cut geometry pieces rather than an outline, use Slice Geometry.
Fit Box to Polygon
Fits an oriented bounding box to a polygon and outputs the box as a polygon and as individual scalars.
Inputs
- Polygon (Polygon)
Outputs
- Box Polygon (Polygon)
- Rotation (Float)
- Center X (Float)
- Center Z (Float)
- Size X (Float)
- Size Z (Float)
Grid Subdivide
Clips a polygon footprint into one axis-aligned grid cell. Wire Index from a LoopBegin or ForEachSpawnNode to iterate all cells; Cell Count gives the total cell count (Cells X × Cells Z).
Inputs
- Polygon (Polygon)
- Cells X (Int)
- Cells Z (Int)
- Index (Int)
- Seed (Float)
Outputs
- Polygon (Polygon)
- Cell Count (Float)
Options
- maxOutputPoints: Maximum float2 points in the output polygon per cell. Default 64. Each cell is a clipped convex shape, so 64 is usually generous. Raise if WarnPolyCapacityTruncated fires.
Tips
- Pair with a LoopBegin: plug Cell Count into the loop Count port so the loop runs exactly once per cell.
- Index is row-major (column = Index % Cells X, row = Index / Cells X). Cells with no footprint intersection produce an empty polygon.
- Cells X and Cells Z are clamped to ≥ 1 at evaluation time.
N-Gon
Generates a regular N-sided polygon centered at the given position.
Inputs
- Center X (Float)
- Center Z (Float)
- Radius (Float)
- Sides (Int)
- Rotation (Float)
Outputs
- Polygon (Polygon)
OBBox
Converts an oriented bounding box XZ footprint to a 4-corner polygon handle (Y-axis rotation).
Inputs
- CenterX (Float)
- CenterZ (Float)
- SizeX (Float)
- SizeZ (Float)
- Rotation (Float)
Outputs
- Polygon (Polygon)
Offset
Inflates or deflates a polygon handle by an offset distance. Degenerate inputs (self-intersecting or inward offsets that collapse the polygon) produce empty output.
Inputs
- Polygon (Polygon)
- Offset (Float)
Outputs
- Out (Polygon)
Options
- maxOutputPoints: Maximum float2 points in the output polygon. Round join with many segments generates more points per corner; raise if the warn badge fires (WarnPolyCapacityTruncated).
- joinMode: Corner join style for offset corners. Miter (default): sharp point, can spike on acute angles; raise Miter Limit to cap spike length. Bevel: flat cut across the corner. Round: smooth arc using Round Segments subdivisions.
- roundSegments: Arc subdivisions per corner when Join Mode is Round. 0 = auto-computed from the corner angle: usually the right choice. Raise for smoother arcs at large offsets.
- miterLimit: Maximum spike length for Miter joins, as a multiple of the offset distance. Spikes that would exceed this limit fall back to Bevel. Lower values clip spikes on acute angles; 0 or below disables Miter entirely (all corners bevel).
Limitations
- Self-intersecting inputs and inward offsets that invert the polygon (e.g. an L-shape offset past its corridor width) produce empty output and fire the WarnPolygonOpRefused warn bit.
- When output exceeds Max Output Points (default 256), the polygon is truncated and the WarnPolyCapacityTruncated warn bit fires; raise the knob, especially with Round join and many segments.
Tips
- Negative offset (shrink) is the recommended pre-step before boolean operations: it eliminates near-zero-area slivers that cause algorithm failures.
- Miter join produces sharp corners that can spike. If spikes appear on tight polygon bends, switch to Bevel or Round join mode.
- Round join with Segments=0 auto-computes arc subdivisions from corner angle: use for smooth organic outlines.
Oriented Subdivide
Clips a polygon footprint into one oriented-grid cell. Mirrors Grid Subdivide but in the footprint’s own OBB frame so cells align with the polygon’s natural axes.
Inputs
- Polygon (Polygon)
- Cells U (Int)
- Cells V (Int)
- Index (Int)
- Seed (Float)
Outputs
- Polygon (Polygon)
- Cell Count (Float)
Options
- maxOutputPoints: Maximum float2 points in the output polygon per cell. Default 64. Raise if WarnPolyCapacityTruncated fires.
Tips
- Pair with a LoopBegin: plug Cell Count into the loop Count port so the loop runs exactly once per cell.
- Index is row-major in the OBB’s UV frame (column = Index % Cells U, row = Index / Cells U).
- Cells that do not intersect the footprint produce an empty polygon.
- For axis-aligned footprints use Grid Subdivide (faster, no hull fitting).
Points to Hull Polygon
Computes the convex hull of spawn points’ XZ positions, producing a polygon.
Inputs
- Spawns (Scatter)
Outputs
- Polygon (Polygon)
Options
- maxOutputPoints: Upper bound on hull vertex count written to the polygon buffer. Convex hull has at most N vertices for N input points. Increase when a large scatter produces a WarnPolyCapacityTruncated warning.
Polygon Difference
Boolean difference of two polygon handles (A minus B). FHP (Foster-Hormann-Popa) algorithm; Burst-safe; handles degenerate contacts exactly.
Inputs
- A (Polygon)
- B (Polygon)
Outputs
- Polygon (Polygon)
Options
- maxOutputPoints: Maximum float2 points in the output polygon. In courtyard mode (B inside A), the output includes both the outer ring and the hole contour: size accordingly. Raise when the warn badge fires (WarnPolyCapacityTruncated).
Limitations
- Self-intersecting inputs produce empty output and fire the WarnPolygonOpRefused warn bit.
- When output exceeds Max Output Points (default 512), the polygon is truncated and the WarnPolyCapacityTruncated warn bit fires; raise the knob. When B is inside A, the output is the outer ring PLUS a hole contour, so the count is the sum of both inputs.
- When B is fully contained in A (courtyard case), the output is a multi-contour polygon: the outer ring (CCW) + hole contour (CW, reversed B) separated by a NaN sentinel. Extrude renders both the outer shaft walls and the hole-bridged caps correctly.
Tips
- Use to cut window and door openings from a room polygon, or to subtract a courtyard from a building footprint.
- Courtyard mode (B inside A): the output carries a NaN-separated hole contour. Wire into Extrude to get a hollow prism with inner shaft walls; scatter nodes avoid the hole interior automatically.
- If B completely contains A, the result is an empty polygon. Verify overlap before subtracting.
Polygon Intersect
Boolean intersection of two polygon handles (A ∩ B). FHP (Foster-Hormann-Popa) algorithm; Burst-safe; handles degenerate contacts exactly.
Inputs
- A (Polygon)
- B (Polygon)
Outputs
- Polygon (Polygon)
Options
- maxOutputPoints: Maximum float2 points in the output polygon. Raise when the warn badge fires (WarnPolyCapacityTruncated): truncation silently drops polygon edges.
Limitations
- Self-intersecting inputs produce empty output and fire the WarnPolygonOpRefused warn bit.
- When output exceeds Max Output Points (default 512), the polygon is truncated and the WarnPolyCapacityTruncated warn bit fires; raise the knob to fit the actual vertex count.
- Non-overlapping polygons produce an empty polygon (zero points): correct, not an error. Downstream geometry nodes that expect non-empty input must tolerate this.
Tips
- Use to clip a large polygon to a bounded region: e.g. clip a complex PCG outline to a room bounding box.
- If the two polygons do not overlap, the output is an empty polygon (zero points). Check with downstream geometry nodes that tolerate empty input.
Polygon Union
Boolean union of two polygon handles (A ∪ B). FHP (Foster-Hormann-Popa) algorithm; Burst-safe; handles degenerate contacts (T-, V-, collinear intersections) exactly.
Inputs
- A (Polygon)
- B (Polygon)
Outputs
- Polygon (Polygon)
Options
- maxOutputPoints: Maximum float2 points in the output polygon. Raise when the warn badge fires (WarnPolyCapacityTruncated): truncation silently drops polygon edges.
Limitations
- Self-intersecting inputs produce empty output and fire the WarnPolygonOpRefused warn bit. Repair first: Polygon Offset with a small negative value removes near-zero-area slivers.
- When output exceeds Max Output Points (default 512), the polygon is truncated and the WarnPolyCapacityTruncated warn bit fires; node badge turns amber. Raise the knob to accommodate the actual vertex count.
Tips
- Union two overlapping squares to quickly prototype L-shaped or T-shaped floor plans. Chain multiple Unions to merge any number of regions.
- Pass the output through Revolve or Extrude to convert the 2D result into 3D geometry.
PolygonToFacadeShell
Extrudes a 2D polygon footprint into a facade shell: outputs a wall-panel mesh and a spawn list of per-cell transforms for tile placement.
Inputs
- Polygon (Polygon)
- Floor Height (Float)
- Floor Count (Int)
- Tile Width (Float)
Outputs
- Shell Geometry (Geometry)
- Cells (Scatter)
Options
- facing: Which direction the facade faces. Outward: wall normals and tile spawns point away from the polygon interior (default, correct for a building exterior). Inward: normals point toward the interior (use for rooms or courtyards). Automatically correct regardless of ring winding.
Rectangle
Generates a centre-anchored rectangular polygon from width and height.
Inputs
- CenterX (Float)
- Center Z (Float)
- Width (Float)
- Height (Float)
Outputs
- Polygon (Polygon)
Shape
A polygon shape parameter with optional scene draw tool. Draw or paint the shape in the scene; Max Points is the total budget for everything that comes back, counting tessellated curve samples and the one separator between contours.
Outputs
- Polygon (Polygon)
Options
- maxPoints: Total XZ points this shape can deliver in one evaluation: corners on straight edges, tessellated samples on curved ones, plus one separator per extra contour. Reserves 1 + 2 × maxPoints customInputs slots. Raise it if the scene reports the shape was truncated.
- tessellationSegments: Samples per CURVED edge (0–64). Straight edges always cost exactly one point, so this only spends budget where an edge actually carries a tangent. 0 turns curves off entirely and writes corners directly; it no longer affects how many slots are reserved.
- modeMask: Which scene authoring modes this shape offers (bit0 Paint, bit1 Sketch, bit2 Points). 0 = all three.
- defaultSize: Edge length of the square a fresh shape starts from, in world units. A seed, not a live size: applied on creation and on Reset, never rescaling corners already authored. Baked into the parameter default, so it is also what an unbound parameter renders.
Limitations
- Inside a sub-graph this shape becomes a wirable Polygon port on the parent’s Sub-Graph node, and the parent’s polygon is what the body sees. Leave that port unwired and the shape contributes nothing at all: the contour drawn here is used when THIS graph is the one placed in the scene, not when another graph inlines it.
- A nested shape has no scene handles. The graph placed as the Infinio Instance owns the scene tooling, so nesting drops the draw and paint affordances while keeping the value and the port. That is a permanent arrangement, not something to fix by moving the node to the top-level graph.
Star
Generates a star-shaped polygon with alternating outer and inner radii.
Inputs
- Center X (Float)
- Center Z (Float)
- Outer Radius (Float)
- Inner Radius (Float)
- Points (Int)
Outputs
- Polygon (Polygon)
Stroke
Strokes an open polyline into a closed ribbon polygon. Half-width is the distance from the polyline to each ribbon edge. Join mode also controls end caps: Miter/Bevel use flat butt caps; Round uses semicircular caps.
Inputs
- Polygon (Polygon)
- Half-Width (Float)
Outputs
- Out (Polygon)
Options
- maxOutputPoints: Maximum float2 points in the output ribbon polygon. Round join/cap generates more points per corner and end; raise when the warn badge fires (WarnPolyCapacityTruncated).
- joinMode: Corner and end-cap style. Miter (default): sharp corners, flat butt caps. Bevel: flat cut across corners, flat butt caps. Round: smooth arc corners with semicircular end caps.
- roundSegments: Arc subdivisions per corner/cap when Join Mode is Round. 0 = auto-computed from angle. Raise for smoother curves at large half-widths.
- miterLimit: Maximum spike length for Miter corners, as a multiple of the half-width. Spikes beyond this fall back to Bevel. 0 or below disables Miter entirely.
Limitations
- When output exceeds Max Output Points (default 256), the polygon is truncated and the WarnPolyCapacityTruncated warn bit fires; raise the knob, especially with Round join/cap and many segments.
Superformula Shape
Generates a polygon using the Gielis superformula, producing stars, flowers, gears, and rounded shapes that the Star node cannot.
Inputs
- Symmetry (Float)
- Power (Float)
- Pinch A (Float)
- Pinch B (Float)
- Radius (Float)
Outputs
- Polygon (Polygon)
Options
- resolution: Number of vertices. Higher = smoother curves; lower = faster evaluation. Range: 3–256.
Limitations
- Resolution is capped at 256 points. Symmetry is rounded to the nearest integer so the polygon always closes. Non-positive Power (n1) clamps to 0.001.
Tips
- Symmetry=5, Power=0.5, Pinch A=1, Pinch B=1 gives a 5-petal flower. Symmetry=4, Power=2, Pinch A=2, Pinch B=2 traces a perfect circle.
- Crank Pinch A and Pinch B independently to create asymmetric, organic leaf shapes.
TrianglePolygonExtEditor
Test fixture (Track 439 Phase 0): emits a fixed unit triangle (0,0),(1,0),(0,1) CCW to prove a foreign-assembly polygon-output chain.
Outputs
- Polygon (Polygon)
Voronoi Cell Polygon
Computes the Voronoi cell polygon for one point inside a scatter point cloud. Connect a scatter node, set the point index, and optionally wire a bounding polygon.
Inputs
- Points (Scatter)
- Bounds (Polygon)
- Index (Int)
Outputs
- Polygon (Polygon)
Voronoi Diagram
Builds the full Voronoi tessellation of a set of scatter points in one pass: outputs every cell as a polygon and a spawn point at each cell centroid.
Inputs
- Seeds (Scatter)
- Boundary (Polygon)
Outputs
- Diagram (Polygon)
- Centroids (Scatter)
Options
- maxOutputPoints: Maximum float2 points in the flat polygon buffer for all cells combined. Default 65536 covers ~5000 seeds at K≈12 neighbours each. Raise if a WarnPolyCapacityTruncated warning fires.
Limitations
- Coincident or near-coincident seeds are merged and counted as dropped (WarnVoronoiCellDropped fires). Very large diagrams (10k+ seeds) may exceed Max Output Points; raise it or split into chunks.
Tips
- Wire a Polygon into ‘Boundary’ to clip the diagram to a shape; leave it empty for an auto-fitted rectangle.
- The ‘Centroids’ Spawns output feeds straight into Scatter Relax for Lloyd relaxation.
- For a handful of cells, ForEach-Spawn → Voronoi Cell is simpler. Use this node for ~1000+ seeds or when you need the whole diagram in one pass.