How to use Post Processing in Unity — Part-I

Siddhant Thakur
CodeX
Published in
3 min readMay 4, 2021

--

Bloom

If you’ve been following my articles, you probably would have heard me say that using “Some Element” would bring life to your game. Well, post-processing just happens to be one of those elements. Almost every game out there uses some form of post-processing, be it 2D work of art like Hollow Knight to 3D masterpieces like Last of Us. In this article, we’ll look at how to get post-processing running in Unity.

Step 1 - Install Post Processing Package:

Get the Post Processing package installed into your project. To do this, select the Window option from the toolbar and select the Package Manager option. That should bring up a new pop-up window (make sure you have your packet manager set to Unity Registry). After that, all you have to do is search for your required Package(Post Processing in this case) and install it.

Window → Packet Manager → Check Packages(Unity Registry) → Install Post Processing

Step 2 -Main Camera Setup:

With the post-processing ready to use in our project, we now require a means to render/enable post-processing into our scene. This can be done using the Post Process Layer. This component already contains one form of post-processing called Anti-Aliasing (it smoothens out jagged edges). Post Process Layer component contains a Volume blending feature. It is here, that we can select a Layer and anything present in this layer will have its associated post-processing effect activated. More to come on this later.

Volume blending also contains a Trigger which by default is the Main Camera. This trigger requires a Transform. Think of it as a trigger that enables or disables the visualization aspect of the post-processing.

Adding Post Process Layer to the Main Camera

In the above GIF you can see that its also possible to use any game object’s transform as a Trigger for Volume blending.

Selecting the Layer that will contain the post processing effect.

We can also have multiple layers selected by just clicking on it, implying you can have a mixed layer where each layer is used to define a certain kind of blending effect.

Step 3 -Post Processing Volume Setup:

Post-process Volume is a component that allows you to control the post-process effect and the type of effect. You can even control the accessibility that makes the effect happen globally or even locally like when you enter a room, and it lights up. A simple way to get this working is by having a collider attached to the game object, enabling the effect to trigger when the Post process Layer’s transform enters the collider.

To use the Post-process Volume component, you need to do the following, add it to the desired game object, make sure to have the game object in the correct post-process layer (the one you created above). With this done, you can now create a profile that will contain the post-processing effects. And finally, create your desired effect.

Create a Game Object → Set Post Process Layer → Add a Post-process Volume Component → Create a Post-process Volume Profile → Add Effect

Thank you for reading. More to come on how to use Post Processing in unity in the next part of the article!!!

--

--

Siddhant Thakur
CodeX

Aspiring Game Developer with experience in the field of Machine Learning.