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

牽著老婆滿街逛

嚴以律己,寬以待人. 三思而后行.
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>
            亚洲免费影院| 欧美主播一区二区三区美女 久久精品人 | 一本色道久久综合一区 | 欧美电影免费| 免费亚洲电影在线观看| 另类av导航| 久久一二三四| 亚洲乱码久久| 日韩视频免费观看| 亚洲区欧美区| av成人免费在线| 亚洲视频999| 日韩视频在线观看免费| 亚洲欧洲日本国产| 悠悠资源网久久精品| 最新精品在线| 欧美一区日本一区韩国一区| 美女黄网久久| 亚洲中无吗在线| 老司机午夜精品视频| 国产精品jizz在线观看美国| 在线观看亚洲视频啊啊啊啊| 国产精品99久久久久久久久久久久 | 久久综合久久久| 亚洲日本中文字幕区| 亚洲一区二区三区视频| 欧美成年人视频网站| 国产精品一区二区男女羞羞无遮挡| ●精品国产综合乱码久久久久| 亚洲女人天堂成人av在线| 欧美va天堂在线| 欧美一区二区三区免费视频| 亚洲第一在线| 亚洲欧美中文字幕| 麻豆精品传媒视频| 亚洲精品资源| 老司机一区二区三区| 国产精品一二三四区| 99re6这里只有精品| 久久亚洲二区| 性色一区二区三区| 国产精品毛片大码女人| 日韩视频永久免费| 噜噜噜91成人网| 欧美一区二区三区四区视频| 国产精品av免费在线观看| 亚洲精品久久视频| 欧美成人综合一区| 久久久激情视频| 激情一区二区三区| 久久久免费观看视频| 欧美一级成年大片在线观看| 国产精品亚发布| 亚洲与欧洲av电影| 日韩午夜视频在线观看| 欧美国产极速在线| 亚洲麻豆国产自偷在线| 亚洲国产专区校园欧美| 欧美成人黑人xx视频免费观看| 一区视频在线播放| 免费不卡欧美自拍视频| 久久综合色影院| 亚洲国产日韩在线| 亚洲精选中文字幕| 国产精品www.| 久久精品国产精品| 久久久人人人| 亚洲美女诱惑| 亚洲一区二区3| 国产一区二区中文| 免费成人av在线| 欧美精品1区2区| 亚洲欧美国产精品桃花 | 欧美一区视频| 一区视频在线看| 亚洲第一精品福利| 欧美日韩国产综合网| 亚洲男人的天堂在线aⅴ视频| 亚洲一区二区日本| 韩国三级电影久久久久久| 欧美黄色影院| 国产精品海角社区在线观看| 久久久久国产精品午夜一区| 久久视频免费观看| 一本综合精品| 欧美一区日本一区韩国一区| 91久久国产综合久久| 一区二区三区免费看| 一区二区视频欧美| 亚洲精品国产视频| 国产一区二区三区久久久| 欧美成人一品| 亚洲伊人久久综合| 欧美在线啊v一区| 99天天综合性| 久久美女性网| 亚洲欧美日韩一区二区三区在线观看| 久久久999成人| 亚洲欧美日韩在线高清直播| 久久尤物电影视频在线观看| 亚洲一区二区三区中文字幕| 久久久久国内| 午夜精品一区二区三区在线播放 | 国产日韩在线一区| 亚洲国产日韩欧美在线图片 | 一区二区三区四区精品| 欧美一区二区三区免费观看 | 亚洲视频在线观看三级| 久久国产精品亚洲va麻豆| 亚洲专区在线视频| 欧美精品一区二区三| 免费亚洲一区二区| 国产主播一区二区三区四区| 亚洲一二三区视频在线观看| 99精品视频一区| 欧美91精品| 欧美v日韩v国产v| 一区在线免费| 香蕉久久夜色精品国产| 亚洲欧美在线一区二区| 欧美日韩免费观看一区三区| 91久久黄色| 亚洲伦伦在线| 欧美大片免费观看| 亚洲国产成人在线| 亚洲国产精品久久久久秋霞蜜臀| 欧美与黑人午夜性猛交久久久| 性欧美超级视频| 国产精品欧美风情| 亚洲男人第一av网站| 欧美一二三视频| 国产日韩欧美在线看| 小黄鸭精品密入口导航| 久久久久.com| 在线看无码的免费网站| 久久亚洲综合网| 亚洲第一成人在线| 夜夜嗨av一区二区三区网站四季av | 亚洲国产精品成人一区二区 | 国产精品自拍网站| 午夜精品视频一区| 久久一区精品| 亚洲第一毛片| 亚洲精选久久| 亚洲嫩草精品久久| 国产日韩欧美高清免费| 久久精品72免费观看| 久久久久久**毛片大全| 在线日韩av片| 欧美日韩福利视频| 亚洲性av在线| 久久久久久久久久码影片| 亚洲第一成人在线| 欧美日韩一区二区欧美激情 | 亚洲激情校园春色| 欧美日本一区二区高清播放视频| 99精品欧美一区二区三区 | 亚洲精品影院| 国产精品福利网站| 久久精品天堂| 亚洲精品欧美专区| 久久国产精品99久久久久久老狼| 一区二区三区在线免费播放| 欧美激情一区二区三区在线| 亚洲一区免费在线观看| 欧美freesex交免费视频| 亚洲调教视频在线观看| 国内精品久久久久久影视8| 欧美精品国产| 久久精品国产成人| 亚洲麻豆国产自偷在线| 久热精品视频在线免费观看| 亚洲深夜福利在线| 在线播放中文一区| 欧美先锋影音| 欧美激情无毛| 久久精品天堂| 亚洲一级一区| 亚洲精品一区二区三区福利| 久热re这里精品视频在线6| 亚洲永久字幕| 亚洲精品人人| 亚洲第一免费播放区| 国产欧美精品日韩| 欧美三级欧美一级| 美女主播精品视频一二三四| 小黄鸭精品密入口导航| 亚洲精品一区二区三区99| 欧美99在线视频观看| 久久精品水蜜桃av综合天堂| 亚洲午夜成aⅴ人片| 亚洲精品一区二区三区在线观看| 国内精品久久久| 国产女精品视频网站免费| 欧美日韩在线影院| 欧美剧在线观看| 欧美电影在线播放| 免费欧美在线视频| 蜜臀av在线播放一区二区三区| 久久精品日韩|