This article's documentation is for anything that uses the Source engine. Click here for more information.

Func viscluster: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (fixed a minor lexical mistake (the plural of leaf is leaves))
(Ran into a case where this entity inflated VRAD time by 4 minutes)
 
(6 intermediate revisions by 4 users not shown)
Line 2: Line 2:
{{this is a|brush entity|internal=1|name=func_viscluster|since=Source 2007|sprite=toolstrigger.gif}}
{{this is a|brush entity|internal=1|name=func_viscluster|since=Source 2007|sprite=toolstrigger.gif}}
[[File:Tools Viscluster.png|thumb|160px|{{mono|tools\tools_viscluster}} from {{bms|4}}, a custom trigger texture designed to make it easy to identify visclusters.]]
[[File:Tools Viscluster.png|thumb|160px|{{mono|tools\tools_viscluster}} from {{bms|4}}, a custom trigger texture designed to make it easy to identify visclusters.]]
It allows you to manually tell [[VVIS]] that the [[visleafs]] inside its volume can all see each other and should be treated as one. This is useful in large open areas where visibility calculations would otherwise take a very, ''very'' long time to complete. Poor use may be [[expensive]] for in-game performance. It should be textured with a [[trigger]] texture, such as <tt>tools\toolstrigger</tt>.
It allows you to manually tell [[VVIS]] that the [[visleafs]] inside its volume can all see each other and should be treated as one. This is useful in large open areas where visibility calculations would otherwise take a very, ''very'' long time to complete. Poor use may be [[expensive]] for in-game performance. It can be textured with any material, but is conventionally textured with a [[trigger]] material, such as <tt>tools\toolstrigger</tt>.


{{Internal entity note}}
{{Internal entity note}}


{{note|This entity does ''not actually'' change the location or number of leafs in a map. Hammer's [[portal file]] ''says'' this occurs, but commands such as {{ent|mat_leafvis}} show the leaves to still be intact.}}
{{note|This entity does ''not actually'' change the location or number of leafs in a map. Hammer's [[portal file]] ''says'' this occurs, but commands such as {{ent|mat_leafvis}} show the leaves to still be intact.}}
{{note|The {{code|func_viscluster}} must cover at least 10% of a leaf's volume for it to be merged.}}


{{warning|The brush should not cross the surface of a [[Water (shader)|water material]] or an [[areaportal]]. If it really does need to be used over water, bring the brush level with the surface of the water on one side, and then create a second, separate <code>func_viscluster</code> on the other side. Never allow a <tt>func_viscluster</tt> brush to cross a water plane, or ''very'' strange things happen.}}
{{warning|The brush should not cross the surface of a [[Water (shader)|water material]] or an [[areaportal]]. If it really does need to be used over water, bring the brush level with the surface of the water on one side, and then create a second, separate <code>func_viscluster</code> on the other side. Never allow a <tt>func_viscluster</tt> brush to cross a water plane, or ''very'' strange things happen.}}
{{confirm|{{AABBwarning}}}}


==See also==  
{{warning|Reckless use of this entity may also greatly inflate [[VRAD]] times. The usual symptom is being bottlenecked on the <code>BuildVisLeaf</code> step. This can be solved by splitting visleafs up with [[hint]] or reducing the area the viscluster covers.}}
*[http://www.youtube.com/watch?v=TzUBDMuVQmA Viscluster video tutorial]
 
*[[Visibility optimization]]
== See also ==  
* [[Visibility optimization]]
 
== External links ==
* [https://youtu.be/Ds5E7HBQ-nU Video tutorial]
 
[[Category:Optimization Brush Entities]]
[[Category:Optimization Brush Entities]]

Latest revision as of 05:56, 5 September 2025

English (en)Русский (ru)中文 (zh)Translate (Translate)
Toolstrigger.gif

func_viscluster is an internal brush entity available in all Source Source games since Source 2007 Source 2007.

tools\tools_viscluster from Black Mesa Black Mesa, a custom trigger texture designed to make it easy to identify visclusters.

It allows you to manually tell VVIS that the visleafs inside its volume can all see each other and should be treated as one. This is useful in large open areas where visibility calculations would otherwise take a very, very long time to complete. Poor use may be expensive for in-game performance. It can be textured with any material, but is conventionally textured with a trigger material, such as tools\toolstrigger.

Note.pngNote:This is an internal entity. When the map is compiled by VBSP, it is processed and then removed; it does not exist when the map is running.
Note.pngNote:This entity does not actually change the location or number of leafs in a map. Hammer's portal file says this occurs, but commands such as mat_leafvis show the leaves to still be intact.
Note.pngNote:The func_viscluster must cover at least 10% of a leaf's volume for it to be merged.
Warning.pngWarning:The brush should not cross the surface of a water material or an areaportal. If it really does need to be used over water, bring the brush level with the surface of the water on one side, and then create a second, separate func_viscluster on the other side. Never allow a func_viscluster brush to cross a water plane, or very strange things happen.
Warning.pngWarning:Reckless use of this entity may also greatly inflate VRAD times. The usual symptom is being bottlenecked on the BuildVisLeaf step. This can be solved by splitting visleafs up with hint or reducing the area the viscluster covers.

See also

External links