OGR Geometry#
The OGRGeometry actor lets you import vector geometry data from OSM
or any file format supported by GDAL and visualize the imported areas on your landscape.
Import Geometry#
First make sure that you have a Level Coordinates actor in your level.
Search for
OGRGeometryin the Content Browser, and drag one into your level.In the Details Panel, select a geometry source:
OSM Roads, OSM Rivers, OSM Buildings, OSM Forests, OSM Beaches, OSM Parks, OSM Ski Slopes, or OSM Grass for built-in OSM data queries
Overpass Short Query or Overpass Query for custom Overpass API queries
Local File for any vector file supported by GDAL (e.g., Shapefile, GeoJSON, KML)
Choose a
Bounding Actor(a volume, landscape, or rectangular actor) to define the area for importing geometry, or use tile-based bounding.Press the
Import Geometrybutton.
Preview Decal#
Once geometry is imported, you can preview it as a colored decal overlay on your landscape:
Enable Show Geometry Preview to display the imported geometry on the landscape
Adjust the Preview Material, Preview Resolution, and Preview Color to customize the look
This preview helps you verify that the geometry covers the correct area before using it for filtering.
Use with OGR Filter#
The imported geometry can be used with the OGR Filter node in PCG to filter procedural generation points based on the imported area. For example, you can spawn trees only within OSM forest areas or place foliage only in park boundaries.
See OGR Filter for details on using geometry to filter PCG points.
OGR Geometry Settings#
GDAL Importer
Position Based Generation (
ULCPositionBasedGeneration)Source (
EVectorSource, defaultOSM Roads)OSM RoadsOSM RiversOSM BuildingsOSM ForestsOSM BeachesOSM ParksOSM Ski SlopesOSM GrassOverpass Short QueryOverpass QueryLocal 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)Spawned Actors Path (
FName): Folder used to spawn the actors. This setting is unused when generating from a combination.Area Tag (
FName): Tag to apply to the current actor when importing the area.Clear Geometry Before Importing (
bool, defaulttrue)Bounding Method (
EBoundingMethod, defaultBounding Actor)Bounding ActorTile 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, default14)Bounding Zone Min X (
int, default0)Bounding Zone Max X (
int, default0)Bounding Zone Min Y (
int, default0)Bounding Zone Max Y (
int, default0)Flush PCG Cache After Import (
bool, defaultfalse): If true, flushes the global PCG cache once after a successful import.
GDAL Importer > Preview
Show Geometry Preview (
bool, defaultfalse): Show a colored decal overlay of Geometry on the landscape.Preview Material (
UMaterialInterface)Preview Resolution (
int32, default256)Preview Color (
FLinearColor, defaultFLinearColor(1.0f, 1.0f, 1.0f, 0.1f))Preview Decal (
UDecalComponent)