虚拟地球3D引擎设计 读书笔记 第一章 介绍

      虚拟地球以能够渲染大规模真实世界地形、图像、矢量数据集而闻名。向虚拟地球提供数据的服务器,如Google Earth和NASA World Wind存储的数据以TB计算。事实上,在2006年,大约70TB的压缩图像被存储在BigTable中供Google Earth和Google Maps使用[24]。毫无疑问,今天这个数字会更高。

显然,为虚拟地球实现一个3D引擎需要小心地管理这些数据集。在内存中存储全世界,然后进行暴力渲染无疑是不可能的事情。但是,虚拟地球除了海量的数据管理还面临着额外的渲染挑战。这一章将介绍这些独特的挑战并为继续前行铺垫。

1.1 虚拟地球中的渲染挑战

在一个虚拟地球中,这一瞬间,观察者可能还在远处观察地球(见图1.1(a));下一瞬间,观察者可能就放大到了一个山谷(见图1.1(b))或一个城市中的街道级别(见图1.1(c))。从始至终,用于给定视图的真实世界数据被分页并精确渲染。

GEGlobeGETerrain

                              (a)                                                       (b)

GECity

                            (c)

图1.1 虚拟地球允许在不同尺度上查看:从(a)整个地球到(b)和(c)这样的街道级别。(a) © 2010 Tele Atlas;(b) © 2010 Europa Technologies, US Dept of State Geographer; (c) © 2010 Google, US Census Bureau, Image USDA Farm Service Agency。(使用Google Earth采集的图像。)

探索的自由度和可视化令人难以置信的数据量给虚拟地球带来了无与伦比的吸引力。这些因素也带来了大量有趣而独特的渲染挑战:

  • 精度:鉴于地球的庞大尺寸和用户从整体或放大到街道级别查看地球的能力,虚拟地球需要一个非常大的视野距离和非常大的世界坐标。尝试使用非常近的近裁剪面和非常远的远裁剪面渲染一个庞大的场景是非常天真的;而且非常大的单精度的浮点坐标系会导致Z- flighting画面出错和抖动,如图1.2和图1.3所示。在观察者移动时,这两种画面出错都会更明显。我们在第二部分中提供了消除这些画面出错的对策。

imageimage

                           (a)                                                         (b)

图1.2 (a)在庞大的世界中由精度错误带来的抖动画面出错。32位数字的精度不足带来错误的顶点位置。(b)无抖动。(图像来自Brano Kemen, Outerra。)

imageimage

                      (a)                                                            (b)

图1.3. (a) 在庞大的世界中由精度错误带来的Z- flighting和抖动画面错误。在Z- flighting中,来自不同物体的碎片被映射到相同的深度值上,导致出现撕裂画面错误。(b)没有Z- flighting和抖动。(图像来自Aleksandar Dimitrijević, University of Niš。)

  • 准确:除了消除由精度错误导致的渲染画面出错,虚拟地球也应该准确的模拟地球。将地球呈现为一个完美的球体可以简化许多工作,但是地球实际上赤道比两极长21千米。没有考虑到这一点的话,当定位航空和航天资源的时候就会带来错误。第二章将介绍相关的数学知识。
  • 曲率:地球的曲率,无论是使用球体还是更准确的代表模拟,相对于许多将虚拟世界从一个平面挤压出来的图形应用程序,提出了额外的挑战(见图1.4):在平面世界中的直线在地球上是曲线,多重采样可能出现在接近-90o和90o纬度处,在极点处出现奇点,通常需要特殊处理国际日期变更线,这些问题都可以在本书中找到,包括我们在第四章中讨论的地球渲染,第八章讨论的多边形,第十三章中讨论的映射几何clipmapping到一个地球上。

CurvesLineCurvesSampledPoints

                            (a)                                                      (b)

SubdivisionFlatSubdivisionCurve

                           (c)                                                         (d)

ClipmapNestedLevelsClipmapLevelsNearPole

                             (e)                                                        (f)

图1.4. (a) 在地球表面下连接表面上点的切割线;相反,(b)点应该通过一条曲线被连接。而且,(c) 由三脚面组成的多边形在地球表面下切割,除非(d)将曲率考虑进去。映射平坦世界的算法,(e)如几何clipmapping地形到地球上,导致(f)在极点处出现多重采样。(a)和(c)是没有深度检测的。(b)和(d)使用了第七章中提供的深度检测技术避免了在地球上出现Z-flighting画面错误。

  • Massive datasets. Real-world data have significant storage requirements. Typical datasets will not fit into GPU memory, system memory, or a local hard disk. Instead, virtual globes rely on server-side data that are paged in based on view parameters using a technique called out-of-core rendering, which is discussed in the context of terrain in Chapter 12 and throughout Part IV.
  • Multithreading. In many applications, multithreading is considered to be only a performance enhancement. In virtual globes, it is an essential part of the 3D engine. As the viewer moves, virtual globes are constantly paging in data and processing it for rendering. Doing so in the rendering thread causes severe stalls, making the application unusable. Instead, virtual globe resources are loaded and processed in one or more separate threads, as discussed in Chapter 10.
  • Few simplifying assumptions. Given their unrestrictive nature, virtual globes cannot take advantage of many of the simplifying assumptions that other graphics applications can.
    A viewer may zoom from a global view to a local view or vice versa in an instant. This challenges techniques that rely on controlling the viewer's speed or viewable area. For example, flight simulators know the plane's top speed and first-person shooters know the player's maximum running speed. This knowledge can be used to prefetch data from secondary storage. With the freedom of virtual globes, these techniques become more difficult.
    Using real-world data also makes procedural techniques less applicable. The realism in virtual globes comes from higher-resolution data, which generally cannot be synthesized at runtime. For example, procedurally generating terrains or clouds can still be done, but virtual globe users are most often interested in real terrains and clouds.

This book address these rendering challenges and more.

转载于:https://www.cnblogs.com/dawnengine/p/6643910.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值