GameBanana Icon GB Article

Hints about Hints - Practical guide on hint brushes placement

Hey, you! We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending will2k points.
  • Post: Give will2k your thoughts on this Article.
  • Watch: Get notified when this Article is updated.
Mascot

Join the community!

Sign up

Already a Bananite? Login

Hints about Hints

Practical guide on hint brushes placement

If you haven’t gotten the hint from the title, this article deals with the usage of hint brushes in Source engine. For the rest of the article, I will assume that you are familiar with the working of the Source engine and have an understanding of hints, visleaves and overall optimization. If it is not the case, then it is highly advisable to start on the Valve developer Wiki page (Hint wiki) and (visibility optimization), as well as read my comprehensive Source optimization paper (Man vs Engine) for an in-depth explanation of hints and optimization in general.

I get a lot of questions and requests on hint brushes, so this article is more like a journey inside my head to see how I think about and approach hints placement and to give everyone some practical examples on how I systematically proceed with hint brushes. Smoking is prohibited during this journey and please keep your limbs inside the train at all times…what?? Never mind, that was my internal voice.

Horizontal

As the name implies, horizontal hint brushes are parallel to the ground as opposed to vertical brushes which are perpendicular to the ground.

If you build your base brushwork in standard sizes (64, 128, 256, etc.), these horizontal hints will be neatly placed at those same heights. What if you do not build your backbone brushes in standard sizes? Well, nothing is lost and you can still add those horizontal hints. You just need to select 4-5 common heights in your map’s brushwork and place hints accordingly (for example, if many of your brushes are at 144, 276 and 348 units high then placing 3 horizontal hints at these heights would be ideal).


Notice in the above screenshot how the 3 horizontal hints are neatly laying on top of the brushwork at 3 different heights (denoted by numbered arrows). You only need to texture the face that touches the top of the brush with hint texture (the bottom face here) while all other faces should be textured with skip (otherwise you will add unnecessary visleaves cuts that will clutter your PVS and slow down VVIS).

If the water area in the screenshot is also accessible in-game, then a 4th horizontal hint should be placed at ground level (location 4 on screenshot) to separate lower water area from upper ground level.

Here’s how horizontal hints look like in my map de_brooktown.


You can notice a total of 6 horizontal brushes going from ground level up to last brushwork before the skybox. As I mentioned in my paper, you do not need to worry about the size of the brush; one brush per height covering the whole map is fine even if it goes through other map geometry.

T-shape brush

After the horizontal brushes, T-shaped brushes are the second pattern that I look at to add some hints. You must be confused right now asking what the hell a T-shaped brush is!

The answer is easy: it’s a brush with a shape of a T (Ah, you don’t say). Joking aside, it is any brush or conglomerate of adjacent brushes that is more or less shaped like the letter T when looked at from the top view.

Yes, I know you need a screenshot; here it goes.


I have placed orange T letters so you can see that the brush has a protrusion that separates 2 areas from each side similar to the letter T. The hint brush should flush with the bottom of the T-shaped brush with the hint face while other faces are skipped. The T-shaped brushes can be of all shapes and sizes but they follow the overall shape of a T. With this hint setup, we are sure that visleaves A & B cannot see each other now (no direct line of sight), therefore the contents of one won’t be rendered when you are in the other visleaf. The same logic applies to visleaves B & C. No rendering can only mean one thing: less engine overhead and higher fps.

Let me show you the same scenario but without the hints applied.


Without the previous hints, the engine will probably cut visleaves in a similar way seen in the above screenshot (could have more variations but this is one probable setup).

The visleaves are highlighted in blue and you can clearly observe that A & B have now a direct line of sight (LOS) as is the case for B & C. Having a direct LOS means that the 2 visleaves will be both totally rendered regardless of the player’s location inside one of them (refer to my paper for a full explanation of the BSP and “visibility from a region” concepts).

If you stand in B (right at the location of the letter B where you are not supposed to see A and C), the engine will render the whole A and C visleaves as well as all the visleaves to the north of B and the south and west of C; in simpler words, your fps will plummet faster than a plane hit by AA guns.

Always stay on the look for these T-shaped brushes to separate visleaves on both sides of the T.

Corner

Corner hints are easily the most overlooked hints by beginner and advanced mappers alike.

It could be that some designers don’t know about them while others are confused by their usage, but these corner hints are extremely valuable in cutting visibility and should be the 3rd pattern to systematically look for in your map.

