Spline Importer#

Import Splines#

Spline Importer Overview#

  • First make sure that you have a Level Coordinates actor in your level.

  • Search for SplineImporter, which is a C++ class, and drag it into your level.

  • In the Details Panel, select the splines source as you wish. You can either use a premade query, such as Roads, Buildings, or you can write the query yourself using Overpass syntax. For instance, the premade query for Roads is the same as using “Overpass Short Query” with the query: way["highway"]["highway"!~"path"]["highway"!~"track"];.

  • Select whether you want landscape splines, or regular spline components.

  • Choose an actor on which to spawn the splines (usually a landscape). This actor’s area in Unreal will be mapped to a real-world area thanks to the Level Coordinates, and the plugin will use this real-world area to search for splines.

  • Press the Generate Splines button.

Landscape Splines#

If you have generated landscape splines, you can go to Landscape Mode > Manage > Splines to control the spline parameters as usual. You can choose to paint using a layer (fill the Layer Name field in the details panel after selecting all control points and then all segments). If you use the MI_Landscape material for your landscape, you can try Road as a Layer Name to paint roads.

Spline Importer Settings#

GDAL Importer

  • Position Based Generation (ULCPositionBasedGeneration)

  • Debug Line Traces (bool, default false)

  • Source (EVectorSource, default OSM Roads)

    • OSM Roads

    • OSM Rivers

    • OSM Buildings

    • OSM Forests

    • OSM Beaches

    • OSM Parks

    • OSM Ski Slopes

    • OSM Grass

    • Overpass Short Query

    • Overpass Query

    • Local File

  • Overpass Server (FString): Choose an Overpass API server from https://wiki.openstreetmap.org/wiki/Overpass_API#Public_Overpass_API_instances (while respecting their limitations)

  • Local File (FString)

  • Overpass Query (FString)

  • Overpass Short Query (FString)

  • Overpass Short Query Preset (FString)

  • Skip Coordinate Conversion (bool, default false)

  • Scale X (double, default 1)

  • Scale Y (double, default 1)

  • Spawned Actors Path (FName): Folder used to spawn the actors. This setting is unused when generating from a combination.

  • Bounding Method (EBoundingMethod, default Bounding Actor)

    • Bounding Actor

    • Tile Numbers

  • Bounding Actor Selection (FActorSelection): Use a volume, a landscape, or another rectangular actor to specify the area on which you want to import vector data.

  • Bounding Zone Zoom (int, default 14)

  • Bounding Zone Min X (int, default 0)

  • Bounding Zone Max X (int, default 0)

  • Bounding Zone Min Y (int, default 0)

  • Bounding Zone Max Y (int, default 0)

  • Delete Old Splines When Creating Splines (bool, default false)

  • Actors Or Landscapes To Place Splines Selection (FActorSelection)

  • Use Landscape Splines (bool, default false): Check this only if ActorToPlaceSplines is a landscape and if you want to use landscape splines instead of normal spline components. For roads, it is recommended you use landscape splines (checked). For buildings, it is recommended you use normal spline components (unchecked).

  • Landscape Splines Straightness (double, default 1): Increasing this value (before generating splines) makes your landscape splines less curvy. This does not apply to regular splines.

  • Splines Tag (FName): Tag to apply to the Spline Owners which are created.

  • Spline Owner Kind (ESplineOwnerKind, default Single Spline Collection): Whether to put the created spline components in a single Spline Collection actor, or use one Spline Collection per actor, or use a custom actor.

    • Single Spline Collection

    • Many Spline Collections

    • Custom Actor

  • Spline Components Tag (FName): Tag to apply to the Spline Components which are created.

  • Actor To Spawn (TSubclassOf<AActor>): Spawn an actor of this type for each imported spline, and copy the imported spline points to the spawned actor’s spline component.

  • Spline Direction (ESplineDirection, default Any): Splines that are closed loops can be forced to be Clockwise or CounterClockwise (when seen from top).

    • Any

    • Clockwise

    • Counter Clockwise

  • Spline Points Offset (FVector): An offset which is added to all spline points that are generated.

  • Skip2 D Colinear Vertices (bool, default false): An offset which is added to all spline points that are generated.

  • Colinearity Angle Threshold (double, default 1): The angle in ° under which two vectors are considered colinear, so that we can skip a vertex.

  • Add Single Points (bool, default false): When true, point geometries will be added as single-point lists.

  • Flush PCG Cache After Import (bool, default false): If true, flushes the global PCG cache once after a successful import.

  • Resample Points At Distance (bool, default false): When true, will resample the imported splines at a given internal

  • Resample Distance (double, default 1500): in cm

  • Exact Distance (bool, default false): Sample points spaced exactly by the resample distance. If this is false, then the distance can be less, depending on the lengths of the splines.