func_monitor

From Source Entities
Jump to navigation Jump to search

Code classes:

The first use of func_monitor, seen in Hl2.png. Valve achieved a subtle blur effect by layering six copies of the monitor on each other.

func_monitor is a brush entity present in all games except Dods.pngDay of Defeat: Source and the L4d.pngL4d2-small.pngLeft 4 Dead games. It displays a real-time scene captured from a point_camera somewhere else in the world.

For the entity to work, the surface(s) on which the camera view will be displayed must have a material with $basetexture _rt_Camera in its VMT. Stock materials that work are dev\dev_combinemonitor* and dev\dev_tvmonitor*.

Note: Unless you set up multiple render textures in your mod's binaries, only one point_camera can be rendered at any one time. The first camera in the map will appear on all monitors.

Bug: Visual artifacts may appear if the camera can see a func_monitor.

To enable monitors in your non-HL2 SDK mod, you must:[Noted January 2010. Still accurate?]

  • Include the entity's client .cpp file (found in \client\hl2\).
  • Include the entity's server .cpp and .h files (found in \server\hl2\).
  • #define USE_MONITORS at the top of \client\viewrender.cpp and \client\view.cpp.
  • Fix a multiplayer bug in CPointCamera::CPointCamera() by setting m_bActive to true.

Keyvalues[edit | edit source]

Camera name (target) <target_destination>
The camera to render.

Inputs[edit | edit source]

SetCamera <target_destination>
Changes Camera name.

See Also[edit | edit source]