As I mentioned in my paper, corners could be indoors (corridor) or outdoors (street); as long as you have a corner edge with regular world brushes on both sides of the corner, then this hint is a viable solution. These hints can be of any shape but I find it easier to have them in triangular shape for simpler manipulation in Hammer editor.

Let’s see those corner hints in my map de_spezia_pro.


You can see 2 triangular corner hints; one indoor to the left (inside a corridor) and one outdoor to the right (in a town street).

The corner hint must (and I say again must) touch the tip of the corner as denoted by the red arrows location. It should also extend on both sides of the corner until it touches regular world brushes (as denoted by the red circles locations). Please note that only the hypotenuse (the diagonal side) is textured with hint while all other sides are skipped.

Using these triangular corner hints, visleaves A & B cannot see each other and nothing in B is rendered when you stand in A and vice versa. Similar logic is applied to C & D visleaves since without this hint, the whole street to the right of D will be rendered when you stand in C.

Some corners’ geometry might be tricky or some other corners might have one side without regular world brushes; in this case, you can skip the hint placement on such corners (no pun intended).

Make it a habit to always trigger the angular hint flag in your head when you see corners in the map.

Poking hallway

Many mappers leave visleaves’ division to VBSP but do not know that vbsp does a not-so-brilliant job in this regard. Whether you like it or not, a manual intervention with hint brushes is mandatory to ensure proper visleaves’ cuts across the map.

One of the poor vbsp judgments is something I like to call the poking hallway; it is simply when a visleaf extends through a hallway, doorway or window beyond their edge, which allows this visleaf to see other visleaves in the vicinity and render their content, putting an overhead on the engine.

I hear you shouting “screenshot” to which I’ll gladly oblige with some screenshots from my map cs_east_borough.


Notice how a hint brush is placed at the hallway edge(s) (hallways can be indoor or outdoor as is the case with the back alley in the above screenshot). Always place a hint in such locations across the map to avoid having your visleaf extend beyond the edge (as we shall see in the upcoming screenshots).

If the hallway is long, it might be worth adding a hint brush in its middle in addition to the two on its edges.


You can see that our hallway (a small back alley) has two hint brushes at the extremities to avoid the “poking effect”. In addition, I have added another hint right in its middle to cut it in half; this way, the long visleaf is divided into two smaller visleaves A & B. What’s the benefit I hear you say? Whenever you are in A, you do not have any direct LOS to the area in D and thus its content isn’t rendered anymore. The same logic applies to being in B and not having a direct LOS to the area around C. Neat, isn’t it? Of course it is, especially when you see your frame rate staying high in the triple digit realms.

Let me show you now the above screenshot but without those hints.


As before, vbsp, left to its means, will probably have a long visleaf across the hallway poking on both sides in a similar setup to what I have drawn on the screenshot. The blue area denotes the hallway visleaf as I suspect it to be (again, it could be slightly different but the idea is the same).

With this setup, and even if you are in the middle of this back alley and can’t technically see C and D, the poking visleaf you are standing within can, and will unfortunately render all of their contents. If the map is highly detailed, then you’re in for a frustrating slide show of low fps.

If you have been paying attention so far, you would have noticed that the left edge of this hallway (towards C) is also a perfect candidate for a corner hint. Aha, you didn’t think of that, did you? Hints work best in combination as you can tell and you should keep this in mind when dealing with them.

As I mentioned in my paper “Man vs Engine”, your ultimate goal is to make a specific visleaf “see” the least amount of adjacent leaves thus preventing the engine from rendering the content of these “unseen” leaves which will reduce engine overhead and increase frame rate.

Please memorize this golden rule as it will be included in your pop quiz next week :).

One final hint

Hints are easy and fun to work with, trust me. The hard part is understanding how the Source engine and the BSP work. Once you know these well, placing hints becomes intuitive and natural.

This article summarized my systematic approach with solid examples about proper hint placement. As with any system, it needs practice and perseverance and the rewards are big.

To give some you motivation, I can tell you that by constantly practicing and following this approach, I am able to have a 1-2 minutes run in a map and come up with more than 90% of the hint setup in my head.

This article, coupled with my previous comprehensive paper on Source optimization, should give you enough tools to win your optimization fight and have tightly-optimized maps with high frame rate and fluid gameplay.

Happy hinting.

Will2k

June 15, 2014

