Files
2nd/10_Wiki/Topics/Computer_Science_and_Theory/Automated-Map-Generation.md
T
koriweb d8a80f6272 chore(wiki): dangling 링크 canonical 정규화 (768파일/1200건)
이름만 다른(표기 변형) [[위키링크]]를 대상 문서의 canonical 제목으로 치환해
끊겼던 1,200개 링크를 연결. 제목/파일명 정규화 일치만 적용하고 별칭 매칭은
과병합 위험으로 제외(애매성 가드). 원본은 _link_reconcile_backup/ 에 백업.
도구: Datacollect/scripts/link_reconcile_apply.mjs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 12:24:15 +09:00

5.4 KiB

id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
id title category status canonical_id aliases duplicate_of source_trust_level confidence_score verification_status tags raw_sources last_reinforced github_commit tech_stack
wiki-2026-0508-automated-map-generation Automated Map Generation 10_Wiki/Topics verified self
Procedural Map Generation
PCG
Auto-Cartography
none A 0.9 applied
pcg
gamedev
cartography
gis
generative
2026-05-10 pending
language framework
Python/C# Unity/Godot/Houdini

Automated Map Generation

매 한 줄

"매 noise + constraint + agent — 매 hand-craft 의 X, 매 procedure 의 grow.". Automated map generation 의 PCG (procedural content generation) 의 spatial subset — 매 1980 Rogue dungeon → Minecraft (Perlin) → 2026 의 Houdini node + WaveFunctionCollapse + diffusion-based terrain (LumaWorld, Genie 2). GIS 측 의 OpenStreetMap auto-vectorize from satellite (SAM-2 + DETR).

매 핵심

매 Approaches

  • Noise-based: Perlin / Simplex / fBm — terrain heightmap.
  • Cellular automata: cave / organic terrain (Game of Life variant).
  • L-systems: vegetation / road network.
  • Wave Function Collapse (WFC): tile-based, constraint propagation.
  • Agent-based: drunken walk, BSP partition.
  • Graph grammar: dungeon room layout.
  • Diffusion / GAN: 2024+ heightmap / texture from prompt.
  • Satellite → vector (GIS): SAM-2 + OSM tagging.

매 Properties

  • Determinism (seed reproducibility).
  • Controllability (parameter / prompt steering).
  • Coherence (no impossible tiles).
  • Aesthetic / playability metric.

매 응용

  1. Game level (Minecraft, NMS, Diablo).
  2. Open-world terrain (UE5 PCG, Houdini).
  3. GIS map auto-extraction.
  4. Simulation environments (CARLA, Habitat).
  5. Tabletop RPG (Watabou, Dungeon Alchemist).

💻 패턴

Pattern 1 — Perlin heightmap

import numpy as np
from noise import pnoise2

def heightmap(w, h, scale=80, octaves=5, seed=0):
    arr = np.zeros((h, w))
    for y in range(h):
        for x in range(w):
            arr[y, x] = pnoise2(x/scale, y/scale, octaves=octaves, base=seed)
    return (arr - arr.min()) / (arr.max() - arr.min())

Pattern 2 — Cellular automaton cave

def step(grid):
    h, w = grid.shape
    out = grid.copy()
    for y in range(1, h-1):
        for x in range(1, w-1):
            n = grid[y-1:y+2, x-1:x+2].sum() - grid[y, x]
            out[y, x] = 1 if n > 4 else 0
    return out

# init random 45% wall, run 5 steps → cave

Pattern 3 — Wave Function Collapse (sketch)

# tiles: list of (id, neighbor constraint dict)
def wfc(grid_size, tiles):
    grid = [[set(t.id for t in tiles) for _ in range(grid_size)] for _ in range(grid_size)]
    while not all_collapsed(grid):
        c = lowest_entropy_cell(grid)
        grid[c.y][c.x] = {random.choice(list(grid[c.y][c.x]))}
        propagate(grid, c, tiles)
    return grid

Pattern 4 — BSP dungeon partition

def split(rect, depth=4):
    if depth == 0 or min(rect.w, rect.h) < 12: return [rect]
    if rect.w > rect.h:
        x = random.randint(rect.x + 4, rect.x + rect.w - 4)
        return split(Rect(rect.x, rect.y, x - rect.x, rect.h), depth-1) + \
               split(Rect(x, rect.y, rect.x + rect.w - x, rect.h), depth-1)
    # similar for vertical

Pattern 5 — Diffusion terrain (2026)

# Pseudo: Stable Diffusion XL fine-tuned on heightmap atlas
heightmap = sd_terrain.generate(prompt="alpine valley with river, top-down heightmap, 16-bit grayscale")
mesh = heightmap_to_mesh(heightmap, vertical_scale=200.0)

Pattern 6 — Satellite → OSM (SAM-2)

# Mask building footprints from satellite tile, convert to OSM polygons
masks = sam2.predict(satellite_tile)
polygons = [mask_to_polygon(m) for m in masks if m.score > 0.8]
osm_xml = polygons_to_osm(polygons, tag={"building": "yes"})

매 결정 기준

상황 Approach
Continuous terrain Perlin / Simplex / fBm
Organic cave Cellular automaton
Tile-based level (puzzle) WFC
Dungeon rooms BSP + corridor connect
Open-world AAA Houdini + UE5 PCG
Prompted asset Diffusion (SDXL terrain LoRA)
GIS extraction SAM-2 + DETR + OSM tagging

기본값: Perlin for terrain, WFC for tile-based, BSP for dungeons.

🔗 Graph

🤖 LLM 활용

언제: parameter tuning suggestions, prompt-to-terrain via diffusion, level metric scoring (playability / aesthetic), debug seed reproduction. 언제 X: hand-crafted narrative levels, regulatory cartography (use authoritative source).

안티패턴

  • No seed log: bug 의 reproduce 불가.
  • Pure noise = boring: 매 noise 의 only 의 no landmark — overlay POI / agent 추가.
  • Unconstrained WFC: contradictory tile set → infinite backtrack.
  • Diffusion without metric guard: visual nice but topologically broken (impassable cliff).

🧪 검증 / 중복

  • Verified (Shaker et al. "Procedural Content Generation in Games", Houdini docs, WFC Maxim Gumin).
  • 신뢰도 A.

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-10 Manual cleanup — FULL content (Perlin, WFC, BSP, diffusion, SAM-2)