Func occluder

From Valve Developer Community
Revision as of 00:44, 21 February 2006 by Andreasen (talk | contribs) (Article is also made a stub, despite it being very informative.)
Jump to navigation Jump to search

Stub

This article or section is a stub. You can help by expanding it.

This article is a stub because it needs keyvalues, flags, inputs and outputs, like any normal entity would.

An occluder hides all types of prop that are entirely covered by it in the player's view. They are used to control visbility in places where areaportals or brushes are unsuitable.

There are several important differences between occluders and areaportals:

  • An occluder only hides props, not world geometery or static brushes
  • An occluder does not split visleaves
  • An occlder can be free standing and does not need to separate two areas

To create an occluder, make a brush and cover it with the occluder or trigger materials on all faces you want to occlude. Use the skip or nodraw materials to specify faces that should not occlude. Note that skip works from all angles, not just the face it is applied to. Tie it to a func_occluder entity and compile.

Debugging

r_drawpixelvisibility

Show the occlusion proxies

r_occludeemaxarea

Prevents occlusion testing for entities that take up more than X% of the screen. 0 means use whatever the level said to use.

r_occluderminarea

Prevents this occluder from being used if it takes up less than X% of the screen. 0 means use whatever the level said to use.

r_occlusionspew

Activate/deactivates spew about what the occlusion system is doing.

r_occludermincount

At least this many occluders will be used, no matter how big they are.

r_occlusion

Activate/deactivate the occlusion system.

r_visocclusion

Activate/deactivate wireframe rendering of what the occlusion system is doing.

Example

Occlusion at work. Green boxes represent occluded props, red boxes unoccluded ones. Click to enlarge.