UDN
Search public documentation:

DevelopmentKitGemsControllingPostProcessEffects
日本語訳
中国翻译
한국어

Interested in the Unreal Engine?
Visit the Unreal Technology site.

Looking for jobs and company info?
Check out the Epic games site.

Questions about support via UDN?
Contact the UDN Staff

UE3 Home > Unreal Development Kit Gems > Controlling Post Processing via Kismet or Unrealscript
UE3 Home > Kismet Visual Scripting > Controlling Post Processing via Kismet or Unrealscript
UE3 Home > Post Process Effects > Controlling Post Processing via Kismet or Unrealscript

Controlling Post Processing via Kismet or Unrealscript


Last tested against UDK Mar, 2011
PC compatible

Overview


Unreal Engine 3 allows you to adjust post processing dynamically through Unrealscript. However, there aren't pre existing Kismet nodes which allow level designers to adjust post processing dynamically. You could also use this gem to construct your own Kismet nodes or incorporate the post process effect script so you can adjust post processing based on other triggers (such as depth of field when zooming with a weapon).

Related topics

Set Ambient Occlusion Effect Properties Kismet Sequence Action


This Kismet action allows you to adjust the properties of the ambient occlusion post process effect node(s) within the post process chain.

  • OcclusionColor - The color that will replace scene color where there is a lot of occlusion.
  • OcclusionPower - Power to apply to the calculated occlusion value. Higher powers result in more contrast, but will need other factors like OcclusionScale to be tweaked as well.
  • OcclusionScale - Scale to apply to the calculated occlusion value.
  • OcclusionBias - Bias to apply to the calculated occlusion value.
  • MinOcclusion - Minimum occlusion value after all other transforms have been applied.
  • bAngleBasedSSAO - SSAO quality improvements, less noise, more detail, no darkening of flat surfaces, no overbright on convex, parameter retweak needed.
  • OcclusionRadius - Distance to check around each pixel for occluders, in world units.
  • OcclusionQuality - Quality of the ambient occlusion effect. Low quality gives the best performance and is appropriate for gameplay. Medium quality smooths noise between frames at a slightly higher performance cost. High quality uses extra samples to preserve detail.
  • OcclusionFadeoutMinDistance - Distance at which to start fading out the occlusion factor, in world units. This is useful for hiding distant artifacts on skyboxes.
  • OcclusionFadeoutMaxDistance - Distance at which the occlusion factor should be fully faded, in world units.
  • HaloDistanceThreshold - Distance in front of a pixel that an occluder must be to be considered a different object, in world units. This threshold is used to identify halo regions around nearby objects, for example a first person weapon.
  • HaloDistanceScale - Scale factor to increase HaloDistanceThreshold for distant pixels. A value of .001 would result in HaloDistanceThreshold being 1 unit larger at a distance of 1000 world units.
  • HaloOcclusion - Occlusion factor to assign to samples determined to be contributing to a halo. 0 would result in full occlusion for that sample, increasing values map to quadratically decreasing occlusion values.
  • EdgeDistanceThreshold - Difference in depth that two pixels must be to be considered an edge, and therefore not blurred across, in world units.
  • EdgeDistanceScale - Scale factor to increase EdgeDistanceThreshold for distant pixels. A value of .001 would result in EdgeDistanceThreshold being 1 unit larger at a distance of 1000 world units.
  • FilterDistanceScale - Distance in world units which should map to the kernel size in screen space. This is useful to reduce filter kernel size for distant pixels and keep detail, at the cost of leaving more noise in the result.
  • HistoryConvergenceTime - Time in which the occlusion history should approximately converge. Longer times (.5s) allow more smoothing between frames and less noise but history streaking is more noticeable. 0 means the feature is off (less GPU performance and memory overhead).
  • HistoryWeightConvergenceTime - Time in which the weight history should approximately converge.

SetAmbientOcclusionEffectPropertiesKismet.jpg

Kismet Properties

SetAmbientOcclusionEffectPropertiesKismetProperties.jpg

Unrealscript

SeqAct_SetAmbientOcclusionEffectProperties.uc
class SeqAct_SetAmbientOcclusionEffectProperties extends SeqAct_SetPostProcessEffectProperties
  DependsOn(AmbientOcclusionEffect);

var() LinearColor OcclusionColor;
var() float OcclusionPower<UIMin=0.1|UIMax=20.0>;
var() float OcclusionScale<UIMin=0.0|UIMax=10.0>;
var() float OcclusionBias<UIMin=-1.0|UIMax=4.0>;
var() float MinOcclusion;
var() bool bAngleBasedSSAO;
var() float OcclusionRadius<UIMin=0.0|UIMax=256.0>;
var() EAmbientOcclusionQuality OcclusionQuality;
var() float OcclusionFadeoutMinDistance;
var() float OcclusionFadeoutMaxDistance;
var() float HaloDistanceThreshold;
var() float HaloDistanceScale;
var() float HaloOcclusion;
var() float EdgeDistanceThreshold;
var() float EdgeDistanceScale;
var() float FilterDistanceScale;
var() float HistoryConvergenceTime;
var() float HistoryWeightConvergenceTime;

