How to use the HINT brush
Robert Engdahl (That Egir guy)
If you don't wanna know what HINT is, but just wanna use it you may skip to the before HINT section.
Index
Introduction
Counter-Strike creates boxes with precalculated information about
everything which is visible from somewhere in those boxes. This
information determines along with your viewing direction what is to be
rendered, and thereby affects the r_speeds.
3d graffics consist of polygons. Polygons can be triangles, squares and so on. A crate has 6 faces and therefore will add 6 to wpoly. I do sugest you read the r_speeds - bsp tutorial if you would like to know more about what causes wpoly.
To see the r_speeds of your levels start Counter-Strike with the
"-dev -console" parameter, run your map and write "r_speeds 1" in
console. Something looking a litle like the image beneath would now
apear.
100fps is how many Frames you have Pr Second. 2 ms is the delay
your game is behind your moves, due to calculations and stuff. 218
wpoly is the count of non-entity polygons rendered. 988 epoly is the
amount of entity polygons rendered: players, weapons and
hostages.
What a mapper normaly wories about is the wpoly, and the
Counter-Strike team sugests to keep those beneath 600 at all time.
The setup in my map example
This is a situation in an early state of my cs_airport. The map
layout at this point looks like the image below.
The problem is that the canteen to the lower right is rendered when
standing in the big hall in the center of the map.
Before I added HINT, I took a screenshot from the spot in the big
room with the highest r_speed. The screenshot is shown below. Click to
enlarge in a new window.
The r_speeds are at this point at 274 wpoly, its not heigh, but if
it could be reduced...
You need a .wad containing the HINT texture. One is located in
zhlt.wad. Zhlt.wad comes with Zoners Compiler tools which I recomment
you use. Goto "Tools", "Options" and then "Textures". Click "Add WAD"
and browse to zhlt.wad, clik "Open" and "Ok". zhlt.wad is located
where you installed Zoners Compiler Tools.
To make shure that the canteen has its own "Rendering Box" that is
not breaking into an visible area from the main Hal I choose to create
my HINT brush in the long room, as shown below.
I make the HINT brush fitting the room exactly to avoid VIS carving
the walls any more than necessary.
This is how the HINT brush is looking from Valve Hammer Editor,
seen from the big main hall.
When recompiled I went to exactly the same spot as before, and took
a screenshot, which is shown below.
The r_speeds wpoly now says 218. That is a reduction of 56 world polygons, nice!
Different methods
At the pressentation of this tutorial in the forums at countermap iggy made me realise that I forgot to mention the normal method to use the clip brush. So here I'll just scetch them both so you wont be limited by my guide. And a special thanks to iggy, for the feedback.
The Normal method
The Part of the room around the corner will not be rendered before
you enter the hint area, marked with blue.
The drawback is that where the hint brush meets the wall, the wall
will be clipped, making more polygons.
The filling the room method
This is the method that I used. Unless you can actually see the
room, behind the clipped room, the room will not be rendered.
The real good thing about this is that no faces will be clipped and
thereby no additional wpolys will be made.
|