How to Add Custom Post Processing Files to Individual Cameras in Cinemachine
Objective: To learn to how to add a custom Post Processing File to individual cameras in Cinemachine.
How cool would it be if there was a way you could add a new post processing effect to each individual camera you have in your scene, being able to build on a dark and light contrasted environment or showing off some beautiful colors in your cutscenes. Well it is possible! Let’s run through how to get this setup by starting with how to get Post Processing installed into your project.
How to Add Post Processing to Your Project
Firstly we need to make sure that we have the Post Processing package installed from Unity’s Package Manager, head up to Window → Package Manager → Make sure you are on the Unity Registry Package option → Scroll down to Post Processing → Install.
Add Post Processing Layer to Main Camera
Now we need to add the ‘Post Processing Layer’ component to the main camera game object as this is where our ‘Cinemachine Brain’ component is sitting:
This ‘Post Process Layer’ component is required as it allows post processing profiles to affect the camera.
Adding Post Processing Extension to Cinemachine Virtual Cameras
Another easy step that needs to be completed is adding the extension to the virtual camera. Make sure you have it highlighted and scroll down to the bottom of the CinemachineVirtualCamera component to ‘Extensions’ → Add Extension → Post Processing. Which will now give you this component:
Now it will ask for a profile, which you can just hit ‘New’ if you don’t have an existing one.
Simply press the ‘Add Effect’ button and play around with your post processing effects!
Add Post Processing to a Second Virtual Camera and Switching Between the Two
Now complete the same steps above for a second virtual camera and adjust the post processing to something different.
Start to switch between your virtual cameras and notice the difference!
Note: I noticed something a bit weird when setting mine up. I wasn’t actually able to adjust any post processing effects on the virtual camera extensions without the game being ‘Played’, so make sure you also have this box ticked and make your adjustments there:
I was using the standard render pipeline.
Useful Links
Cinemachine Post Processing