Questions regarding wall trim.

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

Bloodroke

L1: Registered
Jul 30, 2013
29
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?
 

Beetle

L9: Fashionable Member
Aug 17, 2008
627
178
Just cut the brush and leave it as a world brush. As long as it's not sticking out it shouldn't affect visleafs.

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)
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
So, what would be my best option then?
Slice the wall and texture the trim section how you want it.
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)
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.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
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.
 
Sep 7, 2012
638
500
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.

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

henke37

aa
Sep 23, 2011
2,075
515
Just use the hint material to precut and let BSP do its thing where it doesn't matter.
 

A Boojum Snark

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

Bloodroke

L1: Registered
Jul 30, 2013
29
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.
 

tyler

aa
Sep 11, 2013
5,102
4,621
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.

be aware this is
going to make your rooms feel like boxes
with zero depth to them
 

grazr

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

henke37

aa
Sep 23, 2011
2,075
515
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.
 

A Boojum Snark

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

leafmood1.JPG


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.

leafmood2.JPG


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.
 

henke37

aa
Sep 23, 2011
2,075
515
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.