What happens to func_detail brushes in-game?

  • Site Migration: See bugs? Report them here. Want something changed or have an idea? Suggest it here.

FloofCollie

I really suck!
aa
Nov 5, 2016
598
So, I understand the whole deal of func_detailing anything that's not intrusive because it complicates the visleaves - but what happens to those brushes during gameplay? Are they visible all the time because they're not getting culled? Or do they still get culled? I'd like to know!
 

Freyja

aa
Jul 31, 2009
2,942
func_detail's only job is to be ignored by VBSP when creating visleaves, so they don't play into the visibility calculation at all.
Once in-game, they function identical to any other world brush, and will be culled or rendered along side them.
 
Mar 23, 2013
1,015
type mat_wireframe 1 into console, and you see what's being rendered. Very helpfull to find optimization flaws in your maps.
 

[Rx.] Christian Troy

L5: Dapper Member
Jan 23, 2017
223
What I have found through trial and error is that they are optimized by the compiler too but not as well as world brushes. If you compile a map with them in it, then in another compile have them moved to the world, you can see a big difference between how the two maps compile and their performance.

I actually spent hours trying this out with different maps as a lot of peoples opinions conflicted.
 

Freyja

aa
Jul 31, 2009
2,942
Yes, that's because in the second situation the func_detail brushes would have been cutting visleaves.

func_details (almost) only decrease compile time. They exist for compile time optimisation - they don't increase performance. Theoretically your map will run BETTER the less func_details you have.
 

Crowbar

Spiritual preprocessor
aa
Dec 19, 2015
1,460
Worth noting that they prevent world (and other f_d) faces from being cut along with the visleaves, thus leaving less faces for the client to render overall in many cases.
 

[Rx.] Christian Troy

L5: Dapper Member
Jan 23, 2017
223
Yes, that's because in the second situation the func_detail brushes would have been cutting visleaves.

func_details (almost) only decrease compile time. They exist for compile time optimisation - they don't increase performance. Theoretically your map will run BETTER the less func_details you have.

Sorry! Gave ya the wrong rating but fixed it! ;)
 

henke37

aa
Sep 23, 2011
2,075
I think the exact semantics is that the detail geometry is treated the same way as normal geometry is: each face is given an adjacent visleaf and rendered when that visleaf is potentially visible.
 
Mar 23, 2013
1,015
Worth noting that they prevent world (and other f_d) faces from being cut along with the visleaves, thus leaving less faces for the client to render overall in many cases.

Not sure what you mean with that.
Func_detail usually leaves me with more faces to render because if a face is partly covered in func_detail, the whole face will be rendered in game (also also have full lighting informations). But if a world brush face is partly covered by another world brush, the covered part gets removed in game. Therefore the covered part is not being rendered and also has less lighting information saved.
 
Last edited:

Crowbar

Spiritual preprocessor
aa
Dec 19, 2015
1,460
Less area, but more faces. To leave such a hole in a face, you need to cut it in multiple faces.