Utility node

Port

A named, typed value bridge. Port is the smallest node in the library — one input, one output, a headerless body showing just its name — yet it plays three roles: a pure passthrough that labels a data path, a typed converter/clamp that enforces a specific value type and range, and the boundary bridge that gives Macro Groups, Loops, and Replicators their external ports. Whenever a cable crosses a container boundary, a Port node is what carries it on the inside.

Inputs

PortType
InThe value or stream entering this named bridge. Any cable fits: with the type set to Any it passes through untouched, otherwise it is converted to that type and held inside the Min and Max limits — arrays always pass straight through.any

Outputs

PortType
Outany

How It Works

Port always has exactly one In and one Out, and both always share the same effective type — the Port is its type, there is no in-one-type-out-another conversion across the node's faces.

Auto mode (type = Any, the default). The Port is a pure passthrough: whatever arrives at In leaves Out untouched. The node auto-detects the incoming data's type and array-ness and adopts them visually — the ports take the detected cable color, and array data renders as the rounded-square array port — so downstream nodes see the real type, not a generic "any". With nothing connected, an Any-typed Port outputs nothing.

Typed mode. In the node's settings you can pin the type to one of: Any, Float, Double, Int, String, Bool, Color, Image, Structure, JSON, or Raw Data. Both ports become that type. Behavior per group:

Configured typeBehavior
Any, Image, ColorPure passthrough. Image accepts only texture cables (both sides become .image); Color falls back to its stored default color (white) when unconnected
Float, Double, Int, String, BoolThe incoming value is converted to the type (Int→Float, Bool→0/1, number→String, nonzero→true, …); with no connection, the stored Default Value is output
Structure, JSON, Raw DataPassthrough of the container value, with the ports typed and colored accordingly

Clamping. For the numeric types (Float, Double, Int) the settings offer optional Min and Max limits. Clamping happens after type conversion, immediately before output; either limit may be left empty for "no limit", and a Min greater than Max is silently swapped. This turns a Port into a safety valve — whatever wild value arrives, downstream only ever sees the allowed range.

Naming. The settings' Name field replaces the node's displayed title, and — this is the important part — becomes the port name shown on the container's boundary when the Port is published. All configuration lives in the node's per-instance storage, so it saves and loads with the project.

Boundary bridging. Containers get their external ports through the standard publish mechanism, and Port is its natural partner:

  • Publish a Port's In → the container gains an input port; external values flow through the bridge to the Port's Out inside the body.
  • Publish a Port's Out → the container gains an output port; the value the Port receives inside is exposed to the outside graph.
  • Connecting a cable to a container's wildcard + input does all of this automatically: a Port node is created inside, named after the source port, typed and array-flagged to match the cable, its In published, and the boundary bridge wired up.

Because the effective type propagates to both faces and refreshes the connection cache, changing a Port's type mid-patch immediately updates cable compatibility for everything downstream.

Parameters in Depth

In (any by default) — the single data input. Its runtime type follows the configuration: it stays wide-open .any in Auto and for most typed modes (conversion happens inside the node), and becomes .image in Image mode since textures cannot be converted from anything else. When In is unconnected, a typed Port outputs its Default Value; an Any-typed Port outputs nothing.

Beyond the port itself, the node's settings panel is where Port's real parameters live:

  • Name (string, default empty) — display title and, when published, the boundary port name on the enclosing container. Renaming syncs the group's external port immediately.
  • Type (default Any) — one of Any, Float, Double, Int, String, Bool, Color, Image, Structure, JSON, Raw Data. Determines both port types, the cable color, conversion behavior, and which extra settings appear.
  • Default Value — shown for Float, Double, Int, String, Bool, and Color: the value emitted when nothing is connected. Defaults: 0 / 0 / 0 / empty string / false / white.
  • Min / Max (Float, Double, Int only; default empty = no limit) — post-conversion clamp range. Switching to a non-numeric type clears any stored limits.

Use Cases

  • Named group boundaries: inside a Macro Group, place a Port named "Speed", wire its Out into the internal Math chain, and publish its In — the group now shows a clean, meaningfully named Speed input instead of an internal node's port name.
  • Range guard: a Float Port with Min 0 and Max 1 between Mouse X and a Circle 2D Alpha guarantees the opacity never leaves its legal range, no matter how the input misbehaves.
  • Type adapter: pin a Port to Bool between a Float source and a Logic or Switch node — any nonzero value becomes true, giving you a threshold gate without extra Compare plumbing.
  • Standalone named constant: an unconnected Int Port with a Default Value acts like a labeled Constant whose name documents its purpose right on the canvas — and whose Min/Max keep later edits sane.
  • Cable labeling: routing a generator's Image through an Image-typed Port named "Mask Source" documents a long cable run; the passthrough costs nothing and only texture cables can connect.
  • Container plumbing: inside Loop and Replicator bodies, the auto-created Ports behind the + wildcard are ordinary Port nodes — enter the container to rename them, pin their type, or add clamping to the incoming published value.

Tips

  • The wildcard + on Macro Group, Loop, and Replicator auto-creates and publishes a Port for you — manual placement is only needed for outputs, custom names, typed conversion, or clamping.
  • Both faces always share one type. If you need a genuine type change across a boundary, the Port itself does the conversion: pin it to the target type and let any compatible cable feed In.
  • Min/Max clamp after conversion, and a reversed pair (Min > Max) is swapped rather than rejected — you cannot accidentally create an impossible range.
  • Image mode is the one case where In stops accepting arbitrary cables: both ports become .image, because a texture cannot be synthesized from a number. Use it deliberately to lock a path to textures.
  • In Auto mode the Port adopts the incoming array flag too, so array cables stay square through the bridge and downstream array-compatibility checks keep working.
  • For simple wire organization without any typing or naming, a Reroute node is lighter; reach for Port when the name, type, or range of the value matters.

Open Port in the interactive catalog →

Port is one of 381 nodes in Grafit Pro.

Free download. Every feature for 7 days, no card. Then €99.99 once — or keep playing your projects as a Player.

More Utility nodes