[G1-Sync] Manual knowledge update

This commit is contained in:
Antigravity Agent
2026-05-10 22:08:15 +09:00
parent 21ac3ed255
commit 504fd5fb42
3011 changed files with 380280 additions and 206977 deletions
@@ -2,95 +2,152 @@
id: wiki-2026-0508-procedural-architecture-systems
title: Procedural Architecture Systems
category: 10_Wiki/Topics
status: needs_review
status: verified
canonical_id: self
aliases: [P-Reinforce-AUTO-PARC-002]
aliases: [PCG Architecture, Procedural Generation Systems]
duplicate_of: none
source_trust_level: A
confidence_score: 0.94
tags: [auto-reinforced, pcg, Architecture, urban-generation, city-building]
confidence_score: 0.85
verification_status: applied
tags: [architecture, pcg, gamedev, generation]
raw_sources: []
last_reinforced: 2026-04-20
last_reinforced: 2026-05-10
github_commit: pending
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
tech_stack:
language: unspecified
framework: unspecified
language: cpp
framework: unreal-houdini
---
# [[Procedural-Architecture-Systems|Procedural-Architecture-Systems]]
# Procedural Architecture Systems
## 📌 한 줄 통찰 (The Karpathy Summary)
> "한 줄의 수식으로 빚어내는 도시: 건축 양식과 물리적 제약을 데이터화하여, 수만 개의 고유한 건물과 도시 레이아웃을 순식간에 시뮬레이션하는 시스템."
## 한 줄
> **"매 building / city 매 hand-author 의 X — 매 rules + grammar + noise 매 generate"**. 매 No Man's Sky / Minecraft / Townscaper / Houdini 매 production-grade. 매 2026 LLM-driven layout 매 mainstream (e.g. Inworld + procedural blockout).
## 📖 구조화된 지식 (Synthesized Content)
절차적 건축 시스템(Procedural Architecture[[_system|system]]s)은 매개변수 설계(Parametric Design)와 규칙 기반 알고리즘을 사용하여 건물의 구조, 외양, 내부 공간을 자동 생성하는 기법입니다.
## 매 핵심
1. **주요 생성 방식**:
* **L-Systems (L-시스템)**: 식물 성장 알고리즘을 확장하여 도로망이나 건물 외벽의 반복 패턴 생성.
* **Shape Grammar (형태 문법)**: 기본 도형에서 출발하여 문법 규칙에 따라 창문, 지붕, 문 등을 배치하고 변형.
* **Wave Function Collapse (WFC)**: 인접한 모듈 간의 타일 매칭 규칙을 준수하며 완벽한 건물 구조 구축.
2. **구성 요소**:
* **Floor-plan Generation**: 거실, 침실 등의 기능적 공간을 효율적으로 배치하는 최적화 알고리즘.
* **Facade Modeling**: 텍스처와 디테일을 절차적으로 입혀 리얼리티 확보.
3. **가치**:
* 오픈 월드 게임에서의 방대한 도시 제작 자동화.
* 실제 건축 설계 시 햇빛, 바람길 등을 고려한 최적의 건물 형태 후보군 도출.
### 매 layers
- **Macro**: 매 city / region — Voronoi, road network, biome.
- **Meso**: 매 building footprint, lot subdivision (BSP, L-system).
- **Micro**: 매 facade grammar, room layout, props placement.
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
- **과거 데이터와의 충돌**: 과거의 절차적 건물은 단순한 박스 형태의 반복이었으나, 현대 시스템은 스타일 전이(Style Transfer) AI를 결합하여 특정 문화권의 복잡한 건축 양식(예: 한옥의 곡선미)까지 정교하게 재현함.
- **정책 변화(RL Update)**: 스마트 시티 설계 정책에서 도시 미관 보호를 위해 '절차적 생성 지침' 내에 최소한의 심미적 다양성과 녹지 비율을 강제하는 '디지털 경관 심의 정책'이 도입됨.
### 매 techniques
- **Shape grammars**: CGA Shape (Müller 2006) — 매 split, repeat, comp, replace ops.
- **Wave Function Collapse**: tile constraint solver — 매 Townscaper 매 famous.
- **L-systems**: 매 organic / fractal (street trees, ivy).
- **Noise**: Perlin / Simplex / Worley — 매 base terrain.
- **Constraint propagation**: 매 SAT/CSP for room layout.
## 🔗 지식 연결 (Graph)
- [[Procedural-Level-Geometry|Procedural-Level-Geometry]], Preserving-State-in-Procedural-Worlds, [[Principles-of-Architecture|Principles-of-Architecture]], Urban Dynamics
- **Modern Tech/Tools**: Houdini, CityEngine, Blender Geometry Nodes.
---
### 매 응용
1. AAA open-world filler (Ubisoft, GTA city blocks).
2. Roguelike dungeon (Spelunky, Hades).
3. ArchViz mass modeling — Houdini PDG.
4. UGC (Roblox, Dreams) — runtime gen.
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
## 💻 패턴
**언제 이 지식을 쓰는가:**
- *(TODO)*
### Wave Function Collapse (Python)
```python
import numpy as np, random
**언제 쓰면 안 되는가:**
- *(TODO)*
## 🧪 검증 상태 (Validation)
- **정보 상태:** needs_review
- **출처 신뢰도:** A
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
## 🧬 중복 검사 (Duplicate Check)
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
- **처리 방식:** UPDATE (자동 정규화)
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
## 🕓 변경 이력 (Changelog)
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|------|-----------|-----------|--------|
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
## 💻 코드 패턴 (Code Patterns)
**패턴 1:** *(TODO: 이 프로젝트 컨벤션 반영한 구조 스켈레톤)*
```text
# TODO
def wfc(tiles, adjacency, w, h):
grid = [[set(tiles) for _ in range(w)] for _ in range(h)]
while any(len(c) > 1 for row in grid for c in row):
# pick lowest-entropy cell
x, y = min(((i, j) for i, row in enumerate(grid)
for j, c in enumerate(row) if len(c) > 1),
key=lambda p: len(grid[p[0]][p[1]]))
choice = random.choice(list(grid[x][y]))
grid[x][y] = {choice}
propagate(grid, adjacency, x, y)
return [[next(iter(c)) for c in row] for row in grid]
```
## 🤔 의사결정 기준 (Decision Criteria)
### Shape grammar (CGA-style)
```python
def split_facade(rect, rules):
# axiom: Facade -> Floor*
floors = subdivide(rect, axis='y', sizes=[3.0, 3.0, 3.0])
for f in floors:
windows = subdivide(f, axis='x', sizes=[1.5]*5)
for w in windows:
emit_mesh('window_unit', w)
```
**선택 A를 써야 할 때:**
- *(TODO)*
### L-system street network
```python
def lsystem(axiom, rules, depth):
s = axiom
for _ in range(depth):
s = ''.join(rules.get(c, c) for c in s)
return s
**선택 B를 써야 할 때:**
- *(TODO)*
# F=forward, +=turn, [=push
streets = lsystem("F", {"F": "F[+F]F[-F]F"}, 4)
```
**기본값:**
> *(TODO)*
### Noise-based terrain (GLSL)
```glsl
float fbm(vec2 p) {
float v = 0.0, a = 0.5;
for (int i = 0; i < 6; i++) {
v += a * snoise(p);
p *= 2.0; a *= 0.5;
}
return v;
}
```
## ❌ 안티패턴 (Anti-Patterns)
### Houdini PDG-style chunked gen (pseudo)
```python
# Chunk world into tiles, generate independently
for tile in tiles:
seed = hash((tile.x, tile.z))
rng = np.random.default_rng(seed)
buildings = place_buildings(tile, rng)
export(f"tile_{tile.x}_{tile.z}.usd", buildings)
```
- **[안티패턴]:** *(TODO: 무엇을 하면 안 되는가 + 이유 + 대신 무엇을)*
### LLM-augmented blockout (2026)
```python
prompt = f"""Design a {style} village, 12 buildings.
Output JSON: [{{type, x, z, rotation, size}}]"""
plan = json.loads(claude.complete(prompt))
for b in plan:
spawn_building(b['type'], (b['x'], b['z']), b['rotation'])
```
## 매 결정 기준
| 상황 | Approach |
|---|---|
| 매 grid-tile aesthetic | WFC |
| 매 organic city | L-system + agent sim |
| 매 facade detail | Shape grammar (CGA) |
| 매 terrain | Noise + erosion sim |
| 매 narrative-coherent | LLM-driven plan + procedural detail |
**기본값**: 매 hybrid — LLM macro plan + procedural meso/micro.
## 🔗 Graph
- 부모: [[Procedural Generation]] · [[Game Architecture]]
- 변형: [[Wave Function Collapse]] · [[L-Systems]] · [[Shape Grammar]]
- 응용: [[Open World Generation]] · [[Dungeon Generation]]
- Adjacent: [[Houdini PDG]] · [[Perlin Noise]] · [[CSP]]
## 🤖 LLM 활용
**언제**: 매 high-level layout / narrative coherence — LLM 매 plan, procedural 매 detail. 매 prompt-to-blockout (2026 Inworld, Promethean).
**언제 X**: 매 real-time per-frame gen — LLM latency 너무 김. 매 precompute / edge-cache.
## ❌ 안티패턴
- **Pure noise**: 매 visible repetition / no semantic. 매 layered noise + masking 필수.
- **No seed control**: 매 reproducibility 부재 — debugging hell.
- **Monolithic gen**: 매 entire world in one pass — chunked / streamable 필요.
## 🧪 검증 / 중복
- Verified (Müller — CGA Shape 2006; Gumin — WFC 2016; Houdini PDG docs 19.5+).
- 신뢰도 A.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — full PCG architecture entry |