Vis Leaf Optimization

First of all, and I need to be very clear about this: I know about the Hammer dev wiki and Interlopers. Any link you post to an optimization tutorial I’ve probably already seen and it won’t be helpful.

The thing is, I’m looking for very specific help. Every single optimization tutorial I’ve seen is about how to optimize ridiculously idyllic corridors like so: “Make a triangle shaped visleaf so that leaf 1 can’t see leaf 3!”

I need to optimize RP_Construct before I can release it in a sound state of mind, because I’ve heard that the FPS performance is terrible on a fast vvis compile, so I need to do a normal compile but that’s looking like it would take at least a day. Solution, visleaf optimization.

So I have a few questions.

  1. I assume the large open areas can be left without hint brushes. Correct?

  2. To seal off a building, do I place hint brushes over doors/windows and then optimize the building the best I can?

  3. If I have a long underground corridor, is it a good idea to break it in the middle?

  4. Can incorrectly used hint brushes have a negative effect on compile time/performance?

  5. RP_Downtown doesn’t have any hint brushes or vis leaf optimization, and yet in-map performance is fine. Is there a reason for this?

  6. Anything else about vis leaf optimization I should know for a large map like this?

  1. You can try func_viscluster. Be careful using it though.

  2. For doors, yes. For windows, you can try using func_areaportalwindow, so you’d have to be at a certain distance to view the visleaf behind the windows.

  3. In my opinion, not really. It’ll just create unnecessary visleaves.

  4. Yes.

  5. You sure about that?

  6. Keep reading valve developer’s wiki and interlopers.

For 5, I poked around in the VMF and it doesn’t seem to have any hint brushes or any other brush texture generally associated with optimization.

Edit: Unless it was loss in a decompiling process. I assume the vmf on is a decompiled version, because I doubt ThePro would’ve posted the original.

You don’t need hint brushes if you build the map correctly. The only time I’ve had to use hint brushes was when there was some weird portal error during a compile that caused certain faces to go null while standing in certain visleaves.

vmex properly parses hint/skip brushes when decompiling, though it won’t decompile areaportals or ladder brushes (they appear as “obsolete point entities” at 0,0,0 in the decompiled map.)


Forget about hint brushes, they just define more visleaf cuts. You should be using areaportals and occluders primarily. I can’t believe you’ve read this properly and understood it (it took me more than one read).

Actually, I’ve never really read that tutorial. Mostly because I disagree with the way he does certain things, and to a lesser extent the terrible spelling and grammar make my eyes bleed.

It also has large voids of missing information and skips around too much, probably why you found it hard to follow.

I’ve been mapping since 1997 for multiple game engines and have learned most everything by trial and error, or in the case of the build engine, a 90 page technical document on how it worked.

It’s a pretty good starting point. After I read through that guide, I just did things by trial and error, primarily using mat_wireframe 1, mat_leafvis 1, and a few other commands to figure out exactly what visleafs were and how they worked, I also learned a good bit about areaportals it that same way.

Area portals in doorways would do well in a construct map.

Though honestly I think you need to compile on normal and fucking go outside for the time it takes. I always shoot hoops and work on paintball bariers while I’m waiting.

If you compile a map on normal vvis, do you need to do any optimization?

Yes, SDK isn’t perfect.

What you can do is, go to your Face Edit Sheet tool and select EVERY face that people will not EVER see and change it to a nodraw texture. So for example, Change where two brushes meet to nodraw. What that will do is tell Hammer when compiling to just pretty much skip that part of the map. Depending on the map file size so far, it should decrease by about 2-5 megabytes.

This is dumb, time consuming and useless.

Why? VBSP strips the exterior faces (and faces flush with each other, as long as one of them isn’t an entity.) off, regardless of which texture is present on them. Also, nodrawing the exterior of the level serves to get lost in a sea of yellow in the 3D view and make it hard / impossible to see where you are and where you want to go.

Nodraw should only be used on faces inside the level where the player can’t see. eg. if you have a displacement, make the area behind nodraw, or if you have func_detail stairs, make the unseen sides of the func_detail nodraw and the plane below them nodraw.

Unless you want every portion of your map rendered, I’d suggest you optimize your map. VVIS doesn’t “optimize” your map, it only determines which visleaf can see what.

I didn’t mean to sound like every face. I’m just saying what diealready told me Sorry.