r_speeds
News Tutorials Coding Reviews Resources

A Guide to better Framerates

Levels with a bad framerates are the biggest problem for mappers.A level with a poor framerate often makes such a level unplayable.This problem is a result of 2 things

  • the wpoly count
  • the epoly count
For now I will only look at wpoly count reduction tecniques.

Height

You can use height to you advantage by connecting areas of a level with a hub which is lower or higher than the other rooms.This is a very important technique used in some areas of single player HL.

Doughnut Hallways

Use doughnut hallways to connect areas...basically a big brush( a VIS blocker) stopping you from seeing from one room to another.Bellow are 2 rooms connected by a doughnut hallway.The blue lines represent portals and the red line is the VIS blocker.Make sure the VIS blocker extends from the floor to the ceiling(no gaps). Also you don't have to use just a big block, come up with something appropriate.


func_wall

Do not overuse the func_wall to stop brushes splitting other polygons.Remember that entities do not block visibility so restrict its use(the func_wall) to small brushes that do not interfere with visibility.For more info on this subject read this tutorial.

Scaling

Scale textures to dramatically improve the framerate.Say for large walls scale x and y by 2 if it dosen't affect the quality of the texture too much.Below is a simple example of this, one room has the default scaling factor (1:1) and the other is scaled by 2 in both the x and y coordinates.

Scale 1:1 Scale 2:1
42 faces 16 faces
342 patches 226 patches
42 wpoly 16 wpoly

Brush Separation

Another important technique is to move brushes one unit away from the wall.This prevents these brushes from splitting the wall up into more wpolys.Use this for things like light fixtures especially.

Instead of this,

seperate by one unit to prevent brush splits.

Brush Subtraction

Brush subtraction(hollowing, carving..etc) is in general a bad idea.Take the situation below as an example.You have a wall and 3 parts(these could be doors, widows, vents..etc).

The image on the left has been split up using carving while the image on the right has been placed piece by piece.In this simple example there is a saving of 2 brushes, in general the more complex the situation (things like cyclindrical brushes), the more savings you get by placing all the brushes yourself.

Damage Limitation

If you really need to use carving make sure you limit the damaged area.For example, you want to carve a symbol into a wall as below.

Before,

Carve the symbol into the wall and you get,

Instead split the wall up where you now have a separate brush where you need to carve the symbol.

At least now the damaged area is limited.

.............to be completed.......

Any questions/comments about this tutorial? contact me