Roads From Splines

Roads From Splines#

The RoadsFromSplines actor generates road meshes from spline components. It’s used together with the SplineImporter to automatically create road meshes from OSM road data.

To use it, drag a RoadsFromSplines actor into your level, select the spline components to use (or leave it set to all splines), configure the road parameters, and click Generate Roads.

Roads From Splines Settings#

Roads From Splines > Components

  • Empty Scene Component (USceneComponent)

Roads From Splines > Meshes

  • Road Mesh (UStaticMesh)

  • Intersection Mesh (UStaticMesh): Mesh used to fill the curb-return arcs at junctions where more than 2 roads meet.

  • Road Mesh Axis (ESplineMeshAxis, default ESplineMeshAxis::X)

  • Width Scale (double, default 1)

  • Height Scale (double, default 1)

  • Z Offset (double, default 0)

  • UV Tiling Parameter Name (FName, default "TilingY"): Name of a scalar material parameter that multiplies UV tiling along the road, so dashes/markings stay evenly spaced even when a segment stretches or compresses. Leave “None” to disable.

  • Tiling Offset Parameter Name (FName, default "TilingOffset")

  • Default Road Mesh Length (double, default 800.0): Get the default tiling

  • Default Intersection Mesh Length (double, default 800.0): Get the default tiling

Roads From Splines > Landscape

  • Adapt Spline Mesh Roll To Landscape (bool, default false)

  • Landscape Selection (FActorSelection)

  • Adapt Spline Mesh Roll Alpha (double, default 0.7)

  • Adapt Spline Mesh Max Angle (double, default 30): in °

Roads From Splines > Graph

  • Splines Tag (FName): The tag of the actors containing spline components to search for. If None, all actors will be used.

  • Spline Components Tag (FName): The tag of the Spline Components to use to generate roads. If None, all spline components will be used.

  • Resample Splines (bool, default true)

  • Spline Max Spacing (double, default 500.0)

  • Join Distance (double, default 200.0f): Points closer than this are considered the same graph node (and become a junction).

  • Delete Old Roads When Creating Roads (bool, default false): If true, every Generate call wipes everything and rebuilds from scratch. If false (recommended), only new/removed splines are touched: fully incremental.

Roads From Splines > Junctions

  • Junction Fill Mode (ERoadJunctionFillMode, default Curvy Corner Meshes)

    • Curvy Corner Meshes

    • Straight Stub Meshes

  • Intersection Size (double, default 500.0f)

  • Min Corner Angle Degrees (double, default 30): Corner fillets between two roads meeting at an angle sharper than this are skipped.

  • Junction Curb Offset (double, default 130.0): Distance from the road centerline to the inner (junction-facing) edge of the IntersectionMesh, in cm. IntersectionMesh is usually just a curb/sidewalk strip near the edge of the road, not the full road width, so this is independent of how wide the road actually is – set it to wherever the near edge of that mesh asset actually sits (e.g. for a 4m road with a 0.7m sidewalk strip starting at the road edge, that’s 200 - 70 = 130). Used to align the junction interior fill boundary with the real edge of the spawned intersection meshes, and to find the curb-line point at corners sharp enough to skip a fillet mesh.

  • Corner Straightness (double, default 5): How much the corner arcs bulge into the junction.

  • Intersection Stagger Z (double, default 1): Z offset for corner meshes to prevent them from Z-fighting

  • Fill Junctions (bool, default false): If true, fill the empty interior of curvy junctions with a mesh that follows the (possibly sloped) boundary formed by the corner fillet meshes. Ignored in straight-stub mode.

  • Junction Fill Material (UMaterialInterface)

  • Fill Junction UV Scale (double, default 1.0f)

  • Junction Fill Height (float, default 5.f): Vertical thickness of the junction fill slab.

  • Inner Filling Num Samples (int, default 10)

  • Show Debug Junction Fill (bool, default false)

Roads From Splines > Push Out Of Collision

  • Push Buildings On Spawn (bool, default true)

Roads From Splines > Debug

  • Show Debug Graph (bool, default false)