青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

牽著老婆滿街逛

嚴以律己,寬以待人. 三思而后行.
GMail/GTalk: yanglinbo#google.com;
MSN/Email: tx7do#yahoo.com.cn;
QQ: 3 0 3 3 9 6 9 2 0 .

Half-Life's In-Game Visibility Determination

from:http://collective.valve-erc.com/index.php?doc=1038660504-05211700

Where would we be without visibility determination? I'm not sure. Actually, yes, I am sure; we'd be stuck at 5 fps on an empty server. And we certainly wouldn't want that.

"So, what is this visibility determination thing, anyway?" you say. Well, it's the process that every single 3D game under the sun (and over it) goes through. It's the process that determines what is visible, and what is not, and therefore whether to spend time sending all the polygonal data to the renderer. There's no point sending a 1,000 triangle object to the renderer if the object is off the screen, and won't be visible anyway, so why waste the time doing it?

This article will talk you through the processes Half-Life goes through every frame to determine what is visible, and what is not. Note that it will not tell you how the VIS process works; there have been hundreds of white papers published on efficient methods of BSP tree leaf visibility determination, and it would take ages to describe how Half-Life does it! I will, however, give a basic overview of what VIS actually does, for the purposes of understanding just what the heck I'm on about later on in this article.

When compiling a map, it is first split up into a Binary Space Partition tree, or BSP tree for short. This is basically a method of splitting the world up into manageable chunks which can then be dealt with individually, and are vital in speeding up collision detection, lighting calculations and doing visibility determination. Essentially, the map is first of all split into two parts (figure 1, stage 1) by placing a 3D plane to split the world in half. One side is called the positive side, or the front side, the other the negative side, or the back side. Then, the process happens again, except this time it is done on each of the two new segments treating each segment like a different map, rather than doing it across the entire map (figure 1, stage 2). This keeps happening until the world is split up enough (determined by the compiler) and you end up with your BSP tree. If you keep a track of what was split up from what, you can create a tree of what encloses what, and so do some major speed-ups (figure 2).

Figure 1

Figure 2

Game programmers will probably lynch me for this woefully inadequate description of a BSP tree, but it will suffice for this article. (If you want to learn more about BSP trees, you can try the BSP tree FAQ.)

So what does this have to do with visibility determination? Well, when the world has been split into a BSP tree, it's in collections of polygons. Each collection of polygon is called a "BSP leaf", and it's with these that VIS does its work. For each leaf, it generates a list of every other leaf in the world, which simply contains whether that leaf could be seen if you were within the current leaf - this list is called the Potentially Visible Set, or PVS. As you can appreciate, this is a complex process, which is why VIS takes a long time in compilation with complicated maps.

So, after VIS, we've already got some very important visibility determination done, and we're not even into the per-frame loop yet. However, after this, we progress into the heart of the game, and see exactly what it does each frame.

Every frame, the game loops through the BSP leaves to find out which leaf the player is currently standing in. Once it's found it, it uses the PVS to find out what leaves might be seen from where the player currently is, and tosses out the leaves that can't be seen under any circumstance. This is a very crude, but very effective, form of visibility determination. Now that the game is only dealing with the leaves that could be seen from the current viewpoint, it moves onto the second type of visibility determination - frustum culling.

The view frustum is basically the volume in which the player can see. Anything outside of this volume cannot be seen by the player. In 3D, it looks like a pyramid with the top chopped off (with the new surface being the screen, and the base of the pyramid the far clipping plane). However, we don't have 3D monitors, so I'll take the 2D analogy - an isoceles triangle with the top corner chopped off. What the game does is to find out whether, out of the potentially visible leaves, any of them are outside of the view frustum; if they are, they get tossed out too. Figure 3 has an example of this in 2D.

Figure 3 - The black blob is the player. Objects 1 and 4 are within the view frustum and therefore visible, but objects 2 and 3 cannot be seen by the player.

After this simple but effective visibility determination method, there isn't very much left that isn't totally invisible to the player from his/her current position and orientation. However, one more, much finer, process is applied to the triangles making up each visible leaf - backface culling.

