My journey becoming a Unity game developer: Cutscenes-Timeline

Rhett Haynes
4 min readSep 15, 2021

--

Objective: Organize the cutscene and use Timeline to create cuts.

Before we use Timeline, let’s organize our cutscene. Create an empty game object and name it Sleeping_Guard_Cutscene. Make sure to set the Transforms to zero. Then go to the Sleeping Guard Cutscene Actors game object and rename that to Actors. Drag Actors into Sleeping_Guard_Cutscene object.

Organized the Sleeping Guard Actors into a cutscene game object.

Create another empty game object and name it CM Virtual Cameras. Set Transforms to zero, drag the CM OTS Shot and CM Mid Shot virtual cameras into it. Then drag the CM Virtual Cameras into the Sleeping_Guard_Cutscene game object. Check the virtual cameras to make sure they’re positioned exactly the way you left them by clicking on Solo.

Virtual cameras organized and placed inside the Sleeping Guard Cutscene game object with the Actors.

Timeline is an Animation Track that allows you add and animate a Timeline event. With Timeline we can animate and pan virtual cameras, add audio effects, hide and activate game objects, and create complex particle effects. To install Timeline, go to Window->Sequencing->Timeline.

Installing Timeline.

Click on the Sleeping Guard Cutscene game object and click on the Create button in the Timeline editor. This will create a new Timeline Asset which we will add to a new folder created name Timeline inside the Game itself. Name the Timeline asset Sleeping Guard Cutscene Timeline.

Timeline Asset created.

When the Sleeping Guard Cutscene Timeline is created, you will notice a Playable Director component added to the Sleeping Guard Cutscene game object. The Playable Director component controls when the Timeline instance plays, how the instance updates its clock, and what happens when the instance finishes playing.

Timeline added with the Playable Director added to the Sleeping Guard Cutscene game object.

To animate our virtual cameras, we need to add a Cinemachine Track and attach the Cinemachine Brain to it in Timeline. Click on the Sleeping Guard Cutscene game object to bring up the Timeline. There are 2 ways to add a Cinemachine Track, one way is to click the “+” sign under Preview and select Cinemachine Track. The other way is to simply drag the Main Camera into the Timeline window. The first way you must place the Main Camera into the Cinemachine Track. The second way has the Cinemachine Brain attached to the Main Camera already, therefore we can just drag the Main Camera into the Timeline window.

Cinemachine Track with the Cinemachine Brain attached to the Main Camera added to the Timeline.

Let’s create a 5 second cutscene clip. Before we start, go to the Wheel icon and change the Timeline from frames to seconds.

Timeline changed from frames to seconds.

To add a virtual camera to the Timeline, right-click on the Cinemachine Track and select Cinemachine Shot. In the Inspector under the Cinemachine Shot component, add the CM OTS Shot to the Virtual Camera slot. Since we’re using 2 camera shots for this cutscene, drag the edge of the 1st shot down to half of 5 seconds. Create a second Cinemachine Shot and set it up just like the first shot, except add CM Mid Shot to the Virtual Camera under Cinemachine Shot component. Drag the 2nd shot timeline down to 5 seconds.

Created 2 Cinemachine Shots and added virtual cameras to each to play in 5 seconds.

We can also take the 2 Cinemachine Shots and combine them together to play with a technique called Blending. Just drag the CM Mid Shot into the CM OTS Shot. As we see when we scrub or play the clip, the Main Camera will blend from one virtual camera’s position to the other’s position.

Virtual Cameras moving from one position to the other’s using the Blending Technique.

--

--

Rhett Haynes
Rhett Haynes

Written by Rhett Haynes

Learning to become a Unity game developer.

No responses yet