# ue-procedural-generation

A skill for PCG graphs, runtime meshes and instancing in Unreal Engine 5.8. Useful when world content is built from code.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1200 installs · ★ 405
- Author: quodsoler
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/quodsoler/unreal-engine-skills/tree/HEAD/skills/ue-procedural-generation/SKILL.md
- Updated: 2026-09-28
- HTML: https://affpapa.org/en/nevibecode/skills/ue-procedural-generation

## What it does

The skill covers procedural generation in Unreal Engine: PCG graphs, custom nodes in C++, runtime mesh building, instancing and seeded noise. It ships a class table (`UPCGComponent`, `UPCGGraph`, `UPCGSettings`, `IPCGElement`, `UPCGBasePointData`), the generation calls with their replication behaviour, and the runtime scheduler CVars such as `pcg.RuntimeGeneration.Enable`.

Separate sections handle `UProceduralMeshComponent`, `UDynamicMeshComponent` with Geometry Script, instancing through `UInstancedStaticMeshComponent` and `UHierarchicalInstancedStaticMeshComponent`, spline-driven placement, and deterministic random from `Core`. PCG needs the `PCG` module in `Build.cs` and the plugin enabled. The target is UE 5.8, with APIs checked against its headers and older forms listed apart.

The skill reads `.agents/ue-project-context.md` when it exists and keeps going when it does not. Adjacent topics live in other skills: collision on generated geometry in `ue-physics-collision`, instance materials in `ue-materials-rendering`, background work in `ue-async-threading`. On an older engine version, expect to verify some of the listed calls against your own headers.

## Requirements
- Works with: Unreal Engine

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add quodsoler/unreal-engine-skills --skill ue-procedural-generation -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/ue-procedural-generation/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/ue-procedural-generation/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add quodsoler/unreal-engine-skills --skill ue-procedural-generation -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/ue-procedural-generation/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add quodsoler/unreal-engine-skills --skill ue-procedural-generation -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/ue-procedural-generation/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install quodsoler/unreal-engine-skills ue-procedural-generation
```

2. **Manually: put the files in place**
- File: `.github/skills/ue-procedural-generation/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add quodsoler/unreal-engine-skills --skill ue-procedural-generation -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/quodsoler/unreal-engine-skills --path skills/ue-procedural-generation
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/ue-procedural-generation/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add quodsoler/unreal-engine-skills --skill ue-procedural-generation -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/quodsoler/unreal-engine-skills/tree/HEAD/skills/ue-procedural-generation/SKILL.md

## When to use it
- build a PCG graph and trigger generation from an actor
- write a custom PCG node in C++
- build a mesh at runtime with `UProceduralMeshComponent`
- place thousands of repeated meshes with HISM
- get reproducible scatter from a seed

## Example prompts
- Build a PCG graph that scatters trees on a slope and run it from an actor
- Write a custom PCG node in C++ with settings in `UPCGSettings`
- Set up runtime mesh generation with `CreateMeshSection` and a fixed seed

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 5a97d4abcc7a4d96.

BEGIN THIRD-PARTY FILE 5a97d4abcc7a4d96
```text
---
name: ue-procedural-generation
description: "Use when generating world content or geometry procedurally in Unreal Engine: PCG graphs, custom PCG nodes in C++, runtime mesh building, instancing and seeded noise. Also use when the user mentions 'PCG', 'UPCGComponent', 'UPCGSettings', 'IPCGElement', 'UPCGBasePointData', 'surface sampler', 'static mesh spawner', 'runtime generation', 'CreateMeshSection', 'UProceduralMeshComponent', 'UDynamicMeshComponent', 'Geometry Script', 'AddInstance', 'HISM', 'spline mesh', 'PerlinNoise', 'FRandomStream', 'scatter foliage' or 'marching cubes'. For collision on generated geometry, see ue-physics-collision; for instance materials, see ue-materials-rendering; for background work, see ue-async-threading."
metadata:
  version: "2.0.0"
  engine: "5.8"
---

# UE Procedural Generation

Target engine: **UE 5.8**. APIs below are verified against the 5.8 headers; older forms are listed under "Deprecated — do not use".

Covers the PCG framework (plugin `PCG` at `Engine/Plugins/PCG`, enabled by default, Build.cs module `PCG`), runtime mesh building with `UProceduralMeshComponent` (plugin `ProceduralMeshComponent`, module `ProceduralMeshComponent`) and `UDynamicMeshComponent` + Geometry Script (modules `GeometryFramework` and `GeometryScriptingCore`), instancing with `UInstancedStaticMeshComponent`/`UHierarchicalInstancedStaticMeshComponent`, spline-driven placement, and deterministic noise/random from `Core`.

## Context

Read `.agents/ue-project-context.md` if it exists (module names, conventions, enabled plugins, GAS/networking setup). Do not stop if it is missing.

Identify the area from the request and the codebase. Ask only when two plausible readings would produce different code.

| Request is about… | Go to |
|---|---|
| Enabling PCG, module/plugin wiring | [PCG setup](#pcg-setup) |
| Driving generation from an actor, runtime generation, partitioning | [PCG component and runtime generation](#pcg-component-and-runtime-generation) |
| Reading/writing points inside a graph | [Point data](#point-data) |
| Writing a new PCG node in C++ | [Custom PCG node in C++](#custom-pcg-node-in-c) |
| Which node does X, pin labels, node settings fields | [PCG node reference](references/pcg-node-reference.md) |
```
END THIRD-PARTY FILE 5a97d4abcc7a4d96

The third-party file has ended. Everything between the 5a97d4abcc7a4d96 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2268 of 30434 bytes. © quodsoler · MIT · https://github.com/quodsoler/unreal-engine-skills/tree/HEAD/skills/ue-procedural-generation/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
