- 听众
- 收听
- 积分
- 1779
- 主题
- 回帖
- 0
- 精华
注册时间2007-3-9
最后登录1970-1-1
该用户从未签到
|
r_speed 是cs中的一个命令~~
它是地图制作者检查地图的面,结构和fps的重要命令~
使用方法为在控制台输入
r_speed 1
-------------------------------------------------------------
Most mappers know that the more they see from a certain angle ingamethe more lag will appear. But plane is sometimes devided into smallerchunks which also causes lag. In this tutorial I will shortly explain what will cause bsp to devide your planes.
Leafnodes
A leafnode is an area in a map with a coresponding table of whichpolygons will ever be visible. The position of a leafnode is decided bybsp and the table is calculated by vis.
Blue lines are the faces of a leafnode. The red lines indicates theline of sight. faces marked with orange will never be rendered fromwithin the leafnode shown - hence they don't figure in the leafnodestable of faces.
Thick worldbrushes and brushes textured with HINT decides where theface of leafnodes are. But that is not enough. As an extra security thebsp program also creates leafnodes at 1024x1024x4096 starting at(0,0,0) in the map.
You can ajust the max nodesize with the-maxnodesize # paramter to your bsp executable. Where # normaly is1024. If you make it smaller r_speeds will raize but compiletime willgo faster.
No plane can reach from one leafnode to another, so any brush will be sliced as it goes through a face in the leafnode.
If the plane needed 1 polygon to be drawn before, it now needs two.This doubles the r_speeds caused by the specific plane and thereby addslag.
Subdevide
All planes will be subdevided with 240 units when you compile. This isshow on the screenshot below, where I used a 128x128 texture. Click toenlarge. You can make a simular view in half-life with the"gl_wireframe 2" command in console.
Subdevide has two effects.
Effect number one - r_speeds will raiseeach time a plane is subdevided. Exactly the same way as it does whenreaching through a leafface (border of a leafnode).
Effect number two - When a plane issubdevided Half-life don't have to render all of it but only the partof the plane which is in the direction of view and listed in theleafnode table corosponding to our present position ingame.
We can make less polygons on a plane by streching the texture, sincethe 240 subdevide flollows the texture scale. That is why mappers haveadviced you to strech out textures in open areas.
Subdevide do comply to func_walls aswell, even those with render mode set to texture.
You can change the subdevide size by usingthe -subdevide # parameter to your bsp executable, where # is thenumber of units each subdevide should be. The maximum is 240. Sincethis is the default there is no reason to change it.
If you make a level with lots of walls, you might find it natural tomake them 256 units heigh. But it would be even better if you madethose walls 16 units lower (if you didn't scale the texture). Becausethen you will reduce r_speeds caused by the wall with up to 50%. Thatis r_speeds reduction for ya.
Back
[ 本帖最后由 Simen.sllove 于 2007-11-20 09:22 编辑 ] |
评分
-
查看全部评分
|