# AI Mesh Terrain — Unreal Engine Extension

AI Mesh Terrain (com.ivanmurzak.unreal-ai-mesh-terrain) — Experimental Mesh Terrain (Mesh Partition) authoring for Unreal Engine 5.8+ — create terrains flat or from a heightmap; add, edit, reorder and remove modifiers (noise, splines, shapes, lattices …); sculpt and paint; read the ground height, slope and paint channels; and rebuild with a wait until the terrain matches its modifiers. An AI Game Developer extension for Unreal Engine that adds 5 capabilities through RQL (no extra MCP tools).

_Last updated: 2026-11-15_

## At a glance

| Field | Value |
| --- | --- |
| Capabilities | 5 capabilities |
| Version | 0.1.0 |
| Package id | com.ivanmurzak.unreal-ai-mesh-terrain |
| Engine | Unreal Engine · Unreal Engine 5.8+ |
| Status | Experimental |
| Base plugin | UnrealMCP 0.31.3 or later |
| Wraps | MeshPartition + MeshTerrainMode |
| Repository | https://github.com/IvanMurzak/Unreal-MCP/blob/main/extensions/UnrealAIMeshTerrain/README.md |
| RQL sources | meshTerrains, meshTerrainModifiers, meshTerrain, meshTerrainCreate, meshTerrainBrush, meshTerrainModifier |
| RQL functions | — |
| RQL types | MeshPartition, ModifierComponent, LatticeModifier |

## How it works

Adds no MCP tools: it contributes an RQL module with the meshTerrains, meshTerrainModifiers, meshTerrain, meshTerrainCreate, meshTerrainBrush, meshTerrainModifier sources and adapters for MeshPartition, ModifierComponent, LatticeModifier. That powers 5 capabilities the agent reaches through rql-query / rql-mutate.

- Create & import terrains — Create a flat Mesh Terrain at a size and resolution, import one from a 16-bit heightmap (Landscape’s height units), or delete a terrain with its base meshes and modifiers in one undo step; a new terrain is built when the call returns. RQL: `meshTerrainCreate | call Create("Terrain", [0, 0, 0], 500)`
- Add modifiers — Shape a terrain with modifiers bound to it: noise hills, flat patches, paint weights, splines (roads, river beds), Boolean or projected shapes, lattices, texture patches and remesh boxes, each with a label to find it again. RQL: `meshTerrainModifier | call AddNoise(unreal.find("Terrain"), [0, 0, 0], [8000, 8000], 600, 0.0005, 0.5, "Hills")`
- Edit & reorder modifiers — Change a modifier’s size, radius, width, strength or falloff, move it, set spline or lattice points, set its build order, enable or disable it, bind it to another terrain, or remove it; the terrain is rebuilt when the call returns. RQL: `meshTerrainModifier | call SetOrder(unreal.find("Pad").Modifier, 10)`
- Sculpt & paint — Raise, lower, flatten or smooth the ground with a soft-edged brush stroke, and paint or erase a paint channel, stored in a brush modifier the mode’s own Sculpt and Paint tools can keep editing. RQL: `meshTerrainBrush | call Sculpt(unreal.find("Terrain"), "Raise", [1200, -800, 0], 1500, 400)`
- Surface, build & inspect — List terrains (build state, bounds, priority layers, paint channels) and their modifiers, read the height, slope, normal and paint weights at points, rebuild a terrain or wait for its build, and enable the Mesh Terrain plugins. RQL: `meshTerrain | call Surface(unreal.find("Terrain"), [1200, -800, 0])`

## Install

Requires the base plugin UnrealMCP 0.31.3 or later. The extension ships as C++ source: rebuild the project (or pass --build) before opening the editor; then the RQL module loads with the package — the agent sees it in rql-schema.

```bash
unreal-mcp-cli install-extension com.ivanmurzak.unreal-ai-mesh-terrain <UEProject>
```

## When to ask the AI for it

Ask for terrain built with Unreal’s experimental Mesh Terrain in a UE 5.8+ World Partition level — rolling hills from noise, a flat pad, a road or river bed along a spline, a heightmap import, or sculpted and painted ground.

Not sure if it's installed? Ask the agent to run rql-schema — the meshTerrains source only exists when the package is present.

## Example prompts

1. Create a 500 m Mesh Terrain called Terrain at the origin and add noise hills labelled Hills over an 80 m area.
2. Flatten a round pad called Pad at (1200, -800, 350) on Terrain, then tell me the ground height and slope there.
3. Import Heightmaps/alps.png as a 2 km Mesh Terrain called Alps and paint the Red channel around (1200, -800).

---

Source (HTML): https://ai-game.dev/docs/extensions/unreal/meshterrain
