func_detail vs func_brush

  • If you're asking a question make sure to set the thread type to be a question!

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
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;

detail_v_brush.jpg


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:

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
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
 

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
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?
 

JoshuaC

L420: High Member
Sep 2, 2008
444
164
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:

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
Hmph. Look at this picture where the wall is being split across multiple points.
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:

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
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.
 

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
Just take all those horizontal beams, make them one unit less thick than the verticals.

I assume you mean 1 unit thicker.

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

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

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
I understand that but how would I do that? Having them floating would be weird.
I think he might mean like this, from a side view:
stairs.png

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.
 
Last edited:

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
Bad suggestion.
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:

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
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.
 

JoshuaC

L420: High Member
Sep 2, 2008
444
164
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.

It would be better he didn't include the details at all if it means creating a ton of small useless visleafs everywhere.
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
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.
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
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:

Sgt Frag

L14: Epic Member
May 20, 2008
1,443
710
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.
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
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.
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
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.
 
Last edited: