视点相关的地形连续LOD研究

 2022-06-25 10:06

论文总字数:24624字

摘 要

地形渲染在FPS游戏、飞行器漫游、地理信息系统及虚拟现实系统中都有着广泛的应用。地形数据数据量大,每帧通常需要渲染几十万甚至几千万个三角形。虽然随着科技的发展,计算机性能已经得到了巨大的提升,但仍然无法一次渲染所有的三角形。此时,如何在保证视觉效果的前提下,尽可能简化地形,减少不必要的绘制动作(如不绘制不需要的细节)成为实现大规模地形渲染的关键,LOD(Level of Detail)技术是目前广泛使用的的解决此问题的方法。

本文基于四叉树LOD技术,综合考虑视线方向、地形块距离视点的距离、地形块面积等因素,利用立体角的概念,在前人的基础上,提出了一种基于视点的全新的地形块分割评价方式构造LOD地形。相对于其他分割方式,此方式只需一个阈值控制地形节点是否分割,消除了以前多参数无法精确控制某一因素的缺点。此外,此方式还可以让地形背坡部分以较粗的细节展示,相对以前的分割方式,能较显著地提高效率。

在此基础上,本文利用OpenGL,实现了一个简单的地形渲染平台,加入了地形纹理、光照、天空盒、景深效果、地形漫游等功能,较好地模拟了真实地形场景。经测试,本系统在不损失用户视觉效果的前提下,相对于不适用LOD 算法渲染地形,极大地提高了渲染效率。在虚拟现实、FPS游戏等系统的地形渲染中有广阔的应用前景。

关键词:LOD,立体角,四叉树

Abstract

Terrain rendering has a wide range of applications in FPS games, aircraft roaming, geographic information systems, and virtual reality systems. The terrain data has a large amount of data, and each frame usually needs to render hundreds of thousands or even tens of millions of triangles. Although with the development of science and technology, computer performance has been greatly improved, but it still can not render all the triangles at once. At this time, how to simplify the terrain and reduce unnecessary drawing actions (such as not drawing unneeded details) on the premise of ensuring visual effects become the key to achieving large-scale terrain rendering, and LOD (Level of Detail) technology is currently widely used solution to this problem.

Based on quadtree LOD technology, this article comprehensively considers factors such as the direction of view, the distance from the point of view to the terrain block, the area of the terrain block, and so on. Based on the concept of solid angle, a new terrain block segmentation evaluation method based on the viewpoint is proposed to construct LOD terrain. Compared with other methods of segmentation, this method requires only one threshold to control whether the terrain node is divided, eliminating the drawback that previous multiple parameters cannot accurately control a certain factor. In addition, this method can also allow the back-slope portion of the terrain to be displayed in thicker details, which can significantly improve efficiency compared to the previous segmentation method. Based on this, this paper uses OpenGL to implement a simple terrain rendering platform, adding features such as terrain texture, lighting, and terrain roaming, which can simulate real terrain scenes.

On this basis, this article uses OpenGL to implement a simple terrain rendering platform, adding features such as terrain texture, lighting, skybox, depth of field effects, terrain roaming, and so on, which better simulates the real terrain scene. After testing, the system renders the terrain relatively to the non-applicable LOD algorithm without losing the user's visual effects, which greatly improves the rendering efficiency. It has broad application prospects in terrain rendering of systems such as virtual reality and FPS games.

KEY WORDS: LOD, Solid Angle, Quadtree

目录

摘要 I

Abstract II

第一章 绪论 1

1.1 问题提出及研究意义 1

1.2 LOD技术简介 1

1.3 离散LOD和连续LOD 2

1.3.1 离散LOD 2

1.3.2 连续LOD 2

1.4 数字地形的表示 2

第二章 几种视点相关的地形LOD方法比较 3

2.1 视点相关的渐进格网算法 3

2.2 ROAM算法 3

2.3 基于四叉树的LOD算法 4

第三章 基于四叉树的视点相关的LOD地形算法 5

3.1 基本思想 5

3.2 地形数据的存储 5

3.3 地形细节层次的影响因素 6

3.3.1 地形块到视点的距离 6

3.3.2 视线方向与地形块法向量之间的夹角 7

3.3.3 地形块的面积 7

3.4 节点评价系统 7

3.4.1 现有节点评价系统 7

3.4.2 基于立体角的节点评价 9

3.5 裂缝消除 9

3.6 网格绘制 11

3.7 视锥体裁剪 12

3.7.1 视锥体方程求解 12

3.7.2 视锥体裁剪 13

3.8 最终地形网格生成 15

3.9 性能分析 16

3.9.1 内存消耗 16

3.9.2 简化效率 16

3.9.3 绘制速度 17

第四章 基于LOD的真实地形场景渲染 18

4.1 地表纹理 18

4.2 光照 18

4.3 天空 19

4.4 景深效果 20

第五章 总结与展望 21

参考文献 23

附录A 地形渲染顶点着色器代码 24

附录B 地形渲染片段着色器代码 25

绪论

问题提出及研究意义

地形是虚拟现实系统中的重要组成部分,为了实现用户和虚拟现实系统的实时交互,需要在计算机上实时显示不同角色在不同位置、不同环境的状态,这就需要实现在大规模场景中的实时漫游。但在大规模复杂场景中,地形数据通常拥有极大的数据量,完整的地形通常由几十万甚至几千万个三角形构成。虽然随着科技的发展,计算机性能已经得到了极大的提升,但在目前的硬件条件下,一次渲染构成地形的所有三角形仍是不现实的。并且,在虚拟场景中,除了地形,还有人物模型、光影等其他要素需要渲染,为了保证系统运行的流畅,必须让地形渲染部分以更快的速度绘制,并且占用尽可能少宝贵的计算机资源。所以如何在保证用户视觉效果的前提下,尽可能减少不必要的绘制动作,实现大规模地形的实时渲染,已经成为虚拟现实系统中亟待解决的问题,而LOD技术的提出正是为了解决此问题。

LOD技术简介

LOD(Level of Detail)技术,即细节层次技术,由Clark[1]于1976年提出。其基本原理是在不影响用户视觉效果的前提下,通过逐次简化物体的表面细节以减少物体的复杂程度,从而提高计算机绘制的效率。对于某一模型,我们认为在一个场景中这个模型有多个不同的分辨率,在实时显示时,可以根据实际情况的不同,选择不同分辨率的模型,例如距离视点近的物体,用分辨率较高的模型,而距离视点较远的模型,则用分辨率较低的粗糙模型,这样就较好地解决了有些物体距离用户很远,显示在屏幕上只有很小的一部分,但仍需要绘制全部细节,而造成大量资源占用的问题。图1-1为一只兔子不同分辨率的模型,图1-2则为距离视点距离不同时,使用不同分辨率的模型,距离视点近的模型使用较多的格网精细绘制,距离视点远的模型则用相对较少的格网较为粗糙地绘制,但在用户看来,距离用户距离不同的几只兔子在视觉上几乎没有什么区别。

剩余内容已隐藏,请支付后下载全文,论文总字数:24624字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;