My journey becoming a Unity game developer: Make a game look beautiful-URP & Post Processing pt.3
Objective: Create 2 local Box Volumes with colliders to activate Post Processing effects. Using these Box Volumes, we will create 2 different effects in the room with one side appearing hot and the other side appearing cold.
There is another way of using Post Processing effects in our scene, but instead of the entire scene being effected we will only effect a certain area in our scene. The next technique we will use is Box Volume which uses a box collider that we can position and scale to fit the area the player will have to enter to see the effects applied. The Box Volume relies on a collider for the player to enter to see the Post Processing effects activated.
With Post Processing package installed from the Package Manager, select the Main Camera. Go to Add Component and select Rendering->Post-Process Layer. Unity describes Post-Process Layer as a component that allows you to configure anti-aliasing for this post-process layer, choose which layer it will apply the post-processing to, and select the game object that triggers this post-process layer. https://docs.unity3d.com/Packages/com.unity.postprocessing@3.0/manual/Quick-start.html#post-process-layer
Under Volume Blending inside of the Post-Process Layer component, we need to add a layer to take affect in our scene. Go to Layer->Add Layer to create a new layer name Post. Back in the Post-Process Layer component, add the new Post layer to the Layer slot.
In the Hierarchy, create a new Box Volume to use the Post-Process Layer on (Volume->Box Volume). Name it Post_1, reset its transform, position and scale the collider to cover the area we want the Post Processing to affect. Duplicate this Post_1 Volume object, name it Post_2, and position it to the other side of the room.
Now we need to create Profiles for each Box Volume object to actually create Post Processing effects on each Volume. Click the New button under Profile in the Volume component as this will create a new Profile named after the Volume object’s name in the Scenes folder.
We’re going to start with Post_2 Volume object to create a colder looking effect. Select the Post_2 Profile in the Scenes folder, and select Add Override to use the Color Adjustments as our 1st effect. Use Post Exposure, Color Filter with a light blue-green selected, Hue Shift, Saturation, and Contrast if you feel the need to use it.
Select Post_1 Profile, follow the same with the Post_1 Volume object as we did with Post_2 Profile using the same Post Processing effect settings. However, use the light-red color to give a hotter appearance.
As we move inside each Box Volume collider, we will notice that one side of the room appears hotter, while the other side appears colder.
We can enhance the effects by adding more effects, such as Bloom and Lift Gamma Gain. With Bloom, add a little intensity with a light blue tint that has a little brightness and extend these effects towards the staircase.
Use Lift Gamma Gain to perform three-way color grading. With the trackball, shift the hue of the image towards that color of the Post Volume. While with the slider, adjust the the color lightness of that range to offset the trackball.
Bloom and Lift Gamma Gain effects used on Post_1 Volume object with the red color enhanced.
Now move from one Post Volume to the other and see the new effects applied.
These Post Volume objects also can be connected to the player object to make them appear to be in the environment we want them to see as their moving around the room through code. This is an example of if we had wrote code for the player to go from a normal environment to a hotter, more dangerous environment and back out.
A different view through a colder room appearance and back to normal.