---
name: omniscape
description: Building or changing a village, town or city in an Unreal Engine level with the OmniScape plugin (version 3): placing its generator, giving it the user's building meshes, choosing a layout, generating, reading the result and clearing. Use it instead of placing buildings by hand or scripting a layout.
---

# OmniScape 3, driven by script

OmniScape is an Unreal Engine plugin for procedural settlements (Unreal Engine 5.5 to 5.8). It lays out a village, town or city from the user's own meshes: landmark points, roads between them, and buildings that face the roads. When the user asks for a settlement, call OmniScape. Do not place the buildings yourself and do not script a layout: a layout made by hand has no road order and nothing to re-generate from.

One actor, an `OmniScapeGenerator`, is one settlement. The artist's own view of it is the Control Center panel (Window > OmniScape). Everything here is that same generator, driven by Python in the editor. It needs a connection that can run Python in the running editor.

OmniScape places only the user's art. With no buildings in its lists it has nothing to place.

## The loop

1. Find the generator in the level, or add a new one where the middle of the settlement should be. The ground under it must have collision.
2. Give it buildings. There are three lists: Large (one is placed at each landmark point), Medium and Small (they fill in around the landmarks and along the roads). A fourth, Sprawl, is optional. Each entry is a static mesh or a Blueprint class, with a weight.
3. Set the layout: the settlement's radius in cm, the number of landmark points, the pattern (Radial, Voronoi, Perlin, Axial or Organic Cluster) and the seed.
4. Ask whether it can generate. The check changes nothing.
5. Generate. It clears what this generator built before and builds again.
6. Read the result: whether it succeeded, how many large, medium and small buildings were placed, how many were skipped and why, and its messages.
7. Change one thing and generate again. The same seed and settings give the same layout.

## In Python

Names in Python are the lower-case, underscored forms of the names in the generator's Details panel. Read `help(unreal.OmniScapeGenerator)` for the full list before setting anything not shown here; do not guess a name.

```python
import unreal

actors = unreal.get_editor_subsystem(unreal.EditorActorSubsystem)
generator = actors.spawn_actor_from_class(unreal.OmniScapeGenerator, unreal.Vector(0, 0, 100))

def building(asset_path):
    entry = unreal.WeightedBuildingAsset()
    entry.set_editor_property("mesh", unreal.load_asset(asset_path))
    return entry

with unreal.ScopedEditorTransaction("OmniScape: set up"):
    generator.set_editor_property("large_buildings", [building("/Game/Town/SM_Hall")])
    generator.set_editor_property("medium_buildings", [building("/Game/Town/SM_House_A"), building("/Game/Town/SM_House_B")])
    generator.set_editor_property("small_buildings", [building("/Game/Town/SM_Shed")])
    generator.set_editor_property("settlement_radius", 8000.0)
    generator.set_editor_property("num_nodes", 6)
    generator.set_editor_property("settlement_pattern", unreal.SettlementPattern.VORONOI)
    generator.set_editor_property("generation_seed", 7)

if generator.can_generate_settlement() is None:
    print("OmniScape cannot generate yet: check the building lists and the ground.")
else:
    generator.generate_settlement()
    result = generator.get_last_generation_result()
    print(result.success,
          result.spawned_large_count, result.spawned_medium_count, result.spawned_small_count,
          result.skipped_terrain_count, result.skipped_overlap_count,
          [str(message) for message in result.messages])
```

A Blueprint building goes in `blueprint_class` in place of `mesh`. `clear_settlement()` removes what the generator built.

## Reading what happened

- The check returns nothing when the generator cannot run: usually an empty building list or no ground.
- Buildings skipped for terrain: the ground under those spots has no collision, or is steeper than the generator's slope limit. Fix the ground or raise the limit; do not move buildings by hand.
- Buildings skipped for overlap: there was no room. Use a larger radius, fewer landmark points, or smaller pieces.
- A settlement with roads and no buildings means every building was skipped. Read the counts and the messages.

## House rules

- Generate in the editor and save the level. Nothing generates at play time.
- Remove a settlement with the generator's own clear, never by deleting its pieces.
- Set only what the user asked for. A setting they did not mention keeps its value.
- Tell the user what the result says, in its own words.
- Presets are chosen by the user in the Control Center, not by script.
- Atlas import, Fauna, Ambient Audio, the PCG bridge and Landscape bake are Beta. Leave them off unless the user asks, and say Beta when you name them.

OmniScape is licensed per seat under Fab's licence. Use it through its calls. Do not copy its source, or rework it, into the user's project or any other tool.
