Question about No Draw

Discussion in 'Mapping Questions & Discussion' started by Grillmeister, Aug 14, 2019.

  1. Grillmeister

    Grillmeister L1: Registered

    Messages:
    4
    Positive Ratings:
    1
    Is there any specific point in making surfaces that players don't see no draw? I've seen a couple videos where some surfaces under the map etc. have been made no draw.

    That leads to my follow up question: If I should make surfaces that are not seen no draw, would it make sense that when I start to turn my dev textures into proper ones, to just select all brushes in the entire map, turn them into no draw, and just paint the visible sides with actual textures?
     
  2. Da Spud Lord

    aa Da Spud Lord L0: Crappy Member

    Messages:
    1,106
    Positive Ratings:
    751
    The reason for making nonvisible brush faces into nodraw is for all kinds of optimization. Nodraw faces are entirely skipped by the renderer, which reduces the number of things in the map that need rendered. One nodraw face might not make a difference, but as your map gets more complex and the number of nodraw candidate faces stacks up, the improvement in performance also gets bigger- even if it's only a few FPS, every bit is nice, and combined with other simple optimization techniques, it can help make a super graphics-intensive map run much smoother than it might otherwise. Additionally, nodraw brush faces do not receive lightmaps, which both reduces the map's filesize and reduces the amount of time that VRAD takes to compute lighting for the map. However, nodraw brushes are still solid to all objects, including players and bullets, will block visibility if part of a world brush with opaque and/or nodraw textures on all sides (although due to the way visibility works in Source, players may still be able to see some objects on the other side, or the skybox if they are in an area visible to the sky), and are capable of sealing the map from leaks (if they meet the same criteria for blocking visibility).

    As for your follow-up question, that's actually something that some of the more experienced mappers already do. It's not mandatory, though, if you're good at catching nonvisible faces that wouldn't already be removed by the compiler (although as your brushwork becomes more complicated, this can become more difficult). Personally, I only sometimes do that, depending on how complex the brushwork is in the area. Source does try to make our lives a bit easier, though. When compiling, brush faces that are exposed to the void or that are covered by another brush are removed, in a process sometimes referred to as "culling", which is effectively automatically painting them with nodraw. If only part of a brush face is covered or exposed to the void, the brush face is chopped in half so the part that would be culled can be culled without affecting the part of the face within the map, which helps reduce the effort needed when manually nodrawing things. There are notable limitations, however; brush faces belonging to any brush entity will not cull brush faces for any other entity, or for non-entity world brushes, so ensuring junctions between world brushes and func_detail brushes are nodrawed where feasible is important. And if the map is leaking, then brush faces exposed to the void will not be removed as the compiler cannot figure out which brush faces should be removed and which ones should be kept.
     
    • Thanks Thanks x 1
  3. Grillmeister

    Grillmeister L1: Registered

    Messages:
    4
    Positive Ratings:
    1
    Wow! Thank you so much for the thorough explanation, that cleared up a lot of stuff for me. I guess culling completely fixes all things I was concerned about, if done right!
     
  4. tyler

    aa tyler

    Messages:
    5,061
    Positive Ratings:
    4,545
    • Thanks Thanks x 1
  5. FloofCollie

    aa FloofCollie asshole

    Messages:
    475
    Positive Ratings:
    370
    Another use for Nodraw is BSP optimization - you can hide a Nodraw wall inside a displacement or detailed bit of geometry to hide what's behind it with clean visleaves. Might want to look into using Hint in conjunction with this.
     
    • Thanks Thanks x 1
  6. Grillmeister

    Grillmeister L1: Registered

    Messages:
    4
    Positive Ratings:
    1
    • Agree Agree x 1