找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1430|回复: 1

【高级教程】How to reduce r_speeds with rafters

[复制链接]

该用户从未签到

发表于 2007-11-18 13:48:16 | 显示全部楼层 |阅读模式
教程中的一些概念我今天才接触到,所以要花些时间去吸收理解~
理解后我会翻译成中文!

-------------------------------------------------------------------------------
How to reduce r_speeds with rafters
by Egir Helgrimson
     This article is about how to reduce r_speeds. By saying r_speeds Irefear to wpoly, which is a count of all rendered polygons. To showr_speeds I simply tipe in the following console command inCounter-Strike (or any other halflife mod)
     r_speeds 1
     The number before wpoly is the world polygon count, which has a great impact on a maps performance.
     Furthermore we can see the polygons outlined by using the following command
     gl_wireframe 2
     In the screenshot below you see lines around all rendered polygons.
     On this screenshot the wpoly is 418 (everything below 600 isexeptable). So normally you wouldn't bother to reduce r_speeds here.I'll show a layout of the 2 rooms beneath:
     The red arrow shows the view directon of the player. Obviously theplayer shouldn't render every wall in the upper room though we can seeon the first screenshot that he does. I've marked the rendered wallswith red. Somehow there must be a line of sight from within theleafnode, inwhich we stand that can see the walls marked with red.(leafnodes are explained in the bsp article).I've filled the doorways between the two rooms with hint-brushes. Noleafnode can reach its way through the doorway. The drawing below showshow there would be a line of sight that can se just a minimum of theright wall from our current leafnode:
     The right wall is made of two planes build of multiple world polygons (see the bsp articleto find out why a plane is not just a single polygon). Now my plan isto reduce the size of the planes that intersects with the "line ofbloody sight". I do that with letting some rafters (or pillars if youprefeare) touch the wall planes, to split the planes into smallerplanes. On the scetch below I have drawn how the wall planes is to besplit vertically with green lines.
     The pillars I add looks like this (they were represented with green lines on the scetch above)
     And now we are ready to see the result:
     Note that there is only little of the next room that is rendered,compared to the first screenshot. We reduced r_speeds from 418 wpolysto 277. thats 33.7%. So adding pillars/rafters is a good way ofreducing r_speeds. And there is more bonus by adding them, since theyprovide the player with some cover and makes a plale wall look muchbetter.
     Youmay note that pillars/rafters has been used in de_dust aswell asde_aztec. This should prove that pillars are not unusable regardinggameplay.

[ 本帖最后由 Simen.sllove 于 2007-11-20 09:27 编辑 ]

该用户从未签到

发表于 2007-11-18 14:01:56 | 显示全部楼层
爱学习,爱生活,爱塞猛
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表