I suck at controlling VVIS

  • If you're asking a question make sure to set the thread type to be a question!

tyler

aa
Sep 11, 2013
5,102
4,621
FYI, the newest version of the ABS pack removes the need to func_detail blockbullets brushes.

Steve, lemme know if you'd like some pointers on your project.
 

Snowbat

L4: Comfortable Member
Apr 23, 2013
165
74
Thanks for the help mate.
Another question: you added those areaportals... what are their pyurpose? I mean I know what areaportals are for, but why did you place some there? Is this to cut the forward area from the main area so that the compile time is less?

Secondly, as I said, I suck at HINT'ing. Here too, I know what they do (cut a visleaf) but why exactly did you HINT all those things? Does it tell the compiler to somehow not spend hours calculating portals there or is it purely for performance optimization?

Fuck, I really suck at HINT'ing. I watched countless tutorials and I can understand the simple examples perfectly, but I never find a way to properly use thme in shit I make. I must be stupid or something...
 

tyler

aa
Sep 11, 2013
5,102
4,621
Those areaportals are probably doing very little without a func_areaportalwindow in the secret passage. But the reason I put them there is twofold. One, hinting would do about the same (they both cut VVIS, albeit a bit differently). Two, you've already staggered the halls in such a way that many visleafs in one area won't be rendered if you're in the other area. Adding areaportals, which tell the game to outright stop rendering things beyond them, helps with that. Otherwise the VVIS calculations might indicate that from the far side of the big ziggurat, players can see the initial area, which is not ideal. (Note that's an example; I don't know if it happened here.) Essentially: it's not hurting anything and will only make it better.

areaportalwindows are a bit different though because they close when you're far away rather than when you don't look at them. I could have put those in the doorways instead, but it's really a better fit for something like the straight corridor you have, where players could look in that direction from near the finale and see into the opening area. Actually, now that I think about it, since it's so long a hint or two might suffice, which would be better.

I really suggest reading this (I'm sure you have already, but read it again) because it will help make sense of what I'm taking about with that passageway.

I didn't do any complicated hints like in that article (meaning diagonal) because MVM is meant to be so big and open that there aren't really opportunities for that.

Think of hints as telling VVIS to do what should already be the obvious course of action. Imagine a doorway. We know that the logical way for visibility leaves to be separated would be one inside the doorway and one outside the doorway. But VVIS might do something weird, like make a leaf that goes from one side of the doorway to the other. So instead of rendering the outside or the inside of a door, we're rendering both sides. I made a post sort of about this idea recently.

That's a really simple example. Even with hints, VVIS doesn't always do what I expect. However, you can easily compare the opening area of Yucatan before and after I hinted things. All you need to do is look at the shape of the portals after loading the portal file. The main platform in the center has lots of detail geometry that used to cut visleaves all the way to the side of it, in open air. All my hinting does there is limit how far those weird shaped visleaves can go. It's not a problem to have oddly shaped visleafs, but when they are large and in unnecessary places, it complicates (and therefore extends) the VVIS calculation time.

That's really the main thing I sought to accomplish--just to simplify as many visleafs as I could. So that's why most the hints are around areas with complex or irregular geometry, just to get those visleafs to be a bit neater so VVIS goes a bit faster.

Yes, the primary benefit of this will be compile time. However, it will probably lead to some performance improvements as well. Please please please keep in mind that mapping on a larger grid will also help with this immensely.

You're not stupid for not getting it. It's weird, and it's hard. Frankly it took me years to understand every bit of optimization and I still don't make use of it all. Understanding it is different than being able to use it. Making a really polished TF2 map is hard. Take it slow. It isn't a race. Do your best. We're here to help.

Hopefully this makes what I did a bit clearer. If not, well, let me know. I will keep writing these long posts endlessly.
 
Last edited:

henke37

aa
Sep 23, 2011
2,075
515
VVIS is the tool, not the concept of visibility. VVIS doesn't create any visleaves, it computes visibility between them. And area portals do two things: disabling entire areas of the level (computed by VBSP and applied at runtime) and cropping rendering areas at runtime.