event Activated()
{
  local array<PostProcessEffect> PostProcessEffects;
  local int i;
  local AmbientOcclusionEffect AmbientOcclusionEffect;

  GetPostProcessEffects(PostProcessEffects, class'AmbientOcclusionEffect');

  if (PostProcessEffects.Length > 0)
  {
    for (i = 0; i < PostProcessEffects.length; ++i)
    {
      AmbientOcclusionEffect = AmbientOcclusionEffect(PostProcessEffects[i]);

      if (AmbientOcclusionEffect != None)
      {
        AmbientOcclusionEffect.OcclusionColor = OcclusionColor;
        AmbientOcclusionEffect.OcclusionPower = OcclusionPower;
        AmbientOcclusionEffect.OcclusionScale = OcclusionScale;
        AmbientOcclusionEffect.OcclusionBias = OcclusionBias;
        AmbientOcclusionEffect.MinOcclusion = MinOcclusion;
        AmbientOcclusionEffect.bAngleBasedSSAO = bAngleBasedSSAO;
        AmbientOcclusionEffect.OcclusionRadius = OcclusionRadius;
        AmbientOcclusionEffect.OcclusionQuality = OcclusionQuality;
        AmbientOcclusionEffect.OcclusionFadeoutMinDistance = OcclusionFadeoutMinDistance;
        AmbientOcclusionEffect.OcclusionFadeoutMaxDistance = OcclusionFadeoutMaxDistance;
        AmbientOcclusionEffect.HaloDistanceThreshold = HaloDistanceThreshold;
        AmbientOcclusionEffect.HaloDistanceScale = HaloDistanceScale;
        AmbientOcclusionEffect.HaloOcclusion = HaloOcclusion;
        AmbientOcclusionEffect.EdgeDistanceThreshold = EdgeDistanceThreshold;
        AmbientOcclusionEffect.EdgeDistanceScale = EdgeDistanceScale;
        AmbientOcclusionEffect.FilterDistanceScale = FilterDistanceScale;
        AmbientOcclusionEffect.HistoryConvergenceTime = HistoryConvergenceTime;
        AmbientOcclusionEffect.HistoryWeightConvergenceTime = HistoryWeightConvergenceTime;
      }
    }
  }
}

defaultproperties
{
  ObjName="Set Ambient Occlusion Effect Properties"
  ObjCategory="Post Process"

  VariableLinks(0)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Occlusion Power",PropertyName=OcclusionPower)
  VariableLinks(1)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Occlusion Scale",PropertyName=OcclusionScale)
  VariableLinks(2)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Occlusion Bias",PropertyName=OcclusionBias)
  VariableLinks(3)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Min Occlusion",PropertyName=MinOcclusion)
  VariableLinks(4)=(ExpectedType=class'SeqVar_Bool',bHidden=true,LinkDesc="Angle Based SSAO",PropertyName=bAngleBasedSSAO)
  VariableLinks(5)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Occlusion Radius",PropertyName=OcclusionRadius)
  VariableLinks(6)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Occlusion Fadeout Min Distance",PropertyName=OcclusionFadeoutMinDistance)
  VariableLinks(7)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Occlusion Fadeout Max Distance",PropertyName=OcclusionFadeoutMaxDistance)
  VariableLinks(8)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Halo Distance Threshold",PropertyName=HaloDistanceThreshold)
  VariableLinks(9)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Halo Distance Scale",PropertyName=HaloDistanceScale)
  VariableLinks(10)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Halo Occlusion",PropertyName=HaloOcclusion)
  VariableLinks(11)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Edge Distance Threshold",PropertyName=EdgeDistanceThreshold)
  VariableLinks(12)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Edge Distance Scale",PropertyName=EdgeDistanceScale)
  VariableLinks(13)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Filter Distance Scale",PropertyName=FilterDistanceScale)
  VariableLinks(14)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="History Convergence Time",PropertyName=HistoryConvergenceTime)
  VariableLinks(15)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="History Weight Convergence Time",PropertyName=HistoryWeightConvergenceTime)

  OcclusionColor=(R=0.0,G=0.0,B=0.0,A=1.0)
  OcclusionPower=4.0
  OcclusionScale=20.0
  OcclusionBias=0
  MinOcclusion=.1
  OcclusionRadius=25.0
  OcclusionQuality=AO_Medium
  OcclusionFadeoutMinDistance=4000.0
  OcclusionFadeoutMaxDistance=4500.0
  HaloDistanceThreshold=40.0
  HaloDistanceScale=.1
  HaloOcclusion=.04
  EdgeDistanceThreshold=10.0
  EdgeDistanceScale=.003
  FilterDistanceScale=10.0
  HistoryConvergenceTime=0
  HistoryWeightConvergenceTime=.07
}

Related topics

Set Blur Effect Properties Kismet Sequence Action


This Kismet action allows you to adjust the properties of the blur post process effect node(s) within the post process chain.

  • BlurKernelSize - Distance to blur in pixels.

SetBlurEffectPropertiesKismet.jpg

Kismet Properties

SetBlurEffectPropertiesKismetProperties.jpg

