[译]可见性判断之门系统

本文翻译一下《Mathematics for 3D games programming and computer graphics》第3版第8章“可见性判断”中的门系统(Portal Systems)这一节的一部分。

在清华大学出版社出版的詹海生译的中文版中,缺少了对此章节关键一段的翻译。可能是作者疏忽,可能是别的什么,不过下面这个中文版的图我就不能忍了。

看看两者有什么关键区别:

我就怀疑译者没弄懂这个门系统的原理,这不是误人子弟吗?虽然我也一知半解,但是我不会搞个山寨版图片放进去。哎以后还是看原版书好了。

好了下面开始翻译。

Portal Systems 门系统

A portal system is an extremely powerful technique that can be used to quickly eliminate massive regions of world geometry from the visible set. The general idea is surprisingly simple—the world is divided into many disjoint zones that are connected by portals . A portal is represented by a convex polygon through which one region can be seen from another. The advantage of a portal system is that any region of space that cannot be seen through a series of portals is never even considered for rendering. When determining what parts of a world are visible, using a portal system allows us to touch only a small fraction of the entire data set because any geometry that lies on the opposite side of an invisible portal is ignored.

门系统是一个极其强大的技术that可以用于快速地从可见集中排除大块的世界几何体。其基本思想意外地简单——将世界分隔为许多独立的区域(zone),它们通过门(portal)连接起来。一个portal由一个凸多边形表示,可以在一个zone里穿过它看到另一个zone的区域。门系统的优点是,不能通过门看到的区域,不会被渲染。当决定世界的哪一部分可见时,门系统保证了我们只需接触整个数据的一小部分,因为任何不可见的门后面的集合体都被忽略了。

Figure 8.13 illustrates how visibility determination is carried out for a portal system. We first locate the zone in which the camera resides—this zone is always considered visible. We then examine each of the portals leading out of the zone containing the camera. For each portal that intersects the view frustum, we consider the zone to which it connects visible. Each portal leading out of the connecting zone, excluding any leading back to the first zone, is then tested for visibility, but this time against a view frustum that has been reduced in size by the boundary of the portal through which we are looking. This technique is applied recursively until no new portals are visible.

(注:这是清华出版社翻译本里缺失的那一段。)

Figure 8.13展示了可见性判断在门系统中是如何实施的。我们首先找到摄像机所在的zone——这个zone总是被认为是可见的。然后,从这个包含摄像机的zone开始,我们检查每个可以从此处离开的门。对每个与视见体(View Frustum)相交的门,我们认为它连接到(注:开向,指向)的zone为可见的。然后,从这些zone开始,对于每个可以从这些zone离开的门(返回到第一个zone的除外),我们检查其可见性,但这次,所使用的视见体的大小已经被刚刚穿过的门减小了。这个过程递归下去,直到没有新的门可见。

The zones connected by portals may be further organized into tree structures, and the objects residing in these regions may still have bounding volumes. The visibility of large regions determined by the portal system is a large-scale culling process that should be supplemented by smaller-scale visibility determination in each zone.

被门连接的zone可以被进一步组织成树结构,这些区域中的对象可能仍旧保持着包围盒。门系统的大区域可见性判断是个大规模的剔除过程,在每个zone内部应当配合使用小规模的可见性判断算法。

Portal Clipping 门裁剪

Whenever the camera looks through a portal connecting to another zone, we know that the volume of visibility in that zone is smaller than the whole view frustum. Thus, we can reject a larger number of objects during smaller-scale visibility testing by using a smaller view frustum. The near and far planes remain the same, but the side planes of the new view frustum are replaced by a set of planes that represents the intersection of the original view frustum and the sides of any polygonal portals through which we are looking.

当摄像机穿过门看向下一个zone时,我们知道,那个zone的可见区域比视见体要小。因此,我们可以丢弃大量的对象during小规模可见性判断by使用更小的视见体。视见体的near和far平面保持不变,但侧面改变了,变成了原始视见体与门的凸多边形相交的面。

(注:后面的我就不翻译了。)

As a convention, the plane containing a portal must have a normal direction that points toward the camera, and the vertices of the portal must be wound counterclockwise, as shown in Figure 8.14. Consequently, portals are one-way in the sense that if a portal leads from zone X to zone Y , then the same portal does not lead backward from zone Y to zone X . When the camera lies on the negative side of a plane containing a portal, that portal is never considered visible. Two-way visibility between two zones requires that each zone have a portal leading to the other.

Whenever we consider a portal leading out of a zone, we are interested only in the visible area of that portal. The visible area of a portal is equal to the area that intersects the current view frustum, which may be the original view frustum or a reduced view frustum. To determine what area of a portal is visible, we clip its polygon against the planes bounding the current view frustum. Clipping a polygon against a plane removes the portion of the polygon lying on the negative side of the plane, resulting in a new polygon whose interior lies completely on the positive side of the plane. Clipping a polygon against every plane of the current view frustum effectively chops off any part lying outside the volume of space that is visible to the camera.

原文地址:https://www.cnblogs.com/bitzhuwei/p/visibility-determination-portal-system.html

时间: 2024-07-29 14:19:30

[译]可见性判断之门系统的相关文章

配置163Yum源自动判断你的系统是Centos版本(适用于5.x或6.x)

1 #!/bin/bash 2 #Author:nulige 3 #Date: 2015-3-8 4 #实现功能:自动判断你的系统是Centos版本,适用于5.x或6.x 5 6 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.$(date +%F)_backup 7 cd /etc/yum.repos.d/ 8 Ver=$(cat /etc/redhat-release |awk -F "."

判断当前服务器系统

/** * 判断当前服务器系统 * @return string */ function getOS(){ if(PATH_SEPARATOR==':'){ echo "Linux"; }else{ echo "Windows"; } } getOS(); 根据PATH_SEPARATOR判断,在Linux中,PATH_SEPARATOR为 ':',在Windows系统下,PATH_SEPARATOR为';'.

iPhone 屏幕适配判断 和 iOS系统版本判断

? 1 2 3 4 5 6 7 8 9 if([[[UIDevicecurrentDevice]systemVersion]floatValue]>=7.0) {     // iOS7.0及以上版本系统适配 } if([UIScreen mainScreen].bounds.size.height == 568) {     // iPhone 屏幕适配 } 可以写成宏定义放在pch文件中, ? 1 2 3 4 // 判断是否为iPhone5 #define iPhone5 ([UIScree

判断 当前设备 系统版本

/** *  判断 当前设备 系统版本 是否大于等于 8 */ if ([[[UIDevice currentDevice] systemVersion] floatValue]>=8) { }

Android----获得当前应用包名、当前activity的名字、判断是否是系统桌面、service类

1.获得当前应用包名 public static String getRunningActivityName(Context context) { ActivityManager activityManager=(ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); //完整类名 String runningActivity=activityManager.getRunningTasks(1).get(0).to

inno setup判断是Windows系统版本(其实还是Delphi代码,还能检查域控制器和家庭版)

1.设置Windows最低版本要求 [Setup]: MinVersion 格式: a.bb,c.dd,这里 a.bb 是 Windows 版本,c.dd 是 Windows NT 版本. 默认值: 4.0,4.0 描述:这个指令让你指定你的软件运行必须的 Windows 或 Windows NT 版本最小版本,要防止你的程序在 Windows 或 Windows NT 下运行,请在最小版本中的一个指定“0”.构建号和/或安全服务包级别可以包含在版本号中.如果用户系统不适合最小版本需求,安装程序

JS判断android ios系统

最近公司上线移动端,需要根据不同的系统跳转到不同的产品页面,百度后发现这一段代码很好用,不但可以判断当前是什么系统,还能知道当前浏览器是什么内核,移动端PC端都已测试无问题! var browser = {            versions: function() {                var u = navigator.userAgent,app = navigator.appVersion;                return { //移动终端浏览器版本信息    

一个幻读模型引出的记录可见性判断

Ⅰ.看一个幻读的模型 表a中有4条记录1,3,5,7,开两个session session1:begin; delete <= 7 ; session2:begin; insert a values(2); commit; session1:commit; 这个模型在rc的情况下,这是没问题的,只是加记录锁,不会锁范围,插入2是可以的.最后a上就剩2这个记录 那binlog里面记录的内容就有讲究了,假设是statment格式的binlog insert 2; delete <= 7; 这时候数

如何判断当前LINUX系统启用了ASLR

内核参数randomize_va_space用于控制系统级ASLR 0 关闭ASLR 1 mmap base.stack.vdso page将随机化.这意味着.so文件将被加载到随机地址.链接时指定了-pie选项的可执行程序,其代码段加载地址将被随机化.配置内核时如果指定了CONFIG_COMPAT_BRK,randomize_va_space缺省为1.此时heap没有随机化. 2 在1的基础上增加了heap随机化.配置内核时如果禁用CONFIG_COMPAT_BRK,randomize_va_