Files
nexus/wiki/concepts/LOD-Pipeline.md
2026-04-26 08:02:48 +08:00

76 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "LOD Pipeline"
type: concept
tags: [game-dev, asset-pipeline, optimization, performance]
sources: [technical-artist]
last_updated: 2026-04-26
---
# LOD Pipeline
## Definition
LODLevel of Detail多细节层次管线是自动管理 3D 模型在不同观看距离下显示精度的系统。当物体远离摄像机时,自动切换到更低多边形数的模型版本,从而节省渲染成本。
## Core Concept
LOD 是**强制流程**——每个英雄网格必须经过 LOD 管线处理,最低要求 LOD0 至 LOD3。
## LOD Budget Standardfrom Technical Artist
### Characters角色
| LOD | 最大多边形数 | 纹理分辨率 | Draw Calls |
|-----|------------|-----------|-----------|
| LOD0 | 15,000 | 2048×2048 | 23 |
| LOD1 | 8,000 | 1024×1024 | 2 |
| LOD2 | 3,000 | 512×512 | 1 |
| LOD3 | 800 | 256×256 | 1 |
### Environment — Hero Props英雄道具
| LOD | 最大多边形数 | 纹理分辨率 |
|-----|------------|-----------|
| LOD0 | 4,000 | 1024×1024 |
| LOD1 | 1,500 | 512×512 |
| LOD2 | 400 | 256×256 |
### Small Props小道具
| LOD | 最大多边形数 |
|-----|------------|
| LOD0 | 500 |
| LOD1 | 200 |
## LOD Validation Script
```python
LOD_BUDGETS = {
"character": [15000, 8000, 3000, 800],
"hero_prop": [4000, 1500, 400],
"small_prop": [500, 200],
}
def validate_lod_chain(asset_name: str, asset_type: str, lod_poly_counts: list[int]) -> list[str]:
errors = []
budgets = LOD_BUDGETS.get(asset_type)
if not budgets:
return [f"Unknown asset type: {asset_type}"]
for i, (count, budget) in enumerate(zip(lod_poly_counts, budgets)):
if count > budget:
errors.append(f"{asset_name} LOD{i}: {count} tris exceeds budget of {budget}")
return errors
```
## Critical Rules
1. **LOD0 强制**:不得交付任何未通过 LOD 管线的资产
2. **切换距离验证**:飞行检查所有 LOD 级别的过渡距离,确保无明显 pop-in
3. **纹理一致性**:不同 LOD 级别应使用合理的纹理分辨率递减策略
4. **导入自动化**:引擎导入预设应覆盖所有资产类别,避免艺术家手动配置
## Related Concepts
- [[Performance-Budget]]LOD 是控制渲染性能的核心工具
- [[AssetPipeline]]LOD 是资产管线标准的关键组成部分
- [[VFX]]VFX 特效也有 LOD 概念(随距离简化粒子密度)
## Connections
- [[TechnicalArtist]] ← enforces ← LOD Pipeline
- [[AssetPipeline]] ← includes ← LOD Pipeline
- [[Performance-Budget]] ← achieved by ← LOD Pipeline