Reducing R Speeds With Hint-Skip Brushes

Reducing R Speeds With Hint-Skip Brushes

Submitted by: JPolitoJPolito on 24 Apr 2009 22:10
Last updated by: cold_blood3dcold_blood3d on 29 Jul 2009 23:42


This tutorial will explain how to reduce r_speeds in maps using the hint and skip textures found in zhlt.wad (which comes with ZHLT compile tools).

How the engine renders brushwork in-game

Here is a corridor shaped like an L. The green box is the player and the red things are whatever – brushes, models, sprites, anything. When compiled, box shaped things are created in the map which decide what gets rendered depending on where the player is standing. The compiler does the job simply, and is not really capable of optimizing these box things really well.


Here is what the compiler would normally do. The way that rendering works is that the contents of any box that can be seen from any point inside the green box (the player’s viewpoint) is rendered. In the picture, the yellow-marked box can “see” the blue-marked blue; therefore anything inside the blue box will be rendered.


Using hint/skip brushes to prevent the rendering of non-visible brushwork

Now let’s use a brush the give the compiler a ‘hint’ where it should clip the yellow and blue areas. Just create any brush with one hint-textured face and the rest skip-textured. The only important face is the hint face. The rest of the brush will be ignored by the compiler, regardless of its shape. Think of the hint-textured face like the clip tool, except that it’s a surface. Now let’s clip the boxes like in the picture.


Now the yellow box can’t see the blue box. The grey area will be rendered for the player, but not the red dots or anything in the blue area, whatever they might be. This kind of triangle method is NEVER done automatically by the compiler, so it is HIGHLY recommended to use hint/skip brushes especially around L-shaped corridors, and even more so with zigzagging corridors.


Yellow indicates what is rendered; green represents the player:


Hint blocks increase compile time

Hint brushes are not free. They must be processed like any other brush by the compilers. Adding excessive hint blocks (especially where they are not required) can grossly increase the time HLVIS takes in full mode, and will some rare cases never complete in normal mode.

If you really require a vast amount of hint brushes, consider saving full vis compiles for performance testing and release compiles only.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License