Unrealscript

SeqAct_SetBlurEffectProperties.uc
class SeqAct_SetBlurEffectProperties extends SeqAct_SetPostProcessEffectProperties
  DependsOn(BlurEffect);

var() float BlurKernelSize;

event Activated()
{
  local array<PostProcessEffect> PostProcessEffects;
  local int i;
  local BlurEffect BlurEffect;

  GetPostProcessEffects(PostProcessEffects, class'BlurEffect');

  if (PostProcessEffects.Length > 0)
  {
    for (i = 0; i < PostProcessEffects.length; ++i)
    {
      BlurEffect = BlurEffect(PostProcessEffects[i]);

      if (BlurEffect != None)
      {
        BlurEffect.BlurKernelSize = BlurKernelSize;
      }
    }
  }
}

defaultproperties
{
  ObjName="Set Blur Effect Properties"
  ObjCategory="Post Process"

  VariableLinks(0)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Blur Kernel Size",PropertyName=BlurKernelSize)
}

Related topics

Set DOF and Bloom Effect Properties Kismet Sequence Action


This Kismet action allows you to adjust the properties of the depth of field and bloom post process effect node(s) within the post process chain.

  • FalloffExponent - Exponent to apply to blur amount after it has been normalized to [0,1].
  • BlurKernelSize - Affects the radius of the DepthOfField bohek / how blurry the scene gets.
  • MaxNear - Value between 0 and 1 for clamping how much blur to apply to items in front of the focus plane.
  • Min - Value between 0 and 1 for clamping how much blur to apply.
  • MaxFar - Value between 0 and 1 for clamping how much blur to apply to items behind the focus plane
  • FocusType - Controls how the focus point is determined.
  • FocusInnerRadius - Inner focus radius.
  • FocusDistance - Used when FOCUS_Distance is enabled.
  • FocusPosition - Used when FOCUS_Position is enabled.
  • BloomScale - A scale applied to blooming colors.
  • BloomThreshold - Any component of a pixel's color must be larger than this to contribute bloom.
  • BloomTint - Multiplies against the bloom color.
  • BloomScreenBlendThreshold - Scene color luminance must be less than this to receive bloom. This behaves like Photoshop's screen blend mode and prevents over-saturation from adding bloom to already bright areas. The default value of 1 means that a pixel with a luminance of 1 won't receive any bloom, but a pixel with a luminance of .5 will receive half bloom.
  • BlurBloomKernelSize - The radius of the bloom effect.
  • DepthOfFieldType - Allows to specify the depth of field type. Choose depending on performance and quality needs.
    • SimpleDOF - This blurs the out of focus content and recombines that with the unblurred scene (fast, almost constant speed).
    • ReferenceDOF - This makes use of dynamic branching in the pixel shader and features circular Bokeh shape effects (slow for big Kernel Size).
    • BokehDOF - allows to specify a Bokeh texture and a bigger radius (requires D3D11, slow when using a lot of out of focus content)
  • DepthOfFieldQuality - Adjust the depth of field quality which can help with performance.
  • BokehTexture - Used for the BokehDOF is enabled.

SetDOFAndBloomEffectPropertiesKismet.jpg

Kismet Properties

SetDOFAndBloomEffectPropertiesKismetProperties.jpg

Unrealscript

SeqAct_SetDOFAndBloomEffectProperties.uc
class SeqAct_SetDOFAndBloomEffectProperties extends SeqAct_SetDOFEffectProperties
  DependsOn(DOFAndBloomEffect);

var() float BloomScale;
var() float BloomThreshold;
var() color BloomTint;
var() float BloomScreenBlendThreshold;
var() float BlurBloomKernelSize;
var() EDOFType DepthOfFieldType;
var() EDOFQuality DepthOfFieldQuality;
var() Texture2D BokehTexture;

function SetProperties(PostProcessEffect PostProcessEffect)
{
  local DOFAndBloomEffect DOFAndBloomEffect;

  Super.SetProperties(PostProcessEffect);
  DOFAndBloomEffect = DOFAndBloomEffect(PostProcessEffect);

  if (DOFAndBloomEffect != None)
  {
    DOFAndBloomEffect.BloomScale = BloomScale;
    DOFAndBloomEffect.BloomThreshold = BloomThreshold;
    DOFAndBloomEffect.BloomTint = BloomTint;
    DOFAndBloomEffect.BloomScreenBlendThreshold = BloomScreenBlendThreshold;
    DOFAndBloomEffect.BlurBloomKernelSize = BlurBloomKernelSize;
    DOFAndBloomEffect.DepthOfFieldType = DepthOfFieldType;
    DOFAndBloomEffect.DepthOfFieldQuality = DepthOfFieldQuality;
    DOFAndBloomEffect.BokehTexture = BokehTexture;
  }
}

