env_tonemap_controller
		
		
		
		Jump to navigation
		Jump to search
		

 
Todo: Split Black Mesa and Valve games to separate pages.
|  Class hierarchy | 
|---|
| CEnvTonemapController | 
|  env_tonemap_controller.cpp | 

env_tonemap_controller  is a   logical entity  available in all  Source games.
 Source games.
It controls the HDR tonemapping for the player. Think of it as a method of controlling the exposure of the player's eyes. Tonemapping affect all players in multiplayer. HDR settings should normally be changed through triggers, whenever transitioning between environments of different light levels (or for multiplayer, at the start of the map via logic_auto and to control tonemapping for individual players use trigger_tonemap).
 Tip:The
Tip:The 
 Left 4 Dead series has
 Left 4 Dead series has env_tonemap_controller_ghost (which affects yet-unspawned SI players) and env_tonemap_controller_infected (which affects ones that have spawned).|  Note:  Black Mesa uses upgraded tonemapping with bloom using a modified version of the Reinhard filter (in the game it is called next Next Generation Bloom, orNext Gen Bloomfor short). Because of this, the results are very different from other Source Engine games. Old bloom and HDR still can be enabled with mat_bloom_nextgen 1. Important:If this entity is not in a map - Next Gen Bloomfrom Black Mesa will be broken if the map is launched on a dedicated server (just like in the picture). There is probably a mechanism in the game that makes normal HDR if there is no env_tonemap_controller on a map, because when you run a map locally, everything looks fine. Probably this mechanism worked before with dedicated servers, but in the final release, something is broken. This is why you must to put this entity if you are creating a map for  Black Mesa multiplayer. 
 | 
Flags
- Master (Has priority if multiple env_tonemap_controllerentities exist) : [1] (in all games since ) )
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentnameortarget).
 Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
| 
 
 
 
 
 
 
 | 
Inputs
- SetTonemapScale  <float> (not in  ) )
- Sets the player's tonemap scale. It should be a value between 0 and 2, where 0 is the eyes fully closed, 1 is use the unchanged autoexposure (default), and 2 is the eye fully wide open. Bug:This input does nothing. It only changes Bug:This input does nothing. It only changesmat_hdr_tonemapscaleon the client, which is a value that's written but never read [todo tested in ?]
- BlendTonemapScale  <string> (not in  ) )
- Blends from the player's current tonemap scale to a new one. The parameter syntax is as follows: <target tonemap scale> <blend duration>. For example:0.5 10would blend from the current tonemap scale to 0.5 over a period of 10 seconds. Bug:This input does nothing, same reason as above  [todo tested in ?] Bug:This input does nothing, same reason as above  [todo tested in ?]
- UseDefaultAutoExposure
- Reverts to using the default tonemap auto exposure.
- UseDefaultBloomScale !FGD
- Reverts to using the default bloom scale.
- SetAutoExposureMin <float>
- Sets a custom tonemap auto exposure minimum. Default is 0.5.
- SetAutoExposureMax <float>
- Sets a custom tonemap auto exposure maximum. Default is 2.0.
- SetBloomScale <float>
- Sets a custom bloom scale.
- SetBloomScaleRange <vector2> !FGD
- Sets a range for the bloom scale. First number is the maximum, second number is the minimum. Note:Minimum value is unused, so effectively same as Note:Minimum value is unused, so effectively same asSetBloomScale
- SetTonemapRate <float>
- Sets the rate for autoexposure adjustment (mat_hdr_manual_tonemap_rate).  Bug:The convar is not replicated so it only works in singleplayer. The changed value persists across map changes as a result. Both of these were fixed in Bug:The convar is not replicated so it only works in singleplayer. The changed value persists across map changes as a result. Both of these were fixed in .  [todo tested in ?] .  [todo tested in ?]
- SetTonemapPercentBrightPixels  <float> (only in    ) )
- Sets a target percentage of pixels to maintain above a certain brightness. (default: 1)
- SetTonemapPercentTarget  <float> (only in    ) )
- Sets the brightness that the percentage of pixels defined by SetTonemapPercentBrightPixelsshould be kept above. (default: 45)
- SetTonemapMinAvgLum  <float> (only in    ) )
- Sets custom tonemapping param (default: 3).[Clarify]
| 
 
 
 
 
 
 
 
 
 
 | 
See also
- trigger_tonemap
- HDR Lighting Settings
- BlackMesa XenEngine: Part2 – How a Frame is Rendered (Black Mesa developer describing how a frame is rendered, and discusses about the improvements for tone mapping.)




































