Help with hint optimization.

Discussion in 'Mapping Questions & Discussion' started by Intergalactic Trash Can, Sep 20, 2017.

?

What looks better at a dock? Autumn or Winter?

  1. Autumn

  2. Winter

  3. Don't really care.

Results are only viewable after voting.
  1. Intergalactic Trash Can

    Intergalactic Trash Can L2: Junior Member

    Messages:
    93
    Positive Ratings:
    49
    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
     
  2. Izotope

    aa Izotope Never releases maps

    Messages:
    592
    Positive Ratings:
    540
    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.
     
  3. theatreTECHIE

    aa theatreTECHIE Yet another Techie for the net...

    Messages:
    379
    Positive Ratings:
    397
  4. Da Spud Lord

    aa Da Spud Lord L0: Shitty Member

    Messages:
    528
    Positive Ratings:
    380
    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.
     
  5. Lampenpam

    aa Lampenpam

    Messages:
    993
    Positive Ratings:
    328
    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.
     
  6. Kapanyo

    Kapanyo L3: Member

    Messages:
    117
    Positive Ratings:
    70
    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.
     
  7. Intergalactic Trash Can

    Intergalactic Trash Can L2: Junior Member

    Messages:
    93
    Positive Ratings:
    49

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

    grtgmzlol L1: Registered

    Messages:
    33
    Positive Ratings:
    4
    Also by the way too many visleaves will prolong the VVIS stage unless ur pc is overpowered