Objective: Setup and introduce Cinemachine in Unity
This post follows on from the working with Previs Elements.
As you can see from the Previs post we have a directors idea as to how the camera shots should pan and flow. To get this moving(composing) we need to set up Cinemachine. Cinemachine is a Unity asset pack(free) and to install it we go to Window, Package Manager, serach for Cinemachine then install it.
Once installed the first thing we need to do is set up a virtual camera. To set one up, go up to Cinemachine which should now be added in the top section next to Window and click create virtual camera.
The virtual camera is then added to the hierarchy as CM vcam1 as in Cinemachine Virtual Camera 1. We will use this for an over the shoulder shot so we will rename to CM OTS Shot. Now we need to find the camera in the scene and adjust the positioning for the start of the cut/shot.
As you can see, we lined up the virtual camera to match the Previs sketch.
If you look at the virtual camera settings in the inspector as in the image above you will see there at some adjustable settings. Firstly we look at the look at or follow and notice they’re set to none right now but these can be assigned to look at or follow any objects tansform in the scene. We also have a priority. This is used when using multiple cameras to assign the main camera for the shot.
The next block in the settings we will look at is the Aim section and how it corresponds with the above shot with the colored component/boxes.
The softzone represenets the light blue box and that will show which elements in the shot are important. The dead zone is the center element and the camera will not move which the object it is looking at or following is within this zone.
Generally for setting up shots you would go by the rule of thirds so that the center in not exactly what you want to be looking at. This gives a more natural and contextually pleasing view to the shot.
Going from the Previs elements we have a secondary shot from the opposite side of the desk in which we will need another virtual camera for. For this we follow the same guide as before, set up and rename the virtual camera to match the shot eg CM KeyCard Shot.
We now have the second virtual camera set up for the shot and matching the Previs elements. Theses virtual cameras will work and be swappable to use on the main camera by using the Cinemachine Brain. This was added to the main camera automatically when we created our first virtual camera.
We now have our cutscene ready/composed to use with Timeline.