defaultproperties
{
  ObjName="Set DOF And Bloom Effect Properties"
  ObjCategory="Post Process"

  BloomScale=1.0
  BloomThreshold=1.0
  BloomTint=(R=255,G=255,B=255)
  BloomScreenBlendThreshold=10
  BlurKernelSize=16.0
  BlurBloomKernelSize=16.0

  VariableLinks(8)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Bloom Scale",PropertyName=BloomScale)
  VariableLinks(9)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Bloom Threshold",PropertyName=BloomThreshold)
  VariableLinks(10)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Bloom Screen Blend Threshold",PropertyName=BloomScreenBlendThreshold)
  VariableLinks(11)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Blur Bloom Kernel Size",PropertyName=BlurBloomKernelSize)
}

Related topics

Set DOF, Bloom and Motion Blur Properties Kismet Sequence Action


This Kismet action allows you to adjust the properties of the depth of field, bloom and motion blur post process effect node(s) within the post process chain. This has the same properties as the "Set DOF and Bloom Effect Properties" kismet action.

  • MaxVelocity - Maximum blur velocity amount. This is a clamp on the amount of blur.
  • MotionBlurAmount - This is a scale that could be considered as the "sensitivity" of the blur.
  • FullMotionBlur - Whether everything (static/dynamic objects) should motion blur or not. If disabled, only moving objects may blur.
  • CameraRotationThreshold - Threshhold for when to turn off motion blur when the camera rotates swiftly during a single frame (in degrees).
  • CameraTranslationThreshold - Threshhold for when to turn off motion blur when the camera translates swiftly during a single frame (in world units).

SetDOFBloomAndMotionBlurEffectPropertiesKismet.jpg

Kismet Properties

SetDOFBloomAndMotionBlurEffectPropertiesKismetProperties.jpg

Unrealscript

SeqAct_SetDOFBloomMotionBlurEffect.uc
class SeqAct_SetDOFBloomMotionBlurEffect extends SeqAct_SetDOFAndBloomEffectProperties
  DependsOn(DOFBloomMotionBlurEffect);

var() float MaxVelocity;
var() float MotionBlurAmount;
var() bool FullMotionBlur;
var() float CameraRotationThreshold;
var() float CameraTranslationThreshold;

function SetProperties(PostProcessEffect PostProcessEffect)
{
  local DOFBloomMotionBlurEffect DOFBloomMotionBlurEffect;

  Super.SetProperties(PostProcessEffect);
  DOFBloomMotionBlurEffect = DOFBloomMotionBlurEffect(PostProcessEffect);

  if (DOFBloomMotionBlurEffect != None)
  {
    DOFBloomMotionBlurEffect.MaxVelocity = MaxVelocity;
    DOFBloomMotionBlurEffect.MotionBlurAmount = MotionBlurAmount;
    DOFBloomMotionBlurEffect.FullMotionBlur = FullMotionBlur;
    DOFBloomMotionBlurEffect.CameraRotationThreshold = CameraRotationThreshold;
    DOFBloomMotionBlurEffect.CameraTranslationThreshold = CameraTranslationThreshold;
  }
}

defaultproperties
{
  ObjName="Set DOF, Bloom and Motion Blur Effect Properties"
  ObjCategory="Post Process"

  MotionBlurAmount=0.5f
  MaxVelocity=1.0f
  FullMotionBlur=true
  CameraRotationThreshold=90.0f
  CameraTranslationThreshold=10000.0f

  VariableLinks(12)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Max Velocity",PropertyName=MaxVelocity)
  VariableLinks(13)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Motion Blur Amount",PropertyName=MotionBlurAmount)
  VariableLinks(14)=(ExpectedType=class'SeqVar_Bool',bHidden=true,LinkDesc="Full Motion Blur",PropertyName=FullMotionBlur)
  VariableLinks(15)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Camera Rotation Threshold",PropertyName=CameraRotationThreshold)
  VariableLinks(16)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Camera Translation Threshold",PropertyName=CameraTranslationThreshold)
}

Related topics

Set Material Effect Properties Kismet Sequence Action


This Kismet action allows you to adjust the properties of the material effect post process effect node(s) within the post process chain.

  • Material - Material to set for the post process effect.
  • Material Object - This can be set to either a material reference or material instance actor reference. The kismet node will appropriately find the material reference.

SetMaterialEffectPropertiesKismet.jpg

Kismet Properties

SetMaterialEffectPropertiesKismetProperties.jpg

Unrealscript

SeqAct_SetMaterialEffectProperties.uc
class SeqAct_SetMaterialEffectProperties extends SeqAct_SetPostProcessEffectProperties
  DependsOn(MaterialEffect);

var() MaterialInterface Material;
var Object ObjectReference;

event Activated()
{
  local array<PostProcessEffect> PostProcessEffects;
  local int i;
  local MaterialEffect MaterialEffect;
  local MaterialInterface MaterialInterface;
  local MaterialInstanceActor MaterialInstanceActor;

  GetPostProcessEffects(PostProcessEffects, class'MaterialEffect');

  if (PostProcessEffects.Length > 0)
  {
    for (i = 0; i < PostProcessEffects.length; ++i)
    {
      MaterialEffect = MaterialEffect(PostProcessEffects[i]);

      if (MaterialEffect != None)
      {
        if (ObjectReference != None)
        {
          MaterialInterface = MaterialInterface(ObjectReference);

          if (MaterialInterface != None)
          {
            MaterialEffect.Material = MaterialInterface;
          }
          else
          {
            MaterialInstanceActor = MaterialInstanceActor(ObjectReference);

            if (MaterialInstanceActor != None)
            {
              MaterialEffect.Material = MaterialInstanceActor.MatInst;
            }
          }
        }
        else
        {
          MaterialEffect.Material = Material;
        }
      }
    }
  }
}


