|
How to reduce r_speeds with rafters by Egir Helgrimson
This article is about how to reduce r_speeds. By saying r_speeds I refear to wpoly, which is a count of all rendered polygons. To show r_speeds I simply tipe in the following console command in Counter-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 is exeptable). 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 the player shouldn't render every wall in the upper room though we can see on the first screenshot that he does. I've marked the rendered walls with red. Somehow there must be a line of sight from within the leafnode, 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. No leafnode can reach its way through the doorway. The drawing below shows how there would be a line of sight that can se just a minimum of the right wall from our current leafnode:

The right wall is made of two planes build of multiple world polygons (see the bsp article to find out why a plane is not just a single polygon). Now my plan is to reduce the size of the planes that intersects with the "line of bloody sight". I do that with letting some rafters (or pillars if you prefeare) touch the wall planes, to split the planes into smaller planes. On the scetch below I have drawn how the wall planes is to be split 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 wpolys to 277. thats 33.7%. So adding pillars/rafters is a good way of reducing r_speeds. And there is more bonus by adding them, since they provide the player with some cover and makes a plale wall look much better. You may note that pillars/rafters has been used in de_dust aswell as de_aztec. This should prove that pillars are not unusable regarding gameplay.
Back Last updated the 2nd of september2003 - Copyright www.egir.dk |