Unity Learn home
View Tutorial Content
Steps

FPS Mod: Adding post-process effects

Tutorial
Foundational
+10 XP
10 Mins
(238)
Overview
Summary
Adding Post Process Effects (or FX) changes the look and feel of your game. In this mod, you will learn how to alter the color scheme and add other visual effects using Unity’s Post Processing package.
Select your Unity version
Last updated: June 14, 2024
2019.3
2019.2
2019.1
2018.4
Language
English

1.Importing the Post Processing package

1. In the top menu bar, open the Package Manager by clicking Window > Package Manager. A new Package Manager window should open.
Select image to expand
Type caption for image (optional)

2. A new Package Manager window will appear (if you’re using multiple screens, check to see if it appeared there).
Select image to expand
Type caption for image (optional)

3. Beneath the Package Manager header, find the field Packages: In Project.
Select image to expand
Type caption for image (optional)

Click the down arrow to display all the menu options, and select Unity Registry, which will expose all of the available packages in the Unity Registry (Package Manager > Packages: In Project > Unity Registry).
Select image to expand
Type caption for image (optional)

4. In the Package Manager’s search bar, type “Post Processing”, which will expose the Post Processing package. Then click Install at the bottom right of the Package Manager window.
Select image to expand
Type caption for image (optional)

5. The import process will begin.
Select image to expand
Type caption for image (optional)

6. Once the import process is completed, you can close the Package Manager window.
7. You should now be able to see the Post Processing package in your project (Project > Packages > Post Processing).
Select image to expand
Type caption for image (optional)

8. In the top right of the Packages window, with “Post Processing” selected, press the Install button to install this package into your project. You should see a progress bar for the installation.

2.Setting up the game’s camera for PostFX

1. In the Project window, find the “Player” prefab in Assets > FPS > Prefabs > Player. Select it and click the “Open Prefab” button in the Inspector window to edit the prefab.
Select image to expand
Type caption for image (optional)

2. In the Hierarchy window of the “Player” prefab, find and select the “Weapon Camera” GameObject.
Select image to expand
Type caption for image (optional)

3. On this GameObject, add a “Post-process Layer” component with the “Add Component” button in the Inspector window
Select image to expand
Type caption for image (optional)

4. Set the “Layer” field on the newly-added “Post Process Layer” component to “PostProcessing”. This is telling this Post Processing Layer to only consider volumes that are on the “PostProcessing” layer
Select image to expand
Type caption for image (optional)

5. The camera is now set up for accepting post processing effects

3.Adding a postFX Volume to the scene

1. Open the main scene by finding the “MainScene” asset in the Project window by navigating to Assets > FPS > Scenes > MainScene and double-clicking on it
Select image to expand
Type caption for image (optional)

2. In the main scene, create a new GameObject and call it “PostFX”. To do this, in the Hierarchy click "+" > Create Empty > then rename the new game object to “PostFX”.
Select image to expand
Type caption for image (optional)

3. Click on PostFX in the Hierarchy, then in the Inspector, set this GameObject’s layer to “PostProcessing” via the “Layer” dropdown menu
Select image to expand
Type caption for image (optional)

4. Add a “Post-process Volume” component to it via the “Add Component” button
5. On the “Post Process Volume” component, make sure that the “Is Global” box is checked. This will ensure this volume affects the whole scene.
Select image to expand
Type caption for image (optional)

6. Click the “New” button to the right of the “Profile” field in order to create a Post Processing Profile to assign to this volume
Select image to expand
Type caption for image (optional)

7. At the bottom of the “Post Process Volume” component’s inspector, press the “Add effect..” button to add an effect to this volume. In this example, we will add the “Color Grading” effect
Select image to expand
Type caption for image (optional)

8. Expand the newly-added “Color Grading” effect by clicking the drop down arrow, then click the little checkbox to the left of the “Saturation” parameter to enable editing it, and set the saturation slider to minimum
Select image to expand
Type caption for image (optional)

9. If you now enter Play mode, you will notice that the game now renders in black & white due the decreased Saturation

4.Extra Credit - Add “Bloom” post effects

If you want to make the visual effects and light sources more realistic, try adding the ‘Bloom’ effect to your project. The Bloom effect blurs light sources to make them feel more intense.
Here is a side by side comparison:
Bloom OFF
Select image to expand
Type caption for image (optional)

Bloom ON
Select image to expand
Type caption for image (optional)

To add the Bloom effect:

1. In the Hierarchy, click on the ‘PostFX’ GameObject you created earlier. In the Inspector, under Post Process Volume click the Add effect button. Use the drop down menus to select Unity > Bloom
Select image to expand
Type caption for image (optional)

2. Expand the Bloom field by clicking the drop down arrow to the left of the title.
Select image to expand
Type caption for image (optional)

3. Then check to “ON” the Intensity and Threshold, and enter the following parameter values: Intensity “1”; and Threshold “1.1”
Select image to expand
Type caption for image (optional)

It should look like this:
Select image to expand
Type caption for image (optional)

(You can experiment with different values later.)
4. To see your results, it’s best if you turn off other Post Process effects if there are any in your GameObject
Select image to expand
Type caption for image (optional)

5. Now you’re ready to test your game in Play mode.
Select image to expand
Type caption for image (optional)

6. Exit Play mode and keep editing different Post Process effects and be sure to save your scene.

5.Next steps


FPS Mod: Adding post-process effects
FPS Mod: Adding post-process effects
General Tutorial Discussion
1
2
1. Importing the Post Processing package
0
2
2. Setting up the game’s camera for PostFX
0
0
3. Adding a postFX Volume to the scene
5
7
4. Extra Credit - Add “Bloom” post effects
1
1
5. Next steps
0
0