Env tonemap controller: Difference between revisions
Jump to navigation
Jump to search

Note:
Black Mesa use upgraded tonemapping with bloom which use a modified version of the Reinhard filter (in the game it is called next
Source Engine games. Old bloom and HDR still can be enabled with
Important:If this entity is not in a map -
Black Mesa will be broken if 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.
(Better document input quirks) |
(cleanup, non valve games kio put inside expand boxes) |
||
Line 5: | Line 5: | ||
{{note|{{bms|4}} use upgraded tonemapping with bloom which use a modified version of the Reinhard filter (in the game it is called next <code>Next Generation Bloom</code>, or <code>Next Gen Bloom</code> for short). Because of this, the results are very different from other {{Source|4|nt=1}} games. Old bloom and [[HDR]] still can be enabled with <code>mat_bloom_nextgen 1</code>.}} | {{note|{{bms|4}} use upgraded tonemapping with bloom which use a modified version of the Reinhard filter (in the game it is called next <code>Next Generation Bloom</code>, or <code>Next Gen Bloom</code> for short). Because of this, the results are very different from other {{Source|4|nt=1}} games. Old bloom and [[HDR]] still can be enabled with <code>mat_bloom_nextgen 1</code>.}} | ||
{{important|If this entity is not in a map - <code>Next Gen Bloom</code> from {{bms|4}} will be broken if 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 {{bms|4}} multiplayer. | {{important|If this entity is not in a map - <code>Next Gen Bloom</code> from {{bms|4}} will be broken if 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 {{bms|4}} multiplayer. | ||
{{Expand|title=Comparison| | |||
<br> | <br> | ||
<gallery mode=packed heights=320px> | <gallery mode=packed heights=320px> | ||
Line 10: | Line 11: | ||
File:yetonmap.jpg| thumb | left | 510px | This is how HDR looks like the game in a dedicated server if [[env_tonemap_controller]] is in the map. | File:yetonmap.jpg| thumb | left | 510px | This is how HDR looks like the game in a dedicated server if [[env_tonemap_controller]] is in the map. | ||
</gallery> | </gallery> | ||
}} | }}}} | ||
==Flags== | ==Flags== | ||
{{fl|1|Master (Has priority if multiple <code>env_tonemap_controller</code> entities exist) {{L4D add}}}} | {{fl|1|Master (Has priority if multiple <code>env_tonemap_controller</code> entities exist) {{L4D add}}}} | ||
Line 17: | Line 17: | ||
==Keyvalues== | ==Keyvalues== | ||
{{KV Targetname}} | {{KV Targetname}} | ||
{{Expand|title={{Bms|4}} only Keyvalues| | |||
{{KV|bUseNextGenBloom|intn=bUseNextGenBloom|choices| | {{KV|bUseNextGenBloom|intn=bUseNextGenBloom|choices| | ||
:*0: NO | :*0: NO | ||
:*1: YES | :*1: YES | ||
}} | |||
{{KV|bUseCusBloomNG_Threshold|intn=bUseCusBloomNG_Threshold|choices| | {{KV|bUseCusBloomNG_Threshold|intn=bUseCusBloomNG_Threshold|choices| | ||
:*0: NO | :*0: NO | ||
:*1: YES | :*1: YES | ||
}} | |||
{{Important|Most new {{Bms|4}} keyvalues and I/O doesn't work if this keyvalue use choice <code>NO</code>.}} | {{Important|Most new {{Bms|4}} keyvalues and I/O doesn't work if this keyvalue use choice <code>NO</code>.}} | ||
{{expand|title=Examples| | {{expand|title=Examples| | ||
Line 35: | Line 36: | ||
{{KV|fCusBloomNG_Threshold|intn=fCusBloomNG_Threshold|float|Threshold for bright pass filter. Determines the influence of tonemapping; with high values, only brightest parts of frame will be bloomed. | {{KV|fCusBloomNG_Threshold|intn=fCusBloomNG_Threshold|float|Threshold for bright pass filter. Determines the influence of tonemapping; with high values, only brightest parts of frame will be bloomed. | ||
:{{note|The default value from [[fgd]] is 1, which is incorrect. The default value is 0.1.}} | :{{note|The default value from [[fgd]] is 1, which is incorrect. The default value is 0.1.}} | ||
:{{note|A value of 0 means all pixels contribute to bloom, and is considered the most physically accurate setting.}} | :{{note|A value of 0 means all pixels contribute to bloom, and is considered the most physically accurate setting.}}}} | ||
{{KV|bUseCusBloomNG_tintExponent|intn=bUseCusBloomNG_tintExponent|choices| | {{KV|bUseCusBloomNG_tintExponent|intn=bUseCusBloomNG_tintExponent|choices| | ||
:*0: NO | :*0: NO | ||
:*1: YES | :*1: YES | ||
}} | |||
{{KV|m_fCustomBloomNextGen_r|intn=m_fCustomBloomNextGen_r|float|Determines the influence for reder tones in frame. | {{KV|m_fCustomBloomNextGen_r|intn=m_fCustomBloomNextGen_r|float|Determines the influence for reder tones in frame. | ||
:{{note|The default value from [[fgd]] is 1, which is incorrect. The default value is 0.25.}} | :{{note|The default value from [[fgd]] is 1, which is incorrect. The default value is 0.25.}}}} | ||
{{KV|m_fCustomBloomNextGen_g|intn=m_fCustomBloomNextGen_g|float|Determines the influence for greener tones in frame. | {{KV|m_fCustomBloomNextGen_g|intn=m_fCustomBloomNextGen_g|float|Determines the influence for greener tones in frame. | ||
:{{note|The default value from [[fgd]] is 1, which is incorrect. The default value is 0.25.}} | :{{note|The default value from [[fgd]] is 1, which is incorrect. The default value is 0.25.}}}} | ||
{{KV|m_fCustomBloomNextGen_b|intn=m_fCustomBloomNextGen_b|float|Determines the influence for bluer tones in frame. | {{KV|m_fCustomBloomNextGen_b|intn=m_fCustomBloomNextGen_b|float|Determines the influence for bluer tones in frame. | ||
:{{note|The default value from [[fgd]] is 1, which is incorrect. The default value is 0.25.}} | :{{note|The default value from [[fgd]] is 1, which is incorrect. The default value is 0.25.}}}} | ||
{{KV|m_fCusBloomNG_exponent|intn=m_fCusBloomNG_exponent|float|Determines the tightness of the bloom. | {{KV|m_fCusBloomNG_exponent|intn=m_fCusBloomNG_exponent|float|Determines the tightness of the bloom. | ||
:{{note|The default value from [[fgd]] is 1, which is incorrect. The default value is 2.2.}} | :{{note|The default value from [[fgd]] is 1, which is incorrect. The default value is 2.2.}}}} | ||
}} | |||
==Inputs== | ==Inputs== | ||
Line 64: | Line 66: | ||
{{IO|SetTonemapPercentTarget|param=float|only={{l4d2}} {{csgo}}|Sets the brightness that the percentage of pixels defined by <code>SetTonemapPercentBrightPixels</code> should be kept above. (default: 45)}} | {{IO|SetTonemapPercentTarget|param=float|only={{l4d2}} {{csgo}}|Sets the brightness that the percentage of pixels defined by <code>SetTonemapPercentBrightPixels</code> should be kept above. (default: 45)}} | ||
{{IO|SetTonemapMinAvgLum|param=float|only={{l4d2}} {{csgo}}|Sets custom tonemapping param (default: 3).{{clarify}}}} | {{IO|SetTonemapMinAvgLum|param=float|only={{l4d2}} {{csgo}}|Sets custom tonemapping param (default: 3).{{clarify}}}} | ||
{{IO|InputSetBloomNxtGen_Threshold|param=float|Sets the influence of tonemapping; with high values, only brightest parts of frame will be bloomed. | {{Expand|title={{Bms|4}} only Inputs| | ||
{{IO|InputSetBloomNxtGen_Threshold|param=float|Sets the influence of tonemapping; with high values, only brightest parts of frame will be bloomed.}} | |||
{{expand|title=An example of what it does.|margin_left=2em| | {{expand|title=An example of what it does.|margin_left=2em| | ||
<br> | <br> | ||
Line 72: | Line 75: | ||
</gallery> | </gallery> | ||
}} | }} | ||
{{IO|InputSetBloomNxtGen_TintR|param=float|Sets the influence value for redder tones in frame. | {{IO|InputSetBloomNxtGen_TintR|param=float|Sets the influence value for redder tones in frame.}} | ||
{{expand|title=An example of what it does.|margin_left=2em| | {{expand|title=An example of what it does.|margin_left=2em| | ||
<br> | <br> | ||
Line 80: | Line 83: | ||
</gallery> | </gallery> | ||
}} | }} | ||
{{IO|InputSetBloomNxtGen_TintG|param=float|Sets the influence value for greener tones in frame. | {{IO|InputSetBloomNxtGen_TintG|param=float|Sets the influence value for greener tones in frame.}} | ||
{{expand|title=An example of what it does.|margin_left=2em| | {{expand|title=An example of what it does.|margin_left=2em| | ||
<br> | <br> | ||
Line 88: | Line 91: | ||
</gallery> | </gallery> | ||
}} | }} | ||
{{IO|InputSetBloomNxtGen_TintB|param=float|Sets the influence value for bluer tones in frame. | {{IO|InputSetBloomNxtGen_TintB|param=float|Sets the influence value for bluer tones in frame.}} | ||
{{expand|title=An example of what it does.|margin_left=2em| | {{expand|title=An example of what it does.|margin_left=2em| | ||
<br> | <br> | ||
Line 96: | Line 99: | ||
</gallery> | </gallery> | ||
}} | }} | ||
{{IO|InputSetBloomNxtGen_Exponent|param=float|Sets the brightness of the bloom. | {{IO|InputSetBloomNxtGen_Exponent|param=float|Sets the brightness of the bloom.}} | ||
{{expand|title=An example of what it does.|margin_left=2em| | {{expand|title=An example of what it does.|margin_left=2em| | ||
<br> | <br> | ||
Line 103: | Line 106: | ||
File:BloomE1.png| frame | left | 510px | 0.5 | File:BloomE1.png| frame | left | 510px | 0.5 | ||
</gallery> | </gallery> | ||
}} | |||
}} | }} | ||
Revision as of 05:41, 16 May 2024


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).
![]() |
---|
CEnvTonemapController |
![]() |


Next Generation Bloom
, or Next Gen Bloom
for short). Because of this, the results are very different from other 
mat_bloom_nextgen 1
.
Next Gen Bloom
from 

|
Flags
- Master (Has priority if multiple
env_tonemap_controller
entities exist) Template:L4D add : [1]
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
![]() ![]() NO .
|
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
mat_hdr_tonemapscale
on 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 10
would 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 ?]
- 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.
- SetAutoExposureMax <float >
- Sets a custom tonemap auto exposure maximum.
- SetBloomScale <float >
- Sets a custom bloom scale.
- SetBloomScaleRange <vector > !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
SetBloomScale
- 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
. [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
SetTonemapPercentBrightPixels
should be kept above. (default: 45)
- SetTonemapMinAvgLum <float > (only in
)
- Sets custom tonemapping param (default: 3).[Clarify]
|
See also
- 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.)