Questions regarding wall trim.

Discussion in 'Mapping Questions & Discussion' started by Bloodroke, Sep 25, 2013.

  1. Bloodroke

    Bloodroke L1: Registered

    Messages:
    29
    Positive Ratings:
    8
    I had given my map some thought today, and I found that trim that is part of the wall (flush with it) produces some nice looking results. What I had been doing prior is just attaching molding to the wall as a func_detail, 4 units jutting out from the wall.

    I prefer the look of the trim being flush with the wall as a part of it, but I have to ask; would this cause any un-necessary visleaf cutting, or other compiling problems? If so, how would I go about correcting it? Should I just stick to attaching molding to the wall as a func_detail?
     
    • Thanks Thanks x 1
  2. Crash

    aa Crash func_nerd

    Messages:
    3,192
    Positive Ratings:
    5,021
    Just cut the brush and leave it as a world brush. As long as it's not sticking out it shouldn't affect visleafs.
     
    • Thanks Thanks x 1
  3. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    174
    so a flat wall cut 100 times would be the same as a flat wall that was one large brush? (and no, I'm not trying to be funny)
     
    • Thanks Thanks x 1
  4. Bloodroke

    Bloodroke L1: Registered

    Messages:
    29
    Positive Ratings:
    8
    So, what would be my best option then?
     
    • Thanks Thanks x 1
  5. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,538
    Slice the wall and texture the trim section how you want it.
    Yes and no. Rendering-as-one depends on if it is 100 different textures (or even different alignements of the same texture) or all the same, and whether or not you will get leaf splits depends on VBSP's mood.
     
    • Thanks Thanks x 4
  6. nightwatch

    aa nightwatch

    Messages:
    640
    Positive Ratings:
    485
    If one was so inclined, would it be possible to alter the leaf splitting post compile through a hex editor?
     
    • Thanks Thanks x 1
  7. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,538
    I'm pretty sure that would be a no. Unless you have an extremely amazing grasp of the Source BSP tree structure and know how to re-compose large branches of it. You'd also probably need to write a program to do the dirty work for you unless you are a savant.
     
    • Thanks Thanks x 1
  8. nightwatch

    aa nightwatch

    Messages:
    640
    Positive Ratings:
    485
    Not that I'm a glutton for punishment or anything, but surely it is possible, seeing as there is quite detailed documentation on source bsp structure in the developer wiki....? I'm not deliberately underplaying the amount of work involved, rather I'm interested in whether any significant optimisation could be gained by doing so, despite the obvious time loss and mental frustration involved in doing it manually - clearly it wouldn't be as effective as func_detailing an icosahedron in hammer considering the amount of effort involved.
     
    • Thanks Thanks x 1
    Last edited: Sep 26, 2013
  9. henke37

    aa henke37

    Messages:
    1,955
    Positive Ratings:
    465
    Just use the hint material to precut and let BSP do its thing where it doesn't matter.
     
    • Thanks Thanks x 1
  10. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,538
    I'm not very well versed in it myself, but while possible, my understanding is that trying to merge two leaves will result in needing cascading changes up the tree. Plus there may be some other things that need editing that depend on the structure, or maybe even checksums somewhere that need recalculating.

    I am however quite certain that significant optimization cannot be found there. Technically, the more leaves the world is split into the more optimized the map CAN be. Larger leaves obvious more will be rendered. Current "optimization" methods are actually striking a balance between compile-time and run-time optimization. We all know the effect on a compile it can have with lots of leaves, but that may technically result in an marginally faster rendering map - up to a point, there is likely a point where you have too many leaves and it will bog down run-time calculations.

    Our methods also deal with "correcting" things that VBSP isn't written to consider or otherwise overlooks, which brings me to my response to henke. Hint will not always overrule VBSP. It will always make a slice, but there are some cases (especially when you are hinting flush with another face in an attempt to prevent a frivolous outward cut - like in our case here with a two part wall) where VBSP may still decide to cut something.
    I have seen cases where you have two walls like so: |_ with the end of the bottom brush butting up against the inside of the left brush. VBSP then makes a cut on the OUTSIDE of the building, along the plane of the INSIDE of the bottom wall - even though that face doesn't even touch the leaf getting sliced.
    When it comes to leaves, the only absolute in stopping cuts is the 1024 unit rule.
     
    • Thanks Thanks x 2
  11. Bloodroke

    Bloodroke L1: Registered

    Messages:
    29
    Positive Ratings:
    8
    Thank-you Booj, I have begun working on the map making the trim a part of the wall itself. It looks much better than attaching func_details to the walls.
     
    • Thanks Thanks x 1
  12. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,035
    Positive Ratings:
    4,499
    be aware this is
    going to make your rooms feel like boxes
    with zero depth to them
     
    • Thanks Thanks x 1
  13. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,538
    A small trim along the floor won't really add depth to a room anyway. That is the job of making rooms not be boxes and putting interesting stuff in them.
     
    • Thanks Thanks x 1
  14. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,035
    Positive Ratings:
    4,499
    well i wouldnt go overboard
    trim is a really important detail
    it totally sells an area
     
    • Thanks Thanks x 1
  15. Fr0Z3nR

    aa Fr0Z3nR Creator of blackholes & memes. Destroyer of forums

    Messages:
    6,391
    Positive Ratings:
    5,464
    Coffee, keep up that way of posting and you'll almost have haiku's
     
    • Thanks Thanks x 1
  16. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,768
    To add to Booj's example, one of the more obvious cases is when you have something cutting at 45 degrees that not only cuts through the immediate leaf, but the successive 4 leaves (or how ever many leaves exist within the 1024 units) unnecasserily.

    In regards to the question, basically it's a waste of effort to spend so much time on such a trivial matter that can lead to such a menial performance difference. If you've optimised well enough in your layout design then you shouldn't have a problem in any aspect of compiling, either in time or load.
     
    • Thanks Thanks x 1
  17. henke37

    aa henke37

    Messages:
    1,955
    Positive Ratings:
    465
    It is rather simple actually. The hint material cuts first. But vbsp still cuts using the normal rules afterwards.

    Sometimes your hints will change things enough for vbsp not to make the same cuts. Other times it will still make the cuts, but change the result.

    To take your wall example, a hint along the side with the join will cut before vbsp makes a silly cut. If vbsp still makes a silly cut then what will the result be? It will be a zero length visleaf between the wall and the hint face. vbsp should discard that visleaf.
     
  18. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,538
    You have an outside corner that for whatever reason should be world brush instead of detail. VBSP splits the leaves in unnecessary places outward from joints that are flush together and create a flat face.

    [​IMG]

    Putting a hint brush along the face won't fix it because the slice still occurs, and nearby portals are slightly shuffled around without reducing the overall nonsense.

    [​IMG]

    This specific instance can be solved by mitering all three edges along the corner and then VBSP creates only three leaves surrounding this box since it prefers non-angular portals. However that isn't practical in a real map because quite often you won't want one solid texture and that means splitting flat faces into multiple brushes.
     
  19. henke37

    aa henke37

    Messages:
    1,955
    Positive Ratings:
    465
    Actually, I have had some success in using hint brushes to precut there. The difference is that mine were facing the other way. That shouldn't make a difference, but there is a lot of things that shouldn't cause things yet still do.
     
  20. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,538
    Which was exactly my point :) Sometimes VBSP just does things because it wants to and we don't know why nor how to prevent or fix them.