The Post-Processing stack is a collection of image effects applied to change the looks of you game. They can help you create a polished effect for your visuals very quickly. From depth-enhancing vignettes, realistic motion blur, and interesting fish-eye perspectives, Post-Processing in Unity is a must have to give your game impact.
Here are the steps to get started. Note: These instructions are for Windows machines running Unity 2019.4.3.1f (current LTS) however they should be backwards compatible for your version.
Install the Post-Processing Package to your Unity Project
- Open Unity (or Unity Hub)
- Create a project (or use existing one if you want)
- At the top, select Window > Package Manager
- Wait a minute as it takes some time for all the packages to load. Unity is transitioning their assets here as well so get used to this interface
- Scroll down the list on the left to Post Processing
- Click Install in bottom right
- Depending on your device, this will also take about a minute to import the Shaders and such
Congratulations, you have imported Post Processing! Now what? Let’s start applying some effects.
Some background: Post-Processing is applied to the Camera’s image buffer, so much of what we will be doing involves your Scene Camera.
Get started with Effects
- Add the Post Process Layer to your Scene’s Main Camera as a component. It should show up when you begin typing “Post Process Layer” in the Add Component sub-view
- Set the “Trigger” to “Main Camera” if this has not been done already
- You will need to set the layer on which this will take effect, it is recommended to not use “Everything” layer, so create a new layer and give it a meaningful name — eg. “PostProcessing”
- Add the Post Process Volume component to your Camera. Click “isGlobal” to true — you need this to apply globally. This is a beginner tutorial so we are covering the case where the post-process settings are global.
- Create a new Post Processing Profile. This will specify the defaults for the Post Process Volume. You can create this as an asset (e.g. go to your Heirarchy, right click in any empty space, select Create > Post-processing Profile)
- Within the Volume, you can now add effects!
A piece of friendly advice — try not to overdo it with effects. They are fairly expensive operations and can slow down your game, so use sparingly.
With that said, let’s talk about a few of these effects! I will be going over some great effects especially for 2D games.
Vignette allows you to darken the edges of the camera. This gives a great amount of depth and personality to 2D games. You may not want to apply such a heavy one as in the image above, just something subtle to provide a bit of flair!
Think lens flare, sun spot, etc — Bloom gives a sense of a light source and can apply to some 2.5D and low-res 3D games. This one can be very jarring so use sparingly!
Auto Exposure (UnityDocs)
When lighting changes in your game, use Auto exposure to create a brightness adjustment between two parts of your game. A flash bomb goes off! Falling from a sunny field into a dark pit! Your imagination is your greatest tool.
Chromatic aberration (UnityDocs)
Chromatic Aberration is when a Camera’s rendition of the color spectrum fails, presenting a halo effect of color around an image. This gives an extra pop to explosions, swift movements, and impact shots.
Motion Blur (UnityDocs)
We all know what motion blur is. A great example in 2D is when the camera is trying to keep up with your player. If they are moving at high speeds, a small amount of motion blur can really drive the effect home.
Now go out there and try these out! And make your games pop!