func_detail vs func_brush

Discussion in 'Mapping Questions & Discussion' started by Psy, Sep 18, 2009.

  1. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,467
    I've come across the dreaded 'too many t-junctions to fix up' problem and I died a little inside. Of course, I then remembered that I could use func_brush and so I did and thankfully I've managed to cut my waterindices in half.

    But this sort of raises a question. What disadvantages are there to func_brush?

    I've only been able to find out that it doesn't cast shadow on top of models. Like in this example;

    [​IMG]

    I'd like some light shed on the issue before I got to func_brush a lot of my detail geometry to cut down on waterindices.
     
    Last edited: Sep 18, 2009
  2. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,527
    func_brush is a real entity and has all the entity code/overhead in the engine and all that.
    func_detail is a fake entity that is effectively a world brush as far as the engine is concerned.

    You really shouldn't ever use a func_brush as a replacement for func_detail.

    see post 6 here for a helpful example of how and why tjuncts occur which might help you locate and fix problem spots http://www.chatbear.com/board.plm?a=viewthread&b=4989&t=443,1143827248,11534&s=0&id=974951
     
    • Thanks Thanks x 2
  3. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,562
    edit: Ninja Booj post, again..... :eek:

    Also, you might try func_lod in future.
     
    Last edited: Sep 18, 2009
  4. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,467
    Hmph. Look at this picture where the wall is being split across multiple points.

    In Game
    In Hammer

    As far as I understand from the link you posted, there is absolutely no way to solve this without either making a model replacement or moving the func_detail away from the wall.

    So...erm...how big of a overhead are we talking about?
     
  5. JoshuaC

    JoshuaC L7: Fancy Member

    Messages:
    446
    Positive Ratings:
    145
    Stickies don't stick to func_brush's.

    Though for your problem you could make those a func_brush, turn collision off and just playerclip them and you'd be good.
     
    Last edited: Sep 18, 2009
  6. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    Can't you move it by 1 hammer unit away? Nobody'd notice.

    I'd take a look at some of the Valve maps. Perhaps that particular kind/amount of tesselation is normal and something else is the problem.
     
    Last edited: Sep 18, 2009
  7. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,467
    Screw it. I'm just going to have tie a lot of the problematic brushes to func_brush. I don't particularly fancy re-doing 4 weeks of work.
     
  8. Sgt Frag

    Sgt Frag L14: Epic Member

    Messages:
    1,443
    Positive Ratings:
    294
    Just take all those horizontal beams, make them one unit less thick than the verticals.

    That'll save alot of t-junc and polys, it'll shade better and give more depth. 'unoptimizing to optimize'

    Nobody like stickies that don't stick.

    You could also save alot by not having the face of the stair touch the angles part also.
     
  9. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,467
    I assume you mean 1 unit thicker.

    I understand that but how would I do that? Having them floating would be weird.
     
  10. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    I think he might mean like this, from a side view:
    [​IMG]
    That would at least confine the weirdness to the flat faces which plank-stairs would be "glued" to, rather than the sloping ramp-like sides.

    Another possibility: Leave the wall decoration as world-brushes, and put a big flat hint (along with a big flat playerclip) to prevent the extra visleaves from doing much. Take the hit in VVIS, and a much smaller hit in runtime.
     
    • Thanks Thanks x 1
    Last edited: Sep 18, 2009
  11. JoshuaC

    JoshuaC L7: Fancy Member

    Messages:
    446
    Positive Ratings:
    145
    Bad suggestion.
     
  12. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    Depends: Would a few extra visleaves with minimal runtime impact grease the map under the T-junction limit? At what point does an extra visleaf become better than another section to the spidery coweb of T-junctions?

    Even if you had a whole wall of those wall-beams, a hint brush at the right height from the wall would basically turn them into one new visleaf per wall area, right? I count ~10 new visleaves in the best-case on the right-hand wall.
     
    Last edited: Sep 18, 2009
  13. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,467
    That sounds awful. No thanks. :p

    I'm going to take a looksie at Sawmill as there are walls with beams all across it inside the main building as far as I recall.
     
  14. JoshuaC

    JoshuaC L7: Fancy Member

    Messages:
    446
    Positive Ratings:
    145
    It would be better he didn't include the details at all if it means creating a ton of small useless visleafs everywhere.
     
  15. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    1. A "ton"? Are we thinking of the same type of hinting here?
    2. It's better than a map that won't compile or has gaps from the -notjunc option.
     
  16. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,562
    Worst comes to worst, move some of your func_detail's 1 unit from the wall. This was an old HL1 trick used to prevent split faces (such as circular pillars being pulled 1 unit off the floor). You would have no T-junctions on the wall or floor (even if they touched the floor).

    P.S. Valve use func_lod for stair trims. Probably for this very reason.
     
    Last edited: Sep 18, 2009
  17. Sgt Frag

    Sgt Frag L14: Epic Member

    Messages:
    1,443
    Positive Ratings:
    294
    Terr was right,that's how I meant to do the stairs.

    If you do that it should get rid of all the red lines on the stairs, that's a few polys/t-junc top and bottom each side.

    On the walls I meant to make the highlighted blue faces 1 unit thinner, so they are closer to the wall. Thinner boards basically. That should get rid of most of those red lines.

    It's when all those edges on func_details line up is when the t-juncs gets too high.
     
  18. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    Had another silly idea while driving: You could make a few of them into displacements. Valve did it on 2fort to get some irregular wood beams.
     
  19. JoshuaC

    JoshuaC L7: Fancy Member

    Messages:
    446
    Positive Ratings:
    145
  20. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    And then take Joshua, put him inside a block, and carve it with him. With luck you'll have a rough mold suitable for creating mint-condition copies of unrelenting pessimistic condescension.
     
    • Funny Funny x 1
    Last edited: Sep 19, 2009