Help with hint optimization.

What looks better at a dock? Autumn or Winter?

  • Autumn

  • Winter

  • Don't really care.


Results are only viewable after voting.

Tango

Sauce Copter Enthusiast
Jul 10, 2017
198
241
If I create a hint brush (skip brush with a hint texture face like in 3kliksphilps video) does it make only the stuff inside the hint brush invisible or everything behind it until a wall? Just a bit confused
 

Izotope

Sourcerer
aa
May 13, 2013
698
764
Hint itself doesn't make things invisible, all it does is cut visleafs.
Now if you can see that visleaf, everything inside it will render and if you can't see it, it won't render.
That's only the simple answer, there's a bit more to it.

Somebody who knows better please elaborate and correct me if I'm wrong.
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
I don't think you understand how visleafs work.

In order to boost performance, video games need to have a way of knowing what the player can and can't see, and not rendering what the player can't see. But constantly testing against every single object in the map to figure out what the player can and can't see would require more processing power than it saves, so Source compromises. To figure out what this compromise is, we need to understand visleafs and visibility. A visleaf is an area of the map- simple as that. Every map is filled to the brim with these, literally. The map is divided up into visleafs automatically upon compile, so that no space in the map is left without a visleaf. To see how visleafs are generated, load your portal file, under the "Map" menu (not to be confused with the game Portal, a portal file is a totally unrelated thing). A visleaf includes any brush faces that border it, as well as any props or other visible entities which it contains. Visleafs are used in determining visibility during the VVIS stage of compiling. During VVIS, each visleaf is tested to see which other visleafs it can see (that is, if it is possible to draw a straight line from one visleaf to another without passing through world geometry). For example, in this image, if each red box represents a visleaf, leaf 1 would be connected to leaf 2, but leaf 1 would not be connected to leaf 3. This visibility data is embedded into the map file. When a player runs your map, the game engine only renders brush faces and entities that are in visleafs connected to the leaf that the player is standing in. So in the above image example, if the player was standing in visleaf 1, everything in visleaves 1 and 2 would be rendered, but visleaf 3 would not be rendered.

Now onto the property of the Hint tool texture. The Hint tooltexture is used to manually cut visleafs. Every brush face textured with the Hint tooltexture will cause any intersecting visleafs to be cut in half along the brush face. For example, in this image, if the purple line represents a brush face textured with the Hint texture, then the visleafs would be cut like shown in the first image. (Note that you cannot manually merge visleafs together, however this isn't usually a problem.) The Hint brush will NOT block visibility, as you seem to suggest- that is, when VVIS is trying to draw lines between each visleaf to figure out which ones can see each other, lines can still be drawn through Hint brush faces, and a player standing in one visleaf next to a Hint brush face will still be able to see visleaves on the opposite side of the face.

To learn more about visleaves and other forms of visibility optimization, check out the Valve Dev Wiki page on Visibility optimization.
 
Mar 23, 2013
1,013
347
Now if you can see that visleaf, everything inside it will render and if you can't see it, it won't render.

To be more precice: If you can draw a line from anywhere in your visleaf you are in, to a different visleaf, then the other visleaf is rendered. So while you might not be able to see the other visleaf, the visleaf itself can still "see" the other visleaf. Only when there is no possible solution to draw a flat line from one visleaf to the other, then it's not rendered.
 

FloofCollie

I really suck!
aa
Nov 5, 2016
600
670
If you want to make areas only visible when the player can actually see them, check out Areaportals.

That website also has info about Hint brushes, so that should be useful.
 

Tango

Sauce Copter Enthusiast
Jul 10, 2017
198
241
If you want to make areas only visible when the player can actually see them, check out Areaportals.

That website also has info about Hint brushes, so that should be useful.


I use areaportals but I'm just wondering how te hint texture works, since it's another way of optimization
 

grtgmzlol

L2: Junior Member
Sep 29, 2017
74
18
Also by the way too many visleaves will prolong the VVIS stage unless ur pc is overpowered