Func occluder: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎Debugging: Removed dupes)
mNo edit summary
Line 5: Line 5:
* An occluder only hides props, not world geometery or static brushes
* An occluder only hides props, not world geometery or static brushes
* An occluder does not split visleaves
* An occluder does not split visleaves
* An occlder can be free standing and does not need to seperate two areas
* 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.
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.

Revision as of 15:41, 31 October 2005

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.