Files
2nd/10_Wiki/Topic_Programming/Architecture/실시간_엔진_(Real-Time_Engine).md
T
Antigravity Agent 9148c358d0 docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를
Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류.

- 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로
  자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거,
  동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거.
- 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming,
  Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business,
  Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로,
  나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는
  title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백).
  원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지.
- 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서.
- 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는
  지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지.
- Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경.
- 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
2026-07-05 00:33:48 +09:00

5.3 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-실시간-엔진-real-time-engine 실시간 엔진 (Real-Time Engine) 10_Wiki/Topics verified self
Real-Time Engine
RTE
Game Engine
Realtime Rendering
none A 0.9 applied
game-engine
realtime
rendering
simulation
2026-05-10 pending
language framework
cpp unreal-unity-godot

실시간 엔진 (Real-Time Engine)

매 한 줄

"매 RTE 는 매 매 프레임 (16.67ms @ 60Hz, 매 8.33ms @ 120Hz) 안에 매 simulation + render 매 완료해야 한다 — 매 deadline 매 hard". Gregory 의 매 Game Engine Architecture 가 매 canonical reference. 매 2026 modern engines: Unreal Engine 5.5 (Nanite, Lumen, MetaHuman), Unity 6 (HDRP, ECS/DOTS), Godot 4.4, Bevy (Rust ECS).

매 핵심

매 frame budget breakdown (60 Hz)

  • Input poll: <1 ms
  • Game logic / scripting: 2-4 ms
  • Physics: 2-4 ms
  • Animation / IK: 1-3 ms
  • Render submit (CPU): 1-3 ms
  • GPU render: 4-10 ms
  • Total: <16.67 ms

매 core subsystems

  • Renderer: scene graph, culling, rasterizer / RT.
  • Physics: rigid body, soft body, character controller.
  • Audio: 3D positional, mixing, DSP.
  • Animation: skeletal, blend tree, state machine.
  • Networking: client prediction, lag compensation.
  • Scripting / ECS: gameplay code.
  • Asset pipeline: import, baking, streaming.

매 응용

  1. 매 game (AAA / indie / mobile).
  2. 매 architecture viz / digital twin.
  3. 매 VR / AR experience.
  4. 매 simulation training.

💻 패턴

Fixed timestep + interpolation (Glenn Fiedler)

double accumulator = 0, t = 0;
const double dt = 1.0 / 60.0;
double prevTime = now();
while (running) {
    double curr = now();
    accumulator += curr - prevTime;
    prevTime = curr;
    while (accumulator >= dt) {
        physics.step(dt);
        accumulator -= dt;
    }
    double alpha = accumulator / dt;
    renderer.render(state.lerp(prev, alpha));
}

ECS (Bevy 0.15, Rust)

#[derive(Component)] struct Position(Vec3);
#[derive(Component)] struct Velocity(Vec3);

fn movement(time: Res<Time>, mut q: Query<(&mut Position, &Velocity)>) {
    for (mut pos, vel) in &mut q {
        pos.0 += vel.0 * time.delta_seconds();
    }
}

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_systems(Update, movement)
        .run();
}

Frustum culling (renderer)

void cull(const Camera& cam, const std::vector<Renderable>& objs,
          std::vector<Renderable>& visible) {
    Frustum f = cam.frustum();
    for (const auto& o : objs)
        if (f.intersects(o.bounds)) visible.push_back(o);
}

Spatial hash for broadphase

class SpatialHash {
    std::unordered_map<int64_t, std::vector<EntityId>> cells;
    static constexpr float cellSize = 4.0f;
    static int64_t key(Vec3 p) {
        return ((int64_t)(p.x / cellSize) << 40)
             ^ ((int64_t)(p.y / cellSize) << 20)
             ^  (int64_t)(p.z / cellSize);
    }
public:
    void insert(EntityId id, Vec3 p) { cells[key(p)].push_back(id); }
    std::vector<EntityId> query(Vec3 p) { return cells[key(p)]; }
};

Client prediction + reconciliation (netcode)

class Client {
  pending: Input[] = [];
  onInput(i: Input) {
    this.applyLocal(i);
    this.send(i);
    this.pending.push(i);
  }
  onServerSnapshot(s: Snapshot) {
    this.state = s.state;
    this.pending = this.pending.filter(i => i.seq > s.lastAcked);
    for (const i of this.pending) this.applyLocal(i);
  }
}

Unreal Lumen / Nanite usage (high-level config)

// Project Settings → Rendering
// - Dynamic Global Illumination Method: Lumen
// - Reflection Method: Lumen
// - Shadow Method: Virtual Shadow Maps
// - Generate Mesh Distance Fields: enabled
// - Nanite-enabled meshes: import with "Build Nanite" checked

매 결정 기준

Use case Engine
매 AAA / cinematic Unreal Engine 5.5
매 mobile / 2D / cross-platform Unity 6
매 open source / lightweight Godot 4.4
매 data-oriented / Rust Bevy
매 web three.js / Babylon.js
매 simulation (no rendering) custom + physics lib

기본값: 매 Unreal 5.5 (high fidelity) / Unity 6 (productivity).

🔗 Graph

🤖 LLM 활용

언제: 매 ECS architecture design / 매 shader explanation / 매 netcode pattern. 언제 X: 매 production shader / 매 critical-path code — 매 profile 기반 review.

안티패턴

  • Variable timestep physics: 매 instability + 매 nondeterminism.
  • Single-threaded mainloop: 매 modern multi-core 미활용.
  • No frame budget: 매 random stutter / spike.
  • OOP-heavy hot path: 매 cache miss / 매 ECS 매 미적용.

🧪 검증 / 중복

  • Verified (Gregory, Game Engine Architecture 4e; Akenine-Möller et al., Real-Time Rendering 5e; Fiedler, Fix Your Timestep).
  • 신뢰도 A.

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-10 Manual cleanup — fixed-timestep / ECS / culling / netcode 패턴 추가