Posts

  • 10mo
    jUST_rUSH avatar
    jUST_rUSH Offline
    Member Joined 12mo
    Report post
    I really hope you check this >< what do I do with horizontal hints when the map has a lot of height variation; overpass-esque. I tried to analyze many maps including overpass, but there are just too many things built in advanced ways/are too cluttered to really understand. Would the floor level of one site ideally be on one of those hint layers? Like Overpass's A being 256 units higher than B so the hint brush goes right through the floor and another one can go 128 units above that? Or can I just have horizontal ones abruptly stop where height changes significantly  (they would be floating on one or more sides so idk how plausible that is)? Idk how clear that was, but Lmk if you can help. Thanks!
    Bananite
  • 2y
    will2k avatar
    will2k avatar Offline
    Super Moderator Joined 6y
    29,609 points Ranked 145th
    30 medals 2 legendary 7 rare
    • 1st Place - Tutorials Contest Medal icon
    • 500 posts awarded Exemplary Feedback Medal icon
    • 50 posts awarded Exemplary Feedback Medal icon
    • 100 posts awarded Exemplary Feedback Medal icon
    • 200 posts awarded Exemplary Feedback Medal icon
    • Achieved Super Moderator clearance Medal icon
    will2k avatar
    will2k
    Map Critic
    Report post
    > **Posted by Trond**
    >
    > Not a shit was understood

    You should start reading the basics before tackling medium to advanced topics/articles.

    I made it perfectly clear in the very first paragraph of this article:

    >For the rest of the article, I will assume that you are familiar with the working of the Source engine and have an understanding of hints, visleaves and overall optimization. If it is not the case, then it is highly advisable to start on the Valve developer Wiki page (Hint wiki) and (visibility optimization), as well as read my comprehensive Source optimization paper (Man vs Engine) for an in-depth explanation of hints and optimization in general.
    cosa dici! avatar
    Mantra
    cosa dici!
  • 2y
    Akshit Saklani avatar
    Member Joined 5y
    18,163 points Ranked 235th
    44 medals 2 legendary 5 rare
    • 15+ Entries! GameBanana’s Christmas Giveaway 2015 Medal icon
    • 15+ Entries! GameBanana’s Christmas Giveaway 2016 Medal icon
    • GameBanana’s Christmas Giveaway 2015 Day Seven Winner! Medal icon
    • GameBanana’s Christmas Giveaway 2015 Day Thirteen Winner! Medal icon
    • 25 posts awarded Exemplary Feedback Medal icon
    • Returned 1000 times Medal icon
    Report post
    > **Posted by Trond**
    >
    > Not a shit was understood

    He's the one who can explain this the best way it could be. Take this article as a guide, open up hammer, and start experimenting with it, while reading this article again and again and checking the FPS in game. That's the only way to understand it.
    Fall 7 times, stand up 8! avatar
    Mantra
    Fall 7 times, stand up 8!
  • 2y
    Trond avatar
    Trond Offline
    Member Joined 9y
    Report post
    Not a shit was understood
  • 3y
    will2k avatar
    will2k avatar Offline
    Super Moderator Joined 6y
    29,609 points Ranked 145th
    30 medals 2 legendary 7 rare
    • 1st Place - Tutorials Contest Medal icon
    • 500 posts awarded Exemplary Feedback Medal icon
    • 50 posts awarded Exemplary Feedback Medal icon
    • 100 posts awarded Exemplary Feedback Medal icon
    • 200 posts awarded Exemplary Feedback Medal icon
    • Achieved Super Moderator clearance Medal icon
    will2k avatar
    will2k
    Map Critic
    Report post
  • 3y
    will2k avatar
    will2k avatar Offline
    Super Moderator Joined 6y
    29,609 points Ranked 145th
    30 medals 2 legendary 7 rare
    • 1st Place - Tutorials Contest Medal icon
    • 500 posts awarded Exemplary Feedback Medal icon
    • 50 posts awarded Exemplary Feedback Medal icon
    • 100 posts awarded Exemplary Feedback Medal icon
    • 200 posts awarded Exemplary Feedback Medal icon
    • Achieved Super Moderator clearance Medal icon
    will2k avatar
    will2k
    Map Critic
    Report post
    I am thinking of continuing the "practical placement guide" series with 2 new additional articles covering areaportals and occluders placement.

    Gonna check my free time and start sharpening my pencil.
    • Win x 1
    • Interesting x 2
    cosa dici! avatar
    Mantra
    cosa dici!
  • 3y
    Paulmega avatar
    Paulmega avatar Offline
    Member Joined 7y
    4,432 points Ranked 1006th
    13 medals 1 rare
    • 6 years a member Medal icon
    • Became a Club Leader Medal icon
    • Reached 1,000 Points Medal icon
    • Reached 2,500 Points Medal icon
    • 1 post awarded Exemplary Feedback Medal icon
    • 5 posts awarded Exemplary Feedback Medal icon
    Report post
    > **Posted by will2k**
    >
    > Hey Paul :)
    >
    > Glad you found this article useful. coupled with my previous paper on optimization (Man vs engine), you should be up and running in your optimization battle.
    >
    > Feel free to ask if you have anything 'confusing' you in Source engine :) and I'll try my best to help.

    I've downloaded & read your entire 'Man VS Engine' article, great read! Thanks for that as well, I shall be sure to put it to good use in my new contest-map!
    Mapper. And ting.
  • 3y
    will2k avatar
    will2k avatar Offline
    Super Moderator Joined 6y
    29,609 points Ranked 145th
    30 medals 2 legendary 7 rare
    • 1st Place - Tutorials Contest Medal icon
    • 500 posts awarded Exemplary Feedback Medal icon
    • 50 posts awarded Exemplary Feedback Medal icon
    • 100 posts awarded Exemplary Feedback Medal icon
    • 200 posts awarded Exemplary Feedback Medal icon
    • Achieved Super Moderator clearance Medal icon
    will2k avatar
    will2k
    Map Critic
    Report post
    > **Posted by Paulmega**

    > Hey there Will, long time since we last 'spoke'. I've been looking into optimisation lately and this article is a great help, well written! I'm still very new with hints but I do my best to learn whatever I can.
    >
    > I remember your comment on my map a long time ago, telling me that I did not place any func_details. At first, you confused me, because I wasn't sure why I needed them. As of late, I've been using details in all of my maps and I understand the use of it now. Once you know how it works, it's not that hard to place them where-ever needed!
    >
    > Thanks again man!

    Hey Paul :)

    Glad you found this article useful. coupled with my previous paper on optimization (Man vs engine), you should be up and running in your optimization battle.

    Feel free to ask if you have anything 'confusing' you in Source engine :) and I'll try my best to help.
    cosa dici! avatar
    Mantra
    cosa dici!
  • 3y
    Paulmega avatar
    Paulmega avatar Offline
    Member Joined 7y
    4,432 points Ranked 1006th
    13 medals 1 rare
    • 6 years a member Medal icon
    • Became a Club Leader Medal icon
    • Reached 1,000 Points Medal icon
    • Reached 2,500 Points Medal icon
    • 1 post awarded Exemplary Feedback Medal icon
    • 5 posts awarded Exemplary Feedback Medal icon
    Report post
    Hey there Will, long time since we last 'spoke'. I've been looking into optimisation lately and this article is a great help, well written! I'm still very new with hints but I do my best to learn whatever I can.

    I remember your comment on my map a long time ago, telling me that I did not place any func_details. At first, you confused me, because I wasn't sure why I needed them. As of late, I've been using details in all of my maps and I understand the use of it now. Once you know how it works, it's not that hard to place them where-ever needed!

    Thanks again man!
    Mapper. And ting.
  • 3y
    will2k avatar
    will2k avatar Offline
    Super Moderator Joined 6y
    29,609 points Ranked 145th
    30 medals 2 legendary 7 rare
    • 1st Place - Tutorials Contest Medal icon
    • 500 posts awarded Exemplary Feedback Medal icon
    • 50 posts awarded Exemplary Feedback Medal icon
    • 100 posts awarded Exemplary Feedback Medal icon
    • 200 posts awarded Exemplary Feedback Medal icon
    • Achieved Super Moderator clearance Medal icon
    will2k avatar
    will2k
    Map Critic
    Report post
    > **Posted by FireWavezZ**

    > neat tutorial :)

    Thanks :)
    cosa dici! avatar
    Mantra
    cosa dici!

Share

Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share

Submitter

will2k avatar
will2k avatar Offline
Super Moderator Joined 6y
29,609 points Ranked 145th
30 medals 2 legendary 7 rare
  • 1st Place - Tutorials Contest Medal icon
  • 500 posts awarded Exemplary Feedback Medal icon
  • 50 posts awarded Exemplary Feedback Medal icon
  • 100 posts awarded Exemplary Feedback Medal icon
  • 200 posts awarded Exemplary Feedback Medal icon
  • Achieved Super Moderator clearance Medal icon

will2k avatar
will2k
Send a Private Message to the submitter

Category

Stats

Posts
21
Views
6,573
Date Added
3y
Date Modified
9mo