defaultproperties
{
  ObjName="Set Material Effect Properties"
  ObjCategory="Post Process"

  VariableLinks(0)=(ExpectedType=class'SeqVar_Object',bHidden=true,LinkDesc="Material Object",PropertyName=ObjectReference)
}

Related topics

Set Motion Blur Effect Properties Kismet Sequence Action


This Kismet action allows you to adjust the properties of the motion blur effect post process effect node(s) within the post process chain.

  • MaxVelocity - Maximum blur velocity amount. This is a clamp on the amount of blur.
  • MotionBlurAmount - This is a scale that could be considered as the "sensitivity" of the blur.
  • FullMotionBlur - Whether everything (static/dynamic objects) should motion blur or not. If disabled, only moving objects may blur.
  • CameraRotationThreshold - Threshhold for when to turn off motion blur when the camera rotates swiftly during a single frame (in degrees).
  • CameraTranslationThreshold - Threshhold for when to turn off motion blur when the camera translates swiftly during a single frame (in world units).

SetMotionBlurEffectPropertiesKistmet.jpg

Kismet Properties

SetMotionBlurEffectPropertiesKistmetProperties.jpg

Unrealscript

SeqAct_SetMotionBlurEffectProperties.uc
class SeqAct_SetMotionBlurEffectProperties extends SeqAct_SetPostProcessEffectProperties
  DependsOn(MotionBlurEffect);

var() float MaxVelocity;
var() float MotionBlurAmount;
var() bool FullMotionBlur;
var() float CameraRotationThreshold;
var() float CameraTranslationThreshold;

event Activated()
{
  local array<PostProcessEffect> PostProcessEffects;
  local int i;
  local MotionBlurEffect MotionBlurEffect;

  GetPostProcessEffects(PostProcessEffects, class'MotionBlurEffect');

  if (PostProcessEffects.Length > 0)
  {
    for (i = 0; i < PostProcessEffects.length; ++i)
    {
      MotionBlurEffect = MotionBlurEffect(PostProcessEffects[i]);

      if (MotionBlurEffect != None)
      {
        MotionBlurEffect.MaxVelocity = MaxVelocity;
        MotionBlurEffect.MotionBlurAmount = MotionBlurAmount;
        MotionBlurEffect.FullMotionBlur = FullMotionBlur;
        MotionBlurEffect.CameraRotationThreshold = CameraRotationThreshold;
        MotionBlurEffect.CameraTranslationThreshold = CameraTranslationThreshold;
      }
    }
  }
}

defaultproperties
{
  ObjName="Set Motion Blur Effect Properties"
  ObjCategory="Post Process"

  MotionBlurAmount=0.5f
  MaxVelocity=1.0f
  FullMotionBlur=true
  CameraRotationThreshold=90.0f
  CameraTranslationThreshold=10000.0f

  VariableLinks(0)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Max Velocity",PropertyName=MaxVelocity)
  VariableLinks(1)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Motion Blur Amount",PropertyName=MotionBlurAmount)
  VariableLinks(2)=(ExpectedType=class'SeqVar_Bool',bHidden=true,LinkDesc="Full Motion Blur",PropertyName=FullMotionBlur)
  VariableLinks(3)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Camera Rotation Threshold",PropertyName=CameraRotationThreshold)
  VariableLinks(4)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Camera Translation Threshold",PropertyName=CameraTranslationThreshold)
}

Related topics

Set Uber Post Process Effect Properties Kismet Sequence Action


