Hint brushes still don't fully make sense

Puddy

L1: Registered
Dec 12, 2008
37
1
Hi there!
My first post =) I've waited quite some time with posting because I've found all my answers in searches and I haven't completed anything yet.

I've been working on a payload map for quite some time and I've come quite far. I'll give you a small teaser below.

ftlqTflWt.png



I've paid little or no attention to optimizing (except when it comes to the obvious; not too much complexity or too "big" areas). I waited because I thought it was smarter to wait until I knew that the map won't change (not so much anyway).

So here I am, sitting in hammer and wanting to place some hint brushes. I've read the VDC tutorial, the page explaining visleafs and a couple of threads here. I haven't been able to fully understand how exactly to use 'em! Someone claimed that areaportals are better (?), some have said Valves proposed method for hintbrushes is a waste of time, VDC-guide claimed otherwise of course and some suggest the brushes should be placed horizontally and over large areas.

I just don't know what to do =) Also, I have a part where a skyboxbrush is viewable from two sides. How do I make it so that the other side doesn't "show through"?
 

cornontheCoD

L420: High Member
Mar 25, 2008
437
70
I have the same problem. I've read the tutorials on them, and I still don't get what they 'do', and where I should put them.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Hint brushes do not automatically optimize a map. They help VVIS do the right thing when you've built your map properly but VBSP builds the leaves poorly. All hints do is force a leaf split on their plane.

Optimizing with hints and area portals is 5% knowing what they do, and 95% understanding how the compiling and rendering process works. You can't really just say "Do this" like with a lot of mapping stuff, because it is such a fluid thing that isn't always best done the same way.

The best way to make optimization easy is by keeping it in mind while building your map. Unfortunately you say you didn't, but there is probably still some stuff that can be done.

I don't have the time right now to explain the complexities of it, someone else may have some links handy for you, if not I'll try whipping up an explanation later tonight.
 

Armadillo of Doom

Group Founder, Lover of Pie
aa
Oct 25, 2007
949
1,228
I'm gonna take your word for it that you've read the tutorials ;) TLDR at the bottom. As you know, the map is broken into things called visleafs. These are large rectangles in the world that define what is visible at any given moment. When you compile, Hammer will automatically chop up your map and assign visibility. Unfortunately, Hammer can only do so much. Hints are used to manually define these visible blocks. Take your picture as an example, that building in the back w/ metal doors. Those doors would be a good place to stick hint brushes. Hammer compiles something complex like that, and often has the visleaf running between the inside and outside as a giant block.

But we can do better. So you add a hint brush (all six sides) to fill the door space. This will make vvis treat the space as one giant wall. So now instead of your visleaf going between very different areas, it's much more efficient. You'll have a visleaf for inside, one for the door space, and then the outside gets rendered as normal. But what difference does it really make? If you use the visleaf going between the 2 areas, it means that any place you can see said leaf will force everything inside to be rendered, and that's a waste of resource. Doing it the optimized way, if I'm looking out from behind those boxes in the corner, the visleaf I'll see is only the outside one. I can't see the inside leaf, so it's not rendered.

TLDR; do a full compile, then load your map and enable cheats. Then enter the command 'mat_leafvis 1'. And that will give you a pretty good idea of how your visibility is working. Hope this helps :)
 

Puddy

L1: Registered
Dec 12, 2008
37
1
Thanks for all your help, I'm gonna take a look at it =)

If I'm incompetent and ignore hint's entirely... are the consequences dire? Could the map be able to function?
 

Sgt Frag

L14: Epic Member
May 20, 2008
1,443
710
Yeah, do what Tony said and give us a shot with visleafs on. That'll draw blue lines on all their boundries and it's much easier to explain/paintover.
--edit, just saw your new screenie--
Basicaly hints will add more blue lines (by cutting other vis-leafs where they are.)
This helps optimize because as you stop one vis-leaf from being seen from another by making it smaller.

Too many hints IS NOT GOOD.

It's actually hard for me to give good advice on using hints in that pic as it all looks like one big area anyway. You probably won't get much use with them in that area, but maybe they can be useful between that area and the next.

----------
As far as sky goes. You have to leave a gap for world terrain to render behind a wall of sky tex. Even if it's only one unit high right on top of a building.

I've done this a little bit in my new arena map. It helped block view and optimize how I wanted it to but still let tall towers be seen 'through a wall of sky'.

If the sky is sealed to world brushes it will block that vision.

I basically built a cube of sky around a tower, about 32 units away from the wall.
In the editor I can't see the top of the tower anymore, but in game it renders as I want it to.

The sky blocks off vision from one side of map to the other so my vis-leafs can't see each other and they close off properly.
------------

I think the best thing you can do to optimize that area is make the balcony on the left the inside of a building and have a pathway through it, that could close off the vis-leafs from certian areas.

The screen doesn't look terrible though, most areas will look similar to that.

Have you tried
+showbudget in console? That 'll give you a graph of what parts of the map are choking performance (objects, textures, world spawn, etc...). That helps you decide where to cut/add detail.
 
Last edited:

Puddy

L1: Registered
Dec 12, 2008
37
1
I sort of misunderstood the entity "func_detail" when I started with this project. I thought it was only for the smallest of things but I have found that it's for everything that doesn't cause a leak (or enable too far LoS).

Was it of importance that the map wasn't ever compiled fully but in "fast"?

Ah well, I'm funcing =) I've reduced compile-time with... 25 seconds (down from 7:50 minutes!).
 

Altaco

L420: High Member
Jul 3, 2008
484
120
It's not necessarily for anything that doesn't cause a leak. It's for any geometry at all that isn't a major wall that blocks a player's view of something. If you have a shed with a lot of windows, make it func_detail because the player can see inside it so it's not going to need to block vis.
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
What you need to understand is that all these optimisation techniques go hand in hand. func_detail will do the most you can hope for on it's own, whilst hint brushes will actually reduce the amount of the map that will be rendered at any one time for the player, as Immortal explained. Areaportals only seperate a map into another form of area nodes, forcibly blocking rendering to a given circumstance (distance from the portal (client based) or status of a door (open or closed)(server based)).

Hint brushes 'correct' the vvis process in as much the same way a guide dog guides the blind. A blind man may walk down a road that he knows is there but it wont necasserily be the most pretty of journeys, he'll walk into lamp posts or trip over garbage etc. You're basically telling vvis where the garbage is.

You'll still want large walls to remain as geometry to block visibility for increased game performance.

If you've read the tutorials then i'll probably just end up reitterating those, as well as the people here. So i suggest opening up a decompiled VALVe map and taking a look yourself, so that maybe you'll better understand the process. These are available in the download section.
 

Ezekel

L11: Posh Member
Dec 16, 2008
818
245
i think he meant the it shows all of them, even if your 3d view camera isn't near to them. resulting in it becoming hard to see one amongst all the blue lines.
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
There's probably also the fact that if you don't understand how leafportals and leafnodes work, then you wont understand what's actually being shown by the portal file, especially one as complex as the one he's provided there.
 

Laz

L420: High Member
Jul 5, 2008
461
35
TO give you an Idea, here it is once again, a comparing shot of a scene with func_detail showing, and with func_detail hidden.
http://users.telenet.be/La-z-Boy/func_detail.JPG

basically, if a brush isn't blocking visibility, func_detail it. sometimes even entire buildings.

also
http://www.countermap2.com/Tutorials/tutorial0b30.html?id=2
explains it quite good imo. Especially look at the last example with office cubicles. it reminds you visblocking should also be thought of in a vertical sense.
 
Last edited: