đī¸Cutscenes
Creating cutscenes and interactive playback with Timeflow
Timeflow can be used to choreograph sequences that transition in and out of gameplay. It can also be used to dynamically work with camera placements and animations.
How to Create Cutscenes
General overview for setting up a scene:
Prepare Timeflow by setting up markers defining regions in time for each animation sequence.
Use the Timeflow Controller component to trigger and receive playback events.
Connect your scene and player controllers using Unity Events.
Add animation, dialog, music, and anything else you wish to your cutscenes.
Using Multiple Scenes
You may of course split animations into separate scenes. Each scene should have its own Timeflow and set of cutscenes. Or if you wish, a scene can simply play a complete sequence upon loading. This can be useful for an intro sequence to a game or during a major story point transition.
Dynamic scene loading is not provided by Timeflow and would require scripting or using a 3rd party scene manager.
Preparing the Timeline
To get started, open a scene or create a new one with an instance of Timeflow.
You may use multiple instances of Timeflow, however any objects shared among the cutscenes should be animated in the same instance.
Adding Markers
Using markers is the easiest way to define specific points in time and they can be used to work with specific time regions, both in edit mode and during playback. Each region (from a start marker to an end marker) may be looped or played once.
To add new markers manually, hold the Control key and click anywhere in the timeline ruler or on the marker icon in the upper right corner of the Timeflow view.
For more details, please refer to the Markers documentation.
Auto Generating Markers
Often when setting up a new sequence it is helpful to automatically generate markers on a set interval of time. This can be done in the Timeflow inspector using the Generate Markers option.
Timeflow During Gameplay
If you have animations which are happening independent of the cutscenes, such as background animations, music, and environmental treatments, you may place these in another instance of Timeflow which will remain playing during gameplay and cutscenes alike without interruption.
Inserting or Removing Time
Timeflow includes tools for inserting, deleting, and duplicating sections of time using the Work Area.
Controlling Playback
To use Timeflow in an interactive context, it's necessary to have a script which can control playback based on triggered events, so that a specific animation sequence can be queued at any moment from gameplay, and then return control back when done. Typically this is accomplished using collider triggers and Unity Events in the scene, though it may also be achieved with scripting.
Timeflow Controller
Included is a controller script with the functionality for most use cases. It makes it possible for artists to connect events with animations without any additional scripting.
For more information, please refer to the Timeflow Controller documentation.
Animating Cutscenes
Once your marker regions are set up, you may animate any objects you wish within that time frame. This all works as you normally would use Timeflow. The only difference is that playback, instead of going directly from start to end, will jump to the appropriate section when triggered.
Smooth Transitions
Since jumping in time is required to play cutscenes, some adjustments may be needed to certain behaviors to avoid anomalies. For example, any procedural animations (such as Look At or Follow) that use time smoothing may lag or start at an incorrect position when a cutscene is played.
To solve this problem, typically animation may be added to an override or blend setting on the affected behavior so that a transition into and out of the effect can be keyframed. This is also useful for reposition a character or game object to a specific location during the cutscene.
Object Hierarchies
If you are using more than 1 instance of Timeflow (either in the same scene or load asynchronously) it is highly recommended to place Timeflow as a parent in the hierarchy. Each object animated by Timeflow will then know which it belongs. You may of course structure subhierarchies any way you wish and animate anything within them.
Each Timeflow Object component determines which Timeflow it belongs to by looking up the hierarchy to the first instance found. If none is found, then it defaults to the main active instance.
Additional Notes
Please refer to the example scene and tutorial video linked above.
Scene Optimization
To keep things tidy and clean, only add the objects that will be directly animated to the Timeflow view. Any objects which have unused behaviors on them will bloat the scene unnecessarily. For more details, see the page on Optimization.
Last updated