Search public documentation:
Document Changelog: Created by Daniel Wright.
This document is geared towards programmers, it describes how the major features of the Unreal Post Process system are designed and implemented. See the Post Process Editor User Guide page for information on working with Post Process Effects in UnrealEd.
The default post process chain that will be used in-game is specified by a setting in the Engine.ini:
When running the game with cooked data, make sure the package that contains the PostProcessChain is specified in the Engine.StartupPackages section in the Engine.ini file. Since a PostProcessChain often isn't referenced by other content or script code, it must be explicitly included by the .ini settings:
Post process effects are controlled by settings from one of following three sources (not including game code):
- Effect node properties in the PostProcessChain (if "Use World Settings?" is FALSE)
- PostProcessVolume properties (if "Use World Settings?" is TRUE and the player is inside a PP volume)
- Default Post Process Settings in WorldInfo (if "Use World Settings?" is TRUE and the player is not inside a PP volume)
On Xbox, motion blur is handled by the UberPostProcessEffect. All motion blur settings are taken from the UberPostProcessEffect node (depending on its "Use World Settings?" checkbox) and any MotionBlurEffect node in the PostProcessChain is ignored. On other platforms, motion blur is handled by a specific MotionBlurEffect node in the PostProcessChain. All motion blur settings are taken from the MotionBlurEffect node (depending on its "Use World Settings?" checkbox) and any motion blur settings in the UberPostProcessEffect node is ignored.
At runtime, prost process effects can be modified through UnrealScript or native code using the
PostProcessManagerclass. In this case, game script code often replaces the entire PostProcessChain and modifies MaterialInstanceConstant values in a MaterialEffect for a custom look. It can be a good idea to set "Use World Settings?" (
bUseWorldSettings) to FALSE for these game-controlled effect nodes to avoid conflicts with any PostProcessVolume settings.
The process for creating a new post process effect is pretty simple. You need to create a new class derived from UPostProcessEffect which creates a new scene proxy derived from FPostProcessSceneProxy. Then you also need to create your global shaders that will be used for rendering that proxy. You can pretty much just cut and paste from UMotionBlurEffect, FMotionBlurProcessSceneProxy, FMotionBlurPixelShader, FMotionBlurVertexShader to get you started.
Often it is necessary to change certain post process effects while the game is running based on some gameplay criteria. For example, in Gears of War the post process settings were changed whenver the in-game pause menu came up so that the screen could be blurred and to give the scene a more menacing red tone. By using the
ULocalPlayer.bOverridePostProcessSettingsproperty you can override what post process values are currently being used for the player. Then, the player's
FCurrentPostProcessVolumeInfo CurrentPPInfostruct gets filled in with the new desired values and the interpolation times to transition to these values.
Here are some useful techniques for tuning post process effects. Console Commands, such as
SHOW POSTPROCESS. Additionally, there is the following:
SET <EFFECT> bShowInGame FALSEWhere EFFECT can be either
Screen Space Ambient Occlusion (SSAO) was originally introduced; and then later improved upon. Visit the Improving SSAO page for information about the proposed changes.