Zh/MAP (file format): Difference between revisions
< Zh
Jump to navigation
Jump to search
(Created page with "{{LanguageBar|MAP|title=地图文件格式}} {{tabsBar|main=MAP}} {{non-valve engine|engine|本文涵盖所有主流MAP文件格式变体(不限于{{gldsrc|2}}所用版本),全面解析该格式并说明兼容性问题的复杂性}} {{stub}} '''MAP文件格式'''是{{gldsrc|4.1}}、{{idtech2|4.1}}、{{idtech3|4.1}}和{{idtech4|4.1}}通用的纯文本格式,用于存储实体与场景几何数据({{idtech4|3.1}}引擎甚至可直接读取)。{{src|4.1}}的{{L|...") |
No edit summary |
||
Line 7: | Line 7: | ||
该格式核心由多个{{L|entities|实体}}构成,每个实体可包含: | 该格式核心由多个{{L|entities|实体}}构成,每个实体可包含: | ||
- {{L|brush|笔刷}}(所有引擎) | - {{L|brush|笔刷}}(所有引擎) | ||
- {{only|{{idtech3}}{{idtech4}}}} | - {{only|{{idtech3}}{{idtech4}}}} [[Zh/#Patch meshes|曲面网格]] | ||
- {{src|only}} | - {{src|only}} [[Zh/#Displacements|置换面]] | ||
{{warning|兼容性问题错综复杂:GoldSrc编译器仅支持Quake1 Valve220格式,但MAP文件存在数十种变体(详见 | {{warning|兼容性问题错综复杂:GoldSrc编译器仅支持Quake1 Valve220格式,但MAP文件存在数十种变体(详见{{L|#Variants|变体章节}})}} | ||
== 格式变体 == | == 格式变体 == |
Latest revision as of 02:18, 27 June 2025

This page documents information about an engine not developed by Valve. This information is documented here because it has technical and/or historical relevance to Valve's engines.
本文涵盖所有主流MAP文件格式变体(不限于
金源所用版本),全面解析该格式并说明兼容性问题的复杂性
本文涵盖所有主流MAP文件格式变体(不限于

MAP文件格式是 金源、
id Tech 2、
id Tech 3和
id Tech 4通用的纯文本格式,用于存储实体与场景几何数据(id Tech 4引擎甚至可直接读取)。
起源的VBSP 仍保留对MAP文件的编译支持。
该格式核心由多个实体 构成,每个实体可包含:
- 笔刷 (所有引擎)
- (仅存在于 之中) 曲面网格
- (仅存在于
之中) 置换面

- Variants|变体章节]] )
格式变体
格式名称 | 支持工具 | 特性说明 |
---|---|---|
![]() |
除![]() |
原始格式 |
![]() |
所有![]() ![]() |
增强纹理UV精度 由 ![]() |
![]() |
所有![]() ![]() |
新增三个WAL 元数据标志位 |
![]() |
![]() ![]() ![]() |
采用Valve220式UV坐标 现为Quake2社区标准 |
![]() |
所有![]() |
支持[[Zh/
|
![]() |
除![]() ![]() | |
![]() |
所有![]() |
标准笔刷已逐渐被笔刷基元取代 |
![]() |
除TrenchBroomBFG外多数工具 | |
![]() |
无 | 早期Source引擎试验性格式(2001-2002年间被VMF 取代) |
几何结构
笔刷定义
多数版本中,笔刷以平面 集合形式存储(而非顶点)。每个平面由三个点定义,平面相交形成边与顶点。因此: - 笔刷不能为凹面体 - 缺失面会导致无限延伸,引发编译错误
Quake1格式示例
{ ( -16 -64 -16 ) ( -16 -63 -16 ) ( -16 -64 -15 ) 材质名 U偏移 V偏移 旋转 U缩放 V缩放 }

Valve220革新
改进纹理投影方式,消除斜面拉伸:
( x1 y1 z1 ) ( x2 y2 z2 ) ( x3 y3 z3 ) 材质名 [U法线向量] [V法线向量] 旋转 U缩放 V缩放

格式转换工具
使用maputil.exe可进行格式互转: ```bash
- 转为笔刷基元
maputil.exe --convert bp input.map
- 转为Valve220标准
maputil.exe --convert valve input.map
相关链接
VMF (Source引擎原生格式)
RMF (Worldcraft遗留格式)