This Kismet action allows you to adjust the properties of the uber post process effect post process effect node(s) within the post process chain.

  • SceneShadows - Colorizes the shadows of the scene.
  • SceneHighLights - Colorizes the highlights of the scene.
  • SceneMidTones - Colorizes the mid tones of the scene.
  • SceneDesaturation - Desaturates the scene. 0 is no desaturation, 1 is full desaturate.
  • SceneColorize - Colorizes the entire scene.
  • TonemapperType - Allows to specify the tone mapper function which maps HDR colors into the LDR color range.
  • TonemapperRange - This tonemapper property allows to specify the HDR brightness value that is mapping to the maximum LDR value. Brighter values will be mapped to white (good values are in the range 2 to 16). Only affects the "Customizable" tonemapper.
  • ToeFactor - This tonemapper property allows to adjust the mapping of the darker colors (tonemapper toe). As the adjustment is independent per color channel it can introduce slight shifts color and saturation changes. Only affects the "Customizable" tonemapper. 0 produces a linear result, while 1 crushes the darks and produces a more filmic scene.
  • TonemapperScale - Scale the input for the tonemapper. Only used if a tonemapper is specified. 0 is black.
  • SoftEdgeKernelSize - The radius of the soft edge for motion blur. A value bigger than 0 enables the soft edge motion blur. The method improves motion blur by blurring the silhuette of moving objects. The method works in screen space. Therefore the performance of the method only depends on screen size, not on the object/vertex/triangle count.
  • bEnableImageGrain - Whether the image grain (noise) is enabled, to fight 8 bit quantization artifacts and to simulate film grain (scaled by SceneImageGrainScale).
  • SceneImageGrainScale - Image grain scale, only affects the darks.
  • Weight Small - To adjust the bloom to get an extra inner, more sharp glow. If this feature is used, it might costs additional performance depending on the bloom radius. However in some cases it might get faster as the bigger radius is done in lower resolution. The actual weight is computed as the ratio between all bloom weights.
  • Weight Medium - To adjust the bloom shape to reduce the extra inner and outer weight. However in some cases it might get faster as the bigger radius is done in lower resolution. The actual weight is computed as the ratio between all bloom weights.
  • Weight Large - To adjust the bloom to get an extra outer, more wide spread glow. If this feature is used, it might costs additional performance depending on the bloom radius. However in some cases it might get faster as the bigger radius is done in lower resolution. The actual weight is computed as the ratio between all bloom weights.
  • Size Multiplier Small - Scales the small kernel size. A good number is in the range from 0.1 to 0.5. This property is only used if BloomWeightSmall specifies some weight.
  • Size Multiplier Medium - Scales the medium kernel size. A good number is in the range from 0.5 to 1.5.
  • Size Multiplier Large - Scales the large kernel size. A good number is in the range from 2 to 4. This property is only used if BloomWeightLarge specifies some weight.
  • bScaleEffectsWithViewSize - Affects BlurKernelSize, the attribute is scaled depending on the view size.

SetUberPostProcessEffectPropertiesKismet.jpg

Kismet Properties

SetUberPostProcessEffectPropertiesKismetProperties.jpg

Unrealscript

SeqAct_SetUberPostProcessEffect.uc
class SeqAct_SetUberPostProcessEffect extends SeqAct_SetPostProcessEffectProperties
  DependsOn(UberPostProcessEffect);

var() vector SceneShadows<DisplayName=Shadows>;
var() vector SceneHighLights<DisplayName=HighLights>;
var() vector SceneMidTones<DisplayName=MidTones>;
var() float SceneDesaturation<DisplayName=Desaturation>;
var() vector SceneColorize<DisplayName=Colorize>;
var() ETonemapperType TonemapperType;
var() float TonemapperRange;
var() float TonemapperToeFactor<DisplayName=ToeFactor>;
var() float TonemapperScale;
var() float MotionBlurSoftEdgeKernelSize<DisplayName=SoftEdgeKernelSize>;
var() bool bEnableImageGrain;
var() float SceneImageGrainScale;
var() float BloomWeightSmall<DisplayName=Weight Small>;
var() float BloomWeightMedium<DisplayName=Weight Medium>;
var() float BloomWeightLarge<DisplayName=Weight Large>;
var() float BloomSizeScaleSmall<DisplayName=Size Multiplier Small>;
var() float BloomSizeScaleMedium<DisplayName=Size Multiplier Medium>;
var() float BloomSizeScaleLarge<DisplayName=Size Multiplier Large>;
var() bool bScaleEffectsWithViewSize;

event Activated()
{
  local array<PostProcessEffect> PostProcessEffects;
  local int i;
  local UberPostProcessEffect UberPostProcessEffect;

  GetPostProcessEffects(PostProcessEffects, class'UberPostProcessEffect');

  if (PostProcessEffects.Length > 0)
  {
    for (i = 0; i < PostProcessEffects.length; ++i)
    {
      UberPostProcessEffect = UberPostProcessEffect(PostProcessEffects[i]);

      if (UberPostProcessEffect != None)
      {
        UberPostProcessEffect.SceneShadows = SceneShadows;
        UberPostProcessEffect.SceneHighLights = SceneHighLights;
        UberPostProcessEffect.SceneMidTones = SceneMidTones;
        UberPostProcessEffect.SceneDesaturation = SceneDesaturation;
        UberPostProcessEffect.SceneColorize = SceneColorize;
        UberPostProcessEffect.TonemapperType = TonemapperType;
        UberPostProcessEffect.TonemapperRange = TonemapperRange;
        UberPostProcessEffect.TonemapperToeFactor = TonemapperToeFactor;
        UberPostProcessEffect.TonemapperScale = TonemapperScale;
        UberPostProcessEffect.MotionBlurSoftEdgeKernelSize = MotionBlurSoftEdgeKernelSize;
        UberPostProcessEffect.bEnableImageGrain = bEnableImageGrain;
        UberPostProcessEffect.SceneImageGrainScale = SceneImageGrainScale;
        UberPostProcessEffect.BloomWeightSmall = BloomWeightSmall;
        UberPostProcessEffect.BloomWeightMedium = BloomWeightMedium;
        UberPostProcessEffect.BloomWeightLarge = BloomWeightLarge;
        UberPostProcessEffect.BloomSizeScaleSmall = BloomSizeScaleSmall;
        UberPostProcessEffect.BloomSizeScaleMedium = BloomSizeScaleMedium;
        UberPostProcessEffect.BloomSizeScaleLarge = BloomSizeScaleLarge;
        UberPostProcessEffect.bScaleEffectsWithViewSize = bScaleEffectsWithViewSize;
      }
    }
  }
}

defaultproperties
{
  ObjName="Set Uber Post Process Effect Properties"
  ObjCategory="Post Process"

  SceneShadows=(X=0.0,Y=0.0,Z=-0.003)
  SceneHighLights=(X=0.8,Y=0.8,Z=0.8)
  SceneMidTones=(X=1.3,Y=1.3,Z=1.3)
  SceneDesaturation=0.4
  SceneColorize=(X=1,Y=1,Z=1)
  bEnableImageGrain=false
  TonemapperScale=1.0
  SceneImageGrainScale=0.02
  TonemapperRange=8
  TonemapperToeFactor=1
  BloomWeightSmall=0
  BloomWeightMedium=1
  BloomWeightLarge=0
  BloomSizeScaleSmall=0.25
  BloomSizeScaleMedium=1
  BloomSizeScaleLarge=3

  VariableLinks(0)=(ExpectedType=class'SeqVar_Vector',bHidden=true,LinkDesc="Scene Shadows",PropertyName=SceneShadows)
  VariableLinks(1)=(ExpectedType=class'SeqVar_Vector',bHidden=true,LinkDesc="Scene HighLights",PropertyName=SceneHighLights)
  VariableLinks(2)=(ExpectedType=class'SeqVar_Vector',bHidden=true,LinkDesc="Scene MidTones",PropertyName=SceneMidTones)
  VariableLinks(3)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Scene Desaturation",PropertyName=SceneDesaturation)
  VariableLinks(4)=(ExpectedType=class'SeqVar_Vector',bHidden=true,LinkDesc="Scene Colorize",PropertyName=SceneColorize)
  VariableLinks(5)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Tonemapper Range",PropertyName=TonemapperRange)
  VariableLinks(6)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Tonemapper Toe Factor",PropertyName=TonemapperToeFactor)
  VariableLinks(7)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Tonemapper Scale",PropertyName=TonemapperScale)
  VariableLinks(8)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Motion Blur Soft Edge Kernel Size",PropertyName=MotionBlurSoftEdgeKernelSize)
  VariableLinks(9)=(ExpectedType=class'SeqVar_Bool',bHidden=true,LinkDesc="Enable Image Grain",PropertyName=bEnableImageGrain)
  VariableLinks(10)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Scene Image Grain Scale",PropertyName=SceneImageGrainScale)
  VariableLinks(11)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Bloom Weight Small",PropertyName=BloomWeightSmall)
  VariableLinks(12)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Bloom Weight Medium",PropertyName=BloomWeightMedium)
  VariableLinks(13)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Bloom Weight Large",PropertyName=BloomWeightLarge)
  VariableLinks(14)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Bloom Size Scale Small",PropertyName=BloomSizeScaleSmall)
  VariableLinks(15)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Bloom Size Scale Medium",PropertyName=BloomSizeScaleMedium)
  VariableLinks(16)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Bloom Size Scale Large",PropertyName=BloomSizeScaleLarge)
  VariableLinks(17)=(ExpectedType=class'SeqVar_Bool',bHidden=true,LinkDesc="Scale Effects With View Size",PropertyName=bScaleEffectsWithViewSize)
}

Related topics

Toggle Post Process Effect Kismet Sequence Action


This Kismet action allows you to enable / disable / toggle post process effect nodes within the post process chain.
  • Bool - Returns the toggle value.

TogglePostProcessEffectsKismet.jpg

Kismet Properties

TogglePostProcessEffectsKismetProperties.jpg

Unrealscript

SeqAct_TogglePostProcessEffect.uc
class SeqAct_TogglePostProcessEffect extends SeqAct_SetPostProcessEffectProperties;

var bool Value;

event Activated()
{
  local array<PostProcessEffect> PostProcessEffects;
  local int i;

  if (InputLinks[0].bHasImpulse) // Enable
  {
    Value = true;
  }
  else if (InputLinks[1].bHasImpulse) // Disable
  {
    Value = false;
  }
  else if (InputLinks[2].bHasImpulse) // Toggle
  {
    Value = !Value;
  }

  GetPostProcessEffects(PostProcessEffects);

  if (PostProcessEffects.Length > 0)
  {
    for (i = 0; i < PostProcessEffects.length; ++i)
    {
      if (PostProcessEffects[i] != None)
      {
        PostProcessEffects[i].bShowInEditor = Value;
        PostProcessEffects[i].bShowInGame = Value;
      }
    }
  }
}

defaultproperties
{
  ObjName="Toggle Post Process Effects"
  ObjCategory="Post Process"

  InputLinks(0)=(LinkDesc="Enable")
  InputLinks(1)=(LinkDesc="Disable")
  InputLinks(2)=(LinkDesc="Toggle")

  VariableLinks(0)=(ExpectedType=class'SeqVar_Bool',LinkDesc="Bool",bWriteable=true,MinVars=0,PropertyName=Value)
}

Hidden Kismet nodes


You may have noticed that the above Kismet nodes are very bare. Most of the options are however just hidden. To unhide these options, right click on the Kismet node in question to bring up the context menu. From there expand the "Expose Variable" sub menu and select the variable you wish to expose.

This is the Set Ambient Occlusion Effect Properties Kismet node after I exposed the Occlusion Power node.

SeqAct_SetPostProcessEffectProperties


This base Kismet class is the parent class of all the above Kismet nodes.

Unrealscript

SeqAct_SetPostProcessEffectProperties.uc
class SeqAct_SetPostProcessEffectProperties extends SequenceAction
  abstract;

var() Name PostProcessEffectName;

function GetPostProcessEffects(out array<PostProcessEffect> PostProcessEffects, optional class<PostProcessEffect> MatchingPostProcessEffectClass = class'PostProcessEffect')
{
  local WorldInfo WorldInfo;
  local PostProcessEffect PostProcessEffect;
  local PlayerController PlayerController;
  local LocalPlayer LocalPlayer;

  WorldInfo = class'WorldInfo'.static.GetWorldInfo();

  // Affect the world post process chain
  if (WorldInfo != None)
  {
    ForEach WorldInfo.AllControllers(class'PlayerController', PlayerController)
    {
      LocalPlayer = LocalPlayer(PlayerController.Player);

      if (LocalPlayer != None && LocalPlayer.PlayerPostProcess != None)
      {
        PostProcessEffect = LocalPlayer.PlayerPostProcess.FindPostProcessEffect(PostProcessEffectName);

        if (PostProcessEffect != None && (PostProcessEffect.Class == MatchingPostProcessEffectClass || ClassIsChildOf(PostProcessEffect.Class, MatchingPostProcessEffectClass)))
        {
          PostProcessEffects.AddItem(PostProcessEffect);
        }
      }
    }
  }
}

defaultproperties
{
}

SeqAct_SetDOFEffectProperties


This is the base class which handles the DOF effects.

Unrealscript

SeqAct_SetDOFEffectProperties.uc
class SeqAct_SetDOFEffectProperties extends SeqAct_SetPostProcessEffectProperties
  DependsOn(DOFEffect)
  abstract;

var() float FalloffExponent;
var() float BlurKernelSize;
var() float MaxNearBlurAmount<DisplayName=MaxNear>;
var() float MinBlurAmount<DisplayName=Min>;
var() float MaxFarBlurAmount<DisplayName=MaxFar>;
var() EFocusType FocusType;
var() float FocusInnerRadius;
var() float FocusDistance;
var() vector FocusPosition;

event Activated()
{
  local array<PostProcessEffect> PostProcessEffects;
  local int i;

  GetPostProcessEffects(PostProcessEffects);

  if (PostProcessEffects.Length > 0)
  {
    for (i = 0; i < PostProcessEffects.length; ++i)
    {
      SetProperties(PostProcessEffects[i]);
    }
  }
}

function SetProperties(PostProcessEffect PostProcessEffect)
{
  local DOFEffect DOFEffect;

  DOFEffect = DOFEffect(PostProcessEffect);

  if (DOFEffect != None)
  {
    DOFEffect.FalloffExponent = FalloffExponent;
    DOFEffect.BlurKernelSize = BlurKernelSize;
    DOFEffect.MaxNearBlurAmount = MaxNearBlurAmount;
    DOFEffect.MinBlurAmount = MinBlurAmount;
    DOFEffect.MaxFarBlurAmount = MaxFarBlurAmount;
    DOFEffect.FocusType = FocusType;
    DOFEffect.FocusInnerRadius = FocusInnerRadius;
    DOFEffect.FocusDistance = FocusDistance;
    DOFEffect.FocusPosition = FocusPosition;
  }
}

defaultproperties
{
  FocusType=FOCUS_Distance
  FocusDistance=800
  FocusInnerRadius=400
  FalloffExponent=2
  BlurKernelSize=2
  MaxNearBlurAmount=1
  MinBlurAmount=0
  MaxFarBlurAmount=1

  VariableLinks(0)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Falloff Exponent",PropertyName=FalloffExponent)
  VariableLinks(1)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Blur Kernel Size",PropertyName=BlurKernelSize)
  VariableLinks(2)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Max Near",PropertyName=MaxNearBlurAmount)
  VariableLinks(3)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Min",PropertyName=MinBlurAmount)
  VariableLinks(4)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Max Far",PropertyName=MaxFarBlurAmount)
  VariableLinks(5)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Focus Inner Radius",PropertyName=FocusInnerRadius)
  VariableLinks(6)=(ExpectedType=class'SeqVar_Float',bHidden=true,LinkDesc="Focus Distance",PropertyName=FocusDistance)
  VariableLinks(7)=(ExpectedType=class'SeqVar_Vector',bHidden=true,LinkDesc="Focus Position",PropertyName=FocusPosition)
}

Kismet Example


This is the Kismet used by the PostProcessingExample map included in the download below.

PostProcessKismetExampleThumbnail.jpg

Downloads


  • Download the script and content for this gem (PostProcessingContent.zip)