How-To: Style Connections (Spline)
Goal: replace the default straight lines with designer-authored cubic-bezier curves that carry your own material, using the Spline Line Drawer policy and on-canvas control points.
UCrimsonSkillTree asset with at least two connected nodes (How-To: Author a Skill Tree).1. Select the Spline policy
Connection rendering is a per-asset, swappable policy on GraphConfig.LineDrawingPolicy. Set it to Spline Line Drawer in the asset's Details panel.
Images/CrimsonSkillTree/spline-policy-select.png2. Give the line a material (optional)
Assign a UMaterialInterface (or texture) to the policy's Default Line Brush, or override it per connection. The curve is drawn as a UV-mapped strip with continuous arc-length UVs, so a panning/flowing material animates end-to-end. With no resource set, the line is a crisp anti-aliased color.
Images/CrimsonSkillTree/spline-material.png3. Add and shape control points
In the Visual graph, right-click near a connection -> Spline -> Add Spline Control Point. A draggable amber dot drops on the nearest connection. Drag points to shape the path; double-up to add more.
Images/CrimsonSkillTree/spline-add-point.png4. Edit tangents (Curve-Editor style)
Select a control point to reveal its tangent handles (cyan = arrive, green = leave). Drag them to bend the curve; the line updates live. Set the Tangent Mode in Details:
Images/CrimsonSkillTree/spline-tangents.png| Tangent Mode | Result |
|---|---|
Auto | Smooth Catmull-Rom from neighbours (default - just drag points) |
User | Use the dragged tangent handles, kept smooth |
Weighted | Like User, with handle length scaling curve influence |
Break | Independent handles - a sharp corner |
Linear | Straight segment to the next point - ignores tangents |
5. Anchor the line to the nodes
Every connection meets each node at an anchor. The defaults come from the policy's Default Start Anchor / Default End Anchor and apply to every connection - straight, elbow, or spline.
To tune a single connection, click its line in the Visual graph. The line highlights and the Details panel shows that connection's start/end anchor, optional custom offsets, and an optional material override - no control point required.
| Anchor mode | Where the line attaches |
|---|---|
Center | Node centre |
Nearest | The point on the node's shape facing the other node |
Top / Bottom / Left / Right | That edge of the node's shape |
Custom | Node centre plus an offset you set |
Images/CrimsonSkillTree/connection-anchors.png6. Snap and align control points
Control points snap to a per-asset grid when inserted or dragged, so points authored at different times line up. Set Spline Handle Snap Size in the Editor Settings tab -> Visualization (default 16; set to 1 to disable). For exact placement, select two or more control points, right-click -> Spline Point -> Alignment, and pick an align or distribute action - the same workflow as Blueprint reroute nodes.
| Action | Effect |
|---|---|
| Align Left / Center / Right | Match the X of the selected points (min / midpoint / max) |
| Align Top / Middle / Bottom | Match the Y of the selected points (min / midpoint / max) |
| Distribute Horizontally / Vertically | Evenly space 3+ points between the two extremes |
Images/CrimsonSkillTree/spline-align.png7. Compile and confirm in game
Compile (or Save) bakes the authored path into the asset. Tangent handles are cleared and their values written back automatically.
See also
- Concept: Connection Line Styles - the policy model, bezier math, and runtime rendering
- Concept: Two-Graph Editor - why authoring lives on the Visual graph