Func proprespawnzone

Armadillo of Doom

Group Founder, Lover of Pie
aa
Oct 25, 2007
949
1,228
Oh awsome. I always wanted one of these in DM :D
 

Sacrifist

L3: Member
Nov 21, 2007
130
7

Shmitz

Old Hat
aa
Nov 12, 2007
1,128
746
Orange Box brush entity func_viscluster merges all visleaves inside it into one large leaf, reducing compile times and BSP filesize dramatically. It's exceptionally useful when your map contains open expanses of water or sky, or large, open areas with long sightlines.

Wow, if func_viscluster will bypass the stupid 1024 rule, I am in love.

On the other hand, the wiki entry on the entity tells a slightly different story:
A VIS optimisation brush entity. It appears to tell VVIS that all leaves within its volume can see each other. This can greatly reduce the time VVIS takes when compiling a map. It is only useful when used on large, open areas, where large areas of a map can be seen at once.

Even though it reduces compiling time, it does not help to optimise your map. You should attempt to optimise your map first, with proper usage of Func_detail, Hint brushes and areaportals.

I'm not exactly sure how those two descriptions are both true. Does it merge them? Or does it just save the compiler calculation time by telling it they can all see each other? There's a significant difference to its usefulness.
 

Shmitz

Old Hat
aa
Nov 12, 2007
1,128
746
I did a little playing around with func_viscluster, and it does seem to actually merge visleafs together. At least, that's how it appears after compiling a map and loading the portal file.

Things to note:
  • It *does* merge across the dumb 1024 rule.
  • Does quirky things when competing with hint brushes, don't know if/how that affects performance.
  • You generally don't actually want a whole bunch of large visleafs, as that will usually cause players to render things that don't need to be rendering.

I can see them being useful for:
  • Large expanses of "sky" that have nothing of note to render, and that the player will never spend any time inside.
  • Side "eyecandy" rooms that if you can see inside it at all, you're probably seeing the entirety of its contents (also, use areaportals to see into them).
  • Places where the compiler decides to take a bsp cut on one side of a wall and extend it far past the other side of the wall, resulting in groups of small pointless visleaves.

In general, I wouldn't mess around with them unless you understand map optimization for performance and how changing visleaf structure will impact that. Visclusters seem to be part of the compilation/filesize area of optimization, which should always come well after visibility and rendering control.
 

Noggin

L5: Dapper Member
Nov 17, 2007
226
48
I had emailed Valve for optimization help and got this reply...

Func_viscluster
Func_viscluster is used to merge leaves together. It is usually used in large open areas where multiple leaves are unnecessary, or in areas where's there's too many leaf cuts due to complicated geometry and you want to merge them together. It is not something that should be used a lot, as it is basically bypassing the BSP tree.
 
Last edited: