Postprocess controller: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Updated information and revised article; removed stub status)
(According to "ent_info player" in CS:GO, there is no "SetPostProcessController" input. If this input exists in other games, it should be specified.)
Line 5: Line 5:
This entity controls a bunch of cinematic post-processing effects primarily used in the {{Game link|Left 4 Dead series}}. Many of the effects were designed specifically to supplement Left 4 Dead's "filmic" art direction, such as film grain or local contrast.
This entity controls a bunch of cinematic post-processing effects primarily used in the {{Game link|Left 4 Dead series}}. Many of the effects were designed specifically to supplement Left 4 Dead's "filmic" art direction, such as film grain or local contrast.


Multiple controllers can exist in the map at the same time and each controller be applied on a player-by-player basis, with effects fading between each other automatically. A <code>postprocess_controller</code> can be enabled on a player by using the <code>SetPostProcessController</code> input, the "Master" spawnflag, or the {{ent|fog_volume}} entity.
Multiple controllers can exist in the map at the same time and each controller be applied on a player-by-player basis, with effects fading between each other automatically. A <code>postprocess_controller</code> can be enabled on a player by using the "Master" spawnflag or the {{ent|fog_volume}} entity.


Other post-processing effects, such as [[color_correction|Color correction]], are controlled by other entities. (e.g. {{ent|color_correction (entity)}} or {{ent|env_dof_controller}})
Other post-processing effects, such as [[color_correction|Color correction]], are controlled by other entities. (e.g. {{ent|color_correction (entity)}} or {{ent|env_dof_controller}})

Revision as of 22:03, 5 June 2022

Template:Base point

Entity description

Postprocess controller.png

This entity controls a bunch of cinematic post-processing effects primarily used in the Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series . Many of the effects were designed specifically to supplement Left 4 Dead's "filmic" art direction, such as film grain or local contrast.

Multiple controllers can exist in the map at the same time and each controller be applied on a player-by-player basis, with effects fading between each other automatically. A postprocess_controller can be enabled on a player by using the "Master" spawnflag or the fog_volume entity.

Other post-processing effects, such as Color correction, are controlled by other entities. (e.g. color_correction (entity) or env_dof_controller)

Note.pngNote:In Left 4 Dead seriesLeft 4 Dead series, It may be necessary to have at least one fog_volume in the map in order for a master postprocess_controller to take effect.
Icon-Bug.pngBug:None of these effects work in Portal 2 except for vignette.  [todo tested in ?]

Effects

Film grain

Film grain on and off. Click for detail.

Film grain heightens the frightening feeling of dark and shadowy environments. This helps make the cinematic experience as gritty and authentic as possible and effectively implies a greater detail to the surrounding darkness than is actually there. The technique avoids applying film grain uniformly as it causes players to get tired of it fast. Instead, film grain is prevalent in very dark areas with lots of shadows. The brighter an area gets, the more the grain fades into the background, causing it to disappear entirely in very bright areas.

This effect was used by game code in Left 4 Dead Left 4 Dead , but it wasn't added to postprocess_controller until Left 4 Dead 2 Left 4 Dead 2 .

Vignette

Vignette on and off. Click for detail.

Vignetting is a lens artifact you'll often see in lower budget films where cheap cameras were used: specifically, dark edges seeping in around the edges of the screen. Even still, it usually needs to be applied sparingly. As shown in the example picture, the effect was only applied around all of the top edges of the screen, so a player wouldn't feel like they were looking through a telescope. A little goes a long way — playtesters don't feel like it intrudes their view at all. It also does a good job of softening the top edges, focusing the gameplay downwards to the center of the screen, where you want a player to look.

Confirm:Left 4 Dead 2 Left 4 Dead 2 seems to have changed this into a full vignette effect and split top-of-screen vignette into a different effect; later games can only use full vignette.

Local contrast

Local contrast on and off. Click for detail.

Local contrast is a technique borrowed from photo retouching, where the contrast is adjusted specifically on areas of an image that contain a high level of visual detail. This technique helps make the visuals sharper and more focused. It is a convenient way to effectively imitate the feeling of an adrenaline rush or near-death experience. The effect gives the player a sense of heightened perspective, and is a great subliminal way to foreshadow imminent danger.

Depth and full screen blur

Depth and full screen blur apply a blurring effect to certain parts of the screen. Depth blur allows blur to be applied at a certain focal distance and screen blur applies the effect across the whole screen.

This effect was used by game code in Left 4 Dead Left 4 Dead , but it wasn't added to postprocess_controller until Alien Swarm Alien Swarm .

Note.pngNote:Blur can cancel out an active vignette effect.
Todo: Example picture and full explanation.

Fade out/Fade to black

"Fade to black" simply fades the screen into complete darkness. Normally, env_fade (which provides more control over the fade's properties) would be used for fading the screen, but some post-processing effects are still applied or do not disappear smoothly when env_fade is used. The "Fade to black" effect is applied after all of the other effects, allowing them to fade with the rest of the screen. This is recommended if the other effects controlled by this entity are used often and should not appear in intro/outro fades.

Keyvalues

Fade-in time ([todo internal name (i)]) <float>
Fade-in time
Local contrast strength [-1..x] ([todo internal name (i)]) <float>
Local contrast strength
Local contrast edge strength [0..1] ([todo internal name (i)]) <float>
Local contrast edge strength
Vignette start distance [0..1] ([todo internal name (i)]) <float>
Vignette start distance
Vignette end distance [0..x] ([todo internal name (i)]) <float>
Vignette end distance
Vignette blur strength [0..1] ([todo internal name (i)]) <float>
Vignette blur strength
Fade to black strength [0..1] ([todo internal name (i)]) <float>
Fade to black strength
Film grain strength [0..x] ([todo internal name (i)]) <float> (in all games since Left 4 Dead 2)
Film grain strength
Top-of-screen vignette strength [0..1] ([todo internal name (i)]) <float> (only in Left 4 Dead 2)
Top-of-screen vignette strength
Depth-blur focal plane distance [0..1] ([todo internal name (i)]) <float> (in all games since Alien Swarm)
Depth-blur focal plane distance (in dest alpha space [0,1], not world units)
Depth-blur effect strength [0..x] ([todo internal name (i)]) <float> (in all games since Alien Swarm)
Depth-blur effect strength
Full-screen blur strength [0..1] ([todo internal name (i)]) <float> (in all games since Alien Swarm)
Full-screen blur strength


Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Flags

Master : [1]
Has priority if multiple postprocess_controllers exist

Inputs

SetLocalContrastStrength <floatRedirectInput/float>
Set the local contrast strength.
SetLocalContrastEdgeStrength <floatRedirectInput/float>
Set the local contrast strength at the edge of the screen (controlled by vignette).
SetVignetteStart <floatRedirectInput/float>
Set the vignette start distance (from screen center).
SetVignetteEnd <floatRedirectInput/float>
Set the vignette end distance.
SetVignetteBlurStrength <floatRedirectInput/float>
Set the strength of the desaturated blur on the vignette.
SetFadeToBlackStrength <floatRedirectInput/float>
Set the fadeout strength.
SetDepthBlurFocalDistance <floatRedirectInput/float> (in all games since Alien Swarm)
Set the focal distance of the depth blur effect (in dest alpha space [0,1], not world units).
SetDepthBlurStrength <floatRedirectInput/float> (in all games since Alien Swarm)
Set the depth blur effect strength.
SetScreenBlurStrength <floatRedirectInput/float> (in all games since Alien Swarm)
Set the screen blur effect strength.
SetFilmGrainStrength <floatRedirectInput/float> (in all games since Alien Swarm)
Set the film grain effect strength.
SetFadeTime <floatRedirectInput/float> (in all games since Alien Swarm)
Set the fade time between post process settings.


Outputs

See also

External links

L4D Art Direction, Part 1: Filmic Effects - Valve blog regarding film effects in Left 4 Dead