本科生毕业论文 (设计)
题 目基于曲面细分的地图低精度模型绘制与渲染学 院 软件学院
专 业 软件工程
基于曲面细分的地图低精度模型绘制与渲染
[摘要] 目前业界针对三维模型渲染效率的提高,提出了许多有效且泛用的方法, 例如模型简化,LOD 分层等。其中,在游戏等商用领域中,采用置换贴图使低精度模型在视觉上接近高精度模型的方法更受青睐。目前置换贴图的烘培主要依赖 Maya,ZBrush 等商业软件,其具有泛用性高,操作方便,烘培效果好等优点。但受限于其商业软件的定位,其研发更更多的强调泛用性,而非针对不同种类模型的专用性,使得其在烘培部分特殊模型时存在系统资源浪费,数据冗余等问题。对于这一问题,本文针对平面地图这一类模型,提出了一种置换贴图烘培方案,意在针对平面地图信息集中在高度上这 一特点,烘培出集中体现高度差信息的置换贴图,即高度贴图。该方案基于曲面细分和深度值这一概念,分别对高模平面地图和低模平面地图进行垂直投影,从而获取各部 分深度差值,进而得到高低模对应的高度贴图。该方案集中计算资源在高低模差异信 息最集中的部分,从而实现高效率的高度贴图烘培,对差异信息在方向上的具有单一 性的模型拥有更好的适用性,具有一定的实用价值。
[关键词] 模型渲染;置换贴图;深度值;曲面细分
I
Low precision map model rendering based on surface subdivision
Software Engineering
[Abstract] In order to improve the efficiency of 3D model rendering, many effective and universal meth ods are proposed, such as model simplification, LOD layering and so on. Among them, some commercial fields such as games, displacement mapping is more popular to make the low precision model visually close to the high precision model. At present, the baking of displacement mapping mainly relies on Maya, ZBrush and other commercial software, which has the advantages of high versatility, easy operation and good baking effect. How ever, limited by the positioning of its commercial software, its development emphasizes more on the universality, instead of the specificity of different kinds of models, which leads to the problems of system resource waste and data redundancy when baking some special models. To solve this problem, this paper proposes a baking scheme of displacement map for plane map, aiming at the feature that the plane map information is concentrated on the height, baking a displacement map that reflects the difference information of height, which named height map. Based on the concept of surface subdivision and depth value, the scheme projects the highmode plane map and the lowmode plane map vertically to obtain the depth difference of each part, and then obtains the height map corresponding to both the highmode and lowmode. In this scheme, the computing resources are concentrated in the most concentrated part of the difference information of the high model and low model, so as to achieve highefficiency height mapping baking. It has better applicability to the model with single difference information in the direction, and is practical to some extent.
[Key Words] Model Rendering;Displacement Map;Depth Value;Tessellation
II
目 录
1 绪论 1
1.1 引言 1
1.2 国内外研究现状 1
1.2.1 模型简化技术 1
1.2.2 细节层次 LOD 技术 1
1.2.3
基于 GPU 的硬件加速技术 2
1.3 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 2
1.4 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 2
2 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 4
2.1 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 4
2.2 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 4
2.3 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 4
2.3.1 贝塞尔曲线 4
2.3.2
贝塞尔曲面 5
2.4 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 5
2.4.1 曲面细分控制着色器 6
2.4.2 曲面细分引擎 6
2.4.3
曲面细分计算着色器 7
2.5 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 7
2.5.1 凹凸贴图 7
2.5.2 法线贴图 7
2.5.3
置换贴图 7
3 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 8
3.1 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 8
3.2 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 8
3.3 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 9
3.4 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 9
4 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 10
4.1 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 10
4.2 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 10
4.2.1 模型导入 10
4.2.2 获取深度值 11
4.2.3 计算并输出深度差值 12
4.2.1 设置曲面细分着色器 12
4.2.2
PN 三角形 13
4.4 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 15
5 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 17
5.1 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 17
5.2 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 17
5.3 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 18
5.4 UE4 18
6 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 19
6.1 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 19
6.1.1 本文方法优势 19
6.1.2 本文方法劣势 19
6.1.3
可改进方向 19
6.2 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 20
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 21























