How to use Post Processing in Unity — Part-II

Siddhant Thakur
May 4 · 6 min read

In part-I of this article, we got the post-processing set up in Unity. The objective of this article is to display some of the post-processing effects. Here, we will be using simple cubes to display the effects. So when the player enters a cube game object we see the effect, implying that the post-processing used here isn’t global.

Bloom:

Bloom is probably one of the most popular post-processing effects. The idea behind this effect is to add glow to your scene and attract attention. It enhances the bright/lighter portion of the image to give the player the illusion of a glowing effect (Works well in dark-lit scenes also used to add contrast).

Let’s start by creating a material for the game object. The material has emission toggled ON. Making the material appear as a source of light enabling us to use this material to give off a glow.

Material

Upon completion we can add this material to the game object along with the Post-process Volume component as seen in the previous article.

We now need to add the bloom effect to our volume component.

You can mess around with the settings to get your desired effect. These were the settings I used to get my desired output,

Lens Distortion:

This following Gif might be a little trippy(Went overboard with the distortion), so watch it at your own discretion.

Camera lenses are designed to bend light, these are done for various reasons few of them being, to focus on a single point of an image, to see more of an image (wider field of view), etc. The post-processing Lens distortion effect simulates these camera lenses by distorting the rendered image to match the real world camera lens.

The process to add this effect is the same as the process of adding Bloom effect as shown above.

The settings I used to achieve this effect is as follows,

Ambient Occlusion:

In games, ambient light refers to the amount of light present in a game. It has no source and it is global. But let’s say you wish to differentiate between the lighter and darker areas by artificially creating shadows to enhance the difference, achieved by using Ambient Occlusion. Ambient Occlusion is technically a shadowing technique used to artificially darken areas where ambient light doesn’t reach. This is used to make the object feel more authentic.

Let’s take the example from above. Distorting the cube makes it look like a quad that is attached to the surface(a flat surface or a patch on the surface). Now add Ambient Occlusion to this and see how it looks.

We can observe that using it gives us a vague sense of depth by artificially darkening the areas surrounding the cube. Let’s also look at this example by removing the directional lighting from our scene.

Depth

Vignette:

Went overboard with Intensity

Vignette is also an effect that deals with darkening areas in a given scene. But this is a different concept when compared to Ambient Occlusion. Think of Vignette as an artificial means to create tunnel vision. The idea behind using this effect is to draw the Player’s attention within its bounds. It is also used in games to add a cinematic feel. It has many use cases, one of them being to draw the Player’s attention to the center of the screen.

The settings used to achieve this effect is as follows,

In the Post-process Volume component, you can see that the Blend Distance is 0.75 units. This is done to gradually transition into the effect as we get closer to the collider rather than the effect being shown at 100% when in the collider and 0% when outside. The effect here triggers as I get 0.75 units close to the collider.

Color Grading:

Color is an important factor in games not only does it help us differentiate between game objects but it also has the ability to evoke emotions. Color grading is the act of adjusting the color or light intensity of a scene. Using this concept we can change the mood of a scene(calm, cool, bright, violent, etc).

The settings used to get the above effect are as follows,

Using all the effects mentioned above we can also create something similar to this,

Uses Color Grading, Bloom, Vignette, Ambient Occlusion

Unity also has effects such as,

Auto Exposure that deals with simulating eye reaction to changes in lighting conditions in a scene. It influences how the Main-Camera perceives brightness to match a digital camera or that of the human eye.

Chromatic Aberration is a side effect of a camera lens being unable to focus all the colors at a single point. This causes a slight blurriness in the image along with a slight color bleed. This effect is mainly used when we want to portray the world through a lens(Resident Evil, Outlast, etc).

Depth of Field is an effect that deals with blurring things that are in the background or are not in focus range. This property mimics the real-world digital camera, as they can only focus on objects that are at a certain distance blurring everything else in the scene.

Grain, think of it as an effect used to make your game feel cinematic. This is achieved by adding small particles into your scene, you can think of them as noise. Games like Last of Us part 2 also use this effect.

Motion Blur, another effect used to make the game feel realistic. This effect tries to mimic how the human eye reacts to fast-moving objects, as it’s unable to focus on a single point when moving fast, causing blurry vision (basically how fast moving objects appear blurry as we are unable to focus on them). So as the name suggests this effect causes blurriness depending upon the object and the Main-Camera in motion.

Screen-space Reflections, this effect is used to calculate reflections in a scene. In simple terms, this process works by reflecting the screen image onto itself. All of this is done to get subtle reflections like a water reflection.

Thank you for reading. More to come!!!

CodeX

Everything connected with Tech & Code

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store