Check out Half-Life Re-imagined competition results!
Check out Skewing textures in Hammer, our newest tutorial!
Welcome, ellen123, our newest member!

logo

Site Stuff

Reference

Maps

Community

ShoutBOX

Poll

Feeling Blue

What's your favourite shade of blue?

Azure

15

Cobalt

32

Turquoise

10

Cyan

11

Royal

9

Teal

3

Onliners

8 mins

olograph

9 mins

Crollo

10 mins

Trempler

17 mins

NineTnine

27 mins

potatis_invalid

30 mins

Dimbeak

2 hours

Windawz

Affiliates

A gaming and technology blog by TWHL admins Penguinboy and Ant. A music blog by TWHL users Ant and Hugh.

Hint Brush Tutorial

By David Nixon

This tutorial assumes that you have a basic understanding of mapping for Half-Life and are familiar with what is involved in creating and compiling a map.

Before going into how and when to use hint brushes, let us briefly look at how they work so that you can better understand them. Your compiler breaks up every map into chunks of polygons also known as ?BSP leafs?. Subsequently, the compiler uses these BSP leafs to assemble a ?Potentially Visible Set?. This PVS records from your current position inside one BSP leaf whether or not you can see into the rest of the BSP leafs. In other words, the PVS determines what gets rendered from where you are standing at any given moment inside the game world. For more information on Half-Life?s visibility determination see DeathWish?s VERC Collective article here.

One of the problems with this BSP system is that the BSP leaves aren?t always divided up in the most efficient manner. This leads to objects and brushes often being rendered that are not currently visible. It is in these situations where hint brushes can be used to their maximum potential. To correct the problem, you can place hint brushes in key positions to tell the compiler where to cut up that particular BSP leaf.

Let?s move on to some specific examples of when and how you should use a hint brush. We?ll start with a common occurrence. You?re in a hall and brushes are being rendered around the corner that are not visible. (Fig.1)





A hint brush in this instance can help you quite a bit. The method I use for placing the hint brush is as follows. Create a world brush with a thickness of one unit. Then, using vertex manipulation, position the brush approximately at a 45-degree angle in relation to the corner while making sure that the brush passes through the corner. In addition, each extremity should extend until it is one unit away from the walls, floor and ceiling. During the compile process the hint plane will be extended into the walls and ceiling to create the border of that BSP leaf. However, in certain cases if brushes are still being rendered around the corner after doing this, you may need to extend the hint brush one unit into the walls and ceiling. Although this will cause more surface subdivisions, and therefore increase r_speeds, it will be worth it thanks to the efficient BSP leaf organization. (In fig.2 the selected brushes are the ones that the hint brush extends through or close to). Finally, cover one side of the brush with the hint texture and the rest with the skip texture. Both of which can be found in the zhlt.wad. (Fig.2)





Keep in mind, depending on the situation, the angle of the hint brush can change (Fig.2a), but it must always pass through the corner and extend close to, or into a wall at each end. A good way to know where to place the hint brush is to visualize it as a border that as you pass through the rest of the scene will be rendered.





After compiling, test your map using ?gl_wireframe 2? and see what effect the placement of your hint brush had. In this case, I saved 150 wpolys. (Fig.3) Notice how you can see where the hint brush was placed from the polygon cuts in the ground and ceiling. Only once you pass through this line will the next leaf be rendered.





Most cases where hint brushes come in handy rely on the same principle laid out in the preceding example; Half-Life rendering things around a corner that you are not able to see. However, the usefulness of hint brushes isn?t confined to small hallways. You can employ the same technique for an outdoor area, extending the hint brush close to the sky as oppose to the ceiling. The execution of this procedure in an outdoor setting is illustrated in figures 4 through 6.







While it is easy to see how useful hint brushes can be, they are not a one-time fix for bad map design. It?s important to design your map with effective vis blockers first and foremost. If you want to pack in as much detail as possible, combine vis blockers and hint brushes, but always plan ahead. If you flesh out your map with hint brushes in mind from the very beginning you can get away with a lot while keeping r_speeds to a minimum. Another thing to consider when using hint brushes, is that often time if they are extended into the walls, ceiling and floor, they will increase r_speeds by quite a bit because of the surface subdivisions they cause. It is for this reason that I recommend as a first attempt placing the hint brush one unit or more away from each wall to avoid polygon cuts. There is no substitute for good map design, but in my mind good map design incorporates the use of the powerful tool that is the hint brush.