PcoWSkbVqDnWTu_dm2ix

Post-Processing Effects

Post-Processing Effects

10 min

Post-processing effects can quickly improve a game’s visuals with a variety of customizable filters. Some applications include adding realism to an outdoor environment with depth of field, or providing players feedback by flashing a screen red when they’re damaged.

Adding Effects

To add post-processing effects, add them to either the Lighting service or the Camera depending on if you want them displayed to individual players or a whole server.

Workspace.Camera Used for effects local to a player, such as a player's camera blurring when their avatar is hit.
Lighting Used for global effects seen by all players, such as sun rays in the environment.

When Working in Studio

Depending on your Studio settings, some effects may not appear. To check, go to FileSettingsRendering. In Performance, set the Quality Level options to Level 21, the highest possible.

Considerations for Players

Effects may differ across devices. On slower or mobile devices, effects may be reduced or not be visible. For more information, see that effect’s API page.


Bloom

The BloomEffect simulates a camera viewing a bright light, an effect often used to exaggerate currently existing lights. By increasing the effect’s intensity, any parts with lighter colors (such as white plastic or neon materials) will glow.

Blur

The BlurEffect applies a gaussian blur to the entire rendered game world. One practical application is blurring a scene when a player has a GUI menu open.

Color Correction

Similar to photo editing software, the ColorCorrectionEffect adjusts scene color properties such as saturation, tint color, or contrast. Use this effect to enhance an environment’s appearance or create a specific mood (spooky, calm, etc.). It can also be used to provide player feedback, such as making the scene tint red if a player is hit.

Depth of Field

The DepthOfFieldEffect simulates a camera lens by blurring parts of a scene not in focus. Distant objects can be blurred or this effect can be used to focus on specific parts of a scene, like an item in an in-game shop.

Sun Rays

The SunRaysEffect renders a halo of light, complete with rays around the sun that move based on Lighting/ClockTime|ClockTime or Lighting/TimeOfDay|TimeOfDay. The effect is shaped by objects in the world between the player’s camera and the sun, allowing for realistic visuals of light and shadow.

Examples

The examples below combine different post-processing effects to create different effects that can be used in games. Unless stated, assume that all effects are parented to Lighting.

Outdoor Lighting

Bloom
Intensity 0.5
Size 50
Threshold 0.8
DepthOfField
FarIntensity 0.5
FocusDistance 15
InFocusRadius 30
NearIntensity 0
ColorCorrection
Brightness 0
Contrast 0.2
Saturation 0.1
TintColor
[255, 250, 235]
SunRays
Intensity 0.035
Spread 0.4

Indoor Lighting

Bloom
Intensity 0.8
Size 40
Threshold 1.5
DepthOfField
FarIntensity 0.5
FocusDistance 12
InFocusRadius 5
NearIntensity 1
ColorCorrection
Brightness 0
Contrast 0.4
Saturation -0.4
TintColor
[220, 210, 255]

Player Damage Feedback

Post-processing effects can be scripted, often with animations using TweenService. This example shows a death effect where the screen blurs and changes color. Its script can be repurposed in different ways, such as color-shifting the screen if a player is poisoned, or blurring the screen while a menu is active.

To use the script below, copy its code into a LocalScript within StarterPlayerScripts.

Tags:
  • post-processing
  • effects
  • environment
  • lighting
  • blur