In 3D, every triangle has a 'normal' vector - this represents the direction that the triangle is facing. All that backface culling does is simply remove every triangle that is facing away from the viewer, as they probably wouldn't (and shouldn't) be visible anyway. This can sometimes chop the amount of triangles to draw by as much as 50%, which is a dramatic decrease.

After these 3 methods are applied - usage of the PVS, frustum culling, and backface culling - the remaining triangles can be rendered by the graphics API (OpenGL, Direct3D or software) with a minimal amount of polygons being drawn that are not visible. You can see what an effect not being able to do the first stage has when you have a large map with a leak - VIS cannot calculate its PVS, and so it is assumed that ALL leaves are visible before the 2nd and 3rd stages are applied.

This concludes our whizz tour of how Half-Life does visibility determination in-game. Hopefully this may give you some ideas as to how to improve your maps' frame-rate performance, or encourage you to read further about the above methods - GameDev.net has some great tutorials should you want to read more. If you have any questions, then feel free to contact me about them.

posted on 2007-11-12 16:18 楊粼波 閱讀(193) 評論(0)  編輯 收藏 引用

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            欧美日韩综合在线免费观看| 美国成人直播| 国产精品手机在线| 男女视频一区二区| 久久久国产精品一区| 亚洲欧美久久| 亚洲视频网站在线观看| 亚洲欧洲日本在线| 欧美激情第8页| 欧美大尺度在线| 欧美国产精品| 亚洲高清电影| 亚洲精品一区二区三区在线观看| 在线视频国产日韩| 国产在线高清精品| 欧美日韩在线播| 欧美日韩一区二区在线视频| 欧美韩日一区| 欧美一区激情| 久久久久久久一区| 美女黄毛**国产精品啪啪| 麻豆精品网站| 欧美国产一区二区| 欧美日韩一区二区国产| 国产精品毛片va一区二区三区| 国产精品一二| 影音先锋日韩精品| 99在线|亚洲一区二区| 亚洲一区二区三区在线播放| 亚洲欧美激情精品一区二区| 久久精品国产2020观看福利| 久久乐国产精品| 亚洲国产精品免费| 亚洲一区精彩视频| 卡通动漫国产精品| 欧美丝袜一区二区| 国产女人水真多18毛片18精品视频| 国产精品免费小视频| 狠狠色噜噜狠狠色综合久| 影音先锋成人资源站| 亚洲乱码一区二区| 欧美一区永久视频免费观看| 你懂的网址国产 欧美| 99精品国产福利在线观看免费| 亚洲视屏在线播放| 模特精品在线| 国产午夜精品全部视频在线播放 | 在线观看视频一区二区| 99精品欧美一区二区三区| 一本色道久久综合狠狠躁篇的优点 | 在线观看精品| 亚洲永久免费av| 久久久久久69| 一区二区日韩| 欧美成人一区二区在线| 国产精品日韩二区| 一本色道久久精品| 欧美电影打屁股sp| 香蕉免费一区二区三区在线观看| 欧美精品久久久久久久免费观看| 国产一级揄自揄精品视频| 最新亚洲一区| 国产精品99久久久久久久久久久久| 99re热精品| 久久久精品午夜少妇| 欧美在线日韩在线| 日韩天天综合| 欧美精品少妇一区二区三区| 国产精品毛片a∨一区二区三区| 亚洲日本激情| 欧美二区在线看| 久久男人av资源网站| 国产日韩欧美一区二区| 亚洲一区成人| 99热精品在线观看| 欧美日韩一区二区三区在线视频| 亚洲人体大胆视频| 亚洲国产一区二区视频| 免费观看成人鲁鲁鲁鲁鲁视频| 国产精品亚洲综合久久| 国产日韩一区二区三区在线| 亚洲永久精品国产| 一区二区高清在线| 欧美视频在线一区二区三区| 一本一本久久| 99视频+国产日韩欧美| 欧美日本乱大交xxxxx| 亚洲免费精彩视频| 亚洲精选久久| 欧美日韩中文字幕在线视频| 国产精品99久久久久久白浆小说| 亚洲精选视频免费看| 欧美专区日韩专区| 国产精品99免视看9| 亚洲女人小视频在线观看| 一区二区高清在线观看| 国产精品自拍在线| 鲁鲁狠狠狠7777一区二区| 蜜桃av综合| 夜夜嗨av一区二区三区网页| 亚洲美女中文字幕| 国产精品国产三级国产普通话蜜臀 | 欧美区高清在线| 午夜在线精品| 久久久亚洲国产天美传媒修理工 | 亚洲欧美一区二区精品久久久| 国产欧美日韩一区二区三区在线| 亚洲二区在线视频| 亚洲精品视频二区| 国产欧美日韩一区二区三区在线| 久久五月天婷婷| 久久久精品日韩欧美| 久久激情综合网| 国产女人18毛片水18精品| 久久精精品视频| 香蕉久久一区二区不卡无毒影院| 一区二区欧美在线| 国产欧美日韩视频一区二区| 免费在线亚洲| 国产精品久久久久久久久久久久久| 久久久久久亚洲精品杨幂换脸 | 一区二区av| 欧美一区视频| 99国产精品国产精品毛片| 亚洲欧美日韩爽爽影院| 亚洲人成毛片在线播放女女| 亚洲欧美日韩中文视频| 亚洲乱码国产乱码精品精天堂| 亚洲一区二区三区免费在线观看| 亚洲高清一区二| 亚洲欧美日韩在线观看a三区 | 香蕉成人伊视频在线观看| 亚洲美女精品成人在线视频| 性做久久久久久免费观看欧美| 亚洲精品久久久久中文字幕欢迎你 | 在线免费一区三区| 亚洲一卡二卡三卡四卡五卡| 亚洲国产高清在线| 99国产精品久久久| 亚洲第一主播视频| 亚洲欧美在线网| 久久久久久尹人网香蕉| 激情偷拍久久| 欧美肥婆在线| 一本色道久久综合狠狠躁篇怎么玩| 夜色激情一区二区| 国产精品欧美日韩一区二区| 亚洲欧美日韩精品久久| 久久亚洲精品网站| 亚洲日韩欧美一区二区在线| 欧美乱妇高清无乱码| 亚洲免费观看高清在线观看| 欧美另类极品videosbest最新版本| 欧美黄网免费在线观看| 亚洲人屁股眼子交8| 欧美日韩国产精品专区| 亚洲一区二区在线视频| 久久理论片午夜琪琪电影网| 亚洲啪啪91| 国产精品久久久久久久7电影| 亚洲欧美成人| 欧美激情区在线播放| 亚洲午夜在线视频| 国产在线播放一区二区三区| 欧美成人精品激情在线观看| 亚洲视频www| 欧美va天堂| 亚洲午夜激情| 永久域名在线精品| 国产精品久久久999| 久久噜噜亚洲综合| 在线视频日韩| 欧美日韩国产成人高清视频| 久久亚洲美女| 亚洲社区在线观看| 狠狠入ady亚洲精品| 欧美日产国产成人免费图片| 亚洲欧美三级在线| 亚洲精品小视频在线观看| 久久精品国产一区二区电影| 亚洲美女网站| 伊人久久婷婷色综合98网| 欧美日韩精品欧美日韩精品一 | 亚洲第一页中文字幕| 午夜欧美大尺度福利影院在线看| 亚洲激情电影中文字幕| 国产伦精品一区二区三区| 欧美激情影院| 巨乳诱惑日韩免费av| 欧美一区二区视频在线观看| 99精品99久久久久久宅男| 亚洲福利国产| 美女91精品| 久久亚洲国产精品日日av夜夜| 亚洲欧美另类在线观看| 日韩一级精品视频在线观看| 亚洲国产经典视频| 伊人久久久大香线蕉综合直播 | 欧美精品成人| 裸体歌舞表演一区二区|