Getting Started with Post Processing in Unity
Post-processing essentially provides us with a collection of image effects that can let us change the look of our games. They can add a great deal of polish and visual flare very quickly, and Unity provides a lot of options for tweaking and combining these effects to get everything looking just how we’d like it. Some of the effects currently available to us are:
- Ambient Occlusion (creating soft global shadows),
- Bloom (essentially for a blurring, glow effect based on brightness),
- Color Grading (letting us adjust things like contrast, color, saturation, tint, etc.),
- Motion Blur (a streaking effect to simulate rapid movement),
- Vignette (essentially creating a border by darkening or lighting the edges of the screen).
In order to get these you’ll first need to go to Window > Package Manager and then search for and install the Post-Processing package. Once this is done, we can place a Post-process Volume component onto an object in the scene, create a new Post-processing profile, and tick the isGlobal boolean. We can then add the effects we’d like to add beneath this by clicking the Add effect button, and can adjust the settings as we’d like. Lastly for the Volume, we can create a Layer, name it Post-Processing, and set this GameObject’s layer to it.
Then over on our main camera we can assign it the same layer before adding a Post-processing Layer component. We can then set the layer on this component to the Post-Processing layer, and we should begin to see any Post-processing effects we’ve set up in the Volume object (and the profile on it).
That should be enough to get us started with Post-Processing 😉 I’ll report back on how I’m currently using it in the 2D Space Shooter shortly!