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, defaultESplineMeshAxis::X)Width Scale (
double, default1)Height Scale (
double, default1)Z Offset (
double, default0)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, default800.0): Get the default tilingDefault Intersection Mesh Length (
double, default800.0): Get the default tiling
Roads From Splines > Landscape
Adapt Spline Mesh Roll To Landscape (
bool, defaultfalse)Landscape Selection (
FActorSelection)Adapt Spline Mesh Roll Alpha (
double, default0.7)Adapt Spline Mesh Max Angle (
double, default30): 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, defaulttrue)Spline Max Spacing (
double, default500.0)Join Distance (
double, default200.0f): Points closer than this are considered the same graph node (and become a junction).Delete Old Roads When Creating Roads (
bool, defaultfalse): 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, defaultCurvy Corner Meshes)Curvy Corner MeshesStraight Stub Meshes
Intersection Size (
double, default500.0f)Min Corner Angle Degrees (
double, default30): Corner fillets between two roads meeting at an angle sharper than this are skipped.Junction Curb Offset (
double, default130.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, default5): How much the corner arcs bulge into the junction.Intersection Stagger Z (
double, default1): Z offset for corner meshes to prevent them from Z-fightingFill Junctions (
bool, defaultfalse): 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, default1.0f)Junction Fill Height (
float, default5.f): Vertical thickness of the junction fill slab.Inner Filling Num Samples (
int, default10)Show Debug Junction Fill (
bool, defaultfalse)
Roads From Splines > Push Out Of Collision
Push Buildings On Spawn (
bool, defaulttrue)
Roads From Splines > Debug
Show Debug Graph (
bool, defaultfalse)