This document is being updated currently by Kirthy Iyer!
Track View Editor
The Track View is the embedded Sandbox cut scene editing tool for making interactive movie sequences with time-dependent control over objects and events in the CryENGINE.
Creating cinematic cut scenes and scripted events are both possible, allowing you to sequence objects, animations, and sounds in a scene that can be triggered in the game, and played either as a detached cut scene from the third person perspective, or from the first person perspective of the player as he plays the game. Sequences created with Track View can be triggered in game with a specific Flow Graph node. Different properties enable sequences to range from passive in game scenarios up to fully uncoupled cut scenes.
This system will be familiar to anyone who has used animation software like 3ds Max, but this guide will also help those unfamiliar with cut scene editors to start creating simple scenes for your levels.
|Table of Contents|
Introduction - Key Concepts
The cut scene editor is a little different to what you will have become accustomed to while learning to use the Sandbox Editor, and there are a few key concepts that you need to understand, especially if you have never used a sequence editor before.
These key concepts are:
- Timer Indicator Bar
Any key that falls under the Timer Indicator Bar as it moves across the track, becomes active.
Creation of a sequence
To create a movie sequence open a level you designed in the editor and make the Track View panel show up by selecting menu option "View / -> Open View Pane / -> Track View".
You can Click on Sequence -> New Sequence option:
Or click on the Add Sequence icon to create a new sequence:
You will get an empty sequence to which you can add your Camera nodes, entities, etc.
Before creating your Track View sequence, make sure you have added a new layer. This allows you to export your layer and re-import only your Track View Sequence without modifying any other objects in your level.
The Track View is stored in a container object of same name (which is always created at 0,0,0). You can move this Sequence Object as it's transformation does not affect the sequence.
In the example pictures above, the Track View Sequence Object is created on the CutScene layer
Any object in a level may be modified in a sequence in terms of position, rotation, event handling and special properties. For example if an animated character is added to the sequence, one is able to set markers to play facial animations or play sounds at a given time.
That way, the system allows a designer to have full control over the world he places a movie in. As an example of how to attach and modify objects, a camera is being added to and moved through the terrain in a sequence:
- First of all drag a new camera in to your level from the RollupBar and keep it selected.
- Add the camera to your sequence by right clicking "Add Selected Entity Node" on the sequence main node.
Adding a camera entity.
To construct a movement of the camera:
- Move the time tracker to any time position
- Press the record icon in order to signal the Track View that positioning and rotating the camera are meant to be stored in the track instead of the level.
- Move and rotate the camera in your level and Track View will automatically generate corresponding markers on the track at a given time.
- You can also navigate your camera in the viewport and record your keys. Please refer to Animating the Camera by Moving the Viewport document for detailed steps.
- Press the Play icon or move the time track bar back and forth in order to see the result of moving the camera.
All cameras added to a track can be set to be used as viewpoint in order to show a sequence from different perspectives.
To set the viewpoint to a camera at a specific time, a Director(scene) node has to be added from the context menu of the sequence.
The new Director node will already have a camera track, which is meant to contain viewpoint settings. Double clicking on the camera track at a specific time will add a new key frame.
Setting up a camera to be use as viewpoint in a sequence.
The easiest way to trigger a sequence is to attach it to a trigger object such as a ProximityTrigger which can be positioned in the level.
By building a Flow Graph that connects the trigger output of the ProximityTrigger to the start trigger of a PlaySequence flow graph node, one can easily activate a sequence by having a player entering the ProximityTrigger in game.
FlowGraph starting a sequence after a ProximityTrigger has been activated.
Description and How-to
Scrubbing the timeline
Click the time bar to make the time slider jump to that position; clicking and holding will allow the scrubbing of the time slider.
Adjusting Key Frames
Click a key frame to select it. A yellow line will be displayed; click and hold the key frame to slide it back and forth, to adjust the timing.
Adjusting Multiple Key Frames
Click and drag in the empty space to group select key frames, for adjusting multiple keys at a time.
Zooming the Timeline
For zooming the timeline in and out, make sure that the Track View is active and use the middle mouse button wheel, along with scrolling.
Duplicating Keys on a Track
Position the mouse pointer over the key that needs to be duplicated, and then hold down Shift and click the key. The new key will be positioned directly on top of the old one. Continue to hold down and drag the key to the desired time.
Copy and Paste Between Two Entities
First, select the keys that are to be copied. Hold down Ctrl and press C. Then, move the mouse pointer over the track of the entity that you wish to paste the key frames into. Hold down Ctrl and press V.
Each entity supports multiple tracks. A track is where keys are edited to create the animated sequence. By adding multiple entities with the desired tracks, complex scenes can be constructed.
The first node that is generally always required is the Scene Node. It contains the tracks for the high-level components of the scene.
- Camera: The camera track is used to select which camera the scene will be using at a particular time; multiple camera keys can be added to achieve camera cuts.
- Sound: Sounds can be added like other entities. However, the sound track plays sounds relative to the camera view. This is useful for fp dialogue as it will be non-directional, as the camera moves around.
- Sequence: The sequence track is used for embedding other Track View sequences within the scene.
- Console: The console track enables various console variables (CVars) to be set and adjusted over time; for example, r_gamma.
- Music: This enables a music mood to be set.
- GoTo: This enables you to skip directly to a specific time in the sequence.
- Timewarp: The slow motion effect can be achieved using the Timewarp track in Trackview.
- FixedTimeStep: Allows you to set a fixed time step. This is used to lower the game speed, to achieve a constant frame rate.
- fixed_time_step 0.0 for default game play speed
- fixed_time_step 0.03333 for a frame rate of 30 fps
- fixed_time_step 0.04 for a frame rate of 25 fps
Animation curves are standard in professional animation packages and are great visual representations of animation data.
Example of how the curve editor should be used in tandem with the trackview
The postion, rotation, and scale values can now be manipulated by using a powerful curve editor, similar to 3ds Max or Maya.
The position, rotation, and scale are now broken down into there three axes, x, y, and z. This enables direct control over each axis and ensures that the changes made to one axis don't affect another axis.
With the old system, a position key would have been placed for each rise and drop in the movement. If you needed to increase or decrease the amplitude of the head bob, it would have required the re-adjustment of each individual key, which is tedious and time consuming.
z-axis, showing the head bob
Adjusting the z-axis curve results in a lesser head bob
LookAt and Animation Key Properties
LookAt Track Key Properties
Selects the entity that needs to be the LookAt target.
Filters the objects that are affected by the LookAt; Eyes is eyes only.
Animation Track Key Properties
Selects that animation that needs to be played; this option is available only if the entity supports/has animations (the animations are referenced in the .chrparams file or as a .cga contained within the file).
Loops the animation.
Unloads the entity from the memory.
Plays the animation, without moving the entity from its origin, even if it is a part of the animation.
Sets the amount of blending that should be used, if there is an earlier animation.
Sets when the animation should start (for example, if the animation is 10 seconds long and you specify 5 seconds in this field, the animation won't play for the first 5 seconds, but will immediately start at the 5th second.
Speeds up or slows down the animation.
Input field that determines which sequence to play
When triggered, the scene will start
When triggered, the scene will stop
When the sequence is stopped, by default, the time slider will go to the very last frame and trigger the logic; this can be useful because when a scene is skipped, you can still trigger all the logic and positional info on that last frame, and this option will overwrite that logic
If a value is stated in the game, the camera will take the value to blend to the Track View camera; this is used for making a smoother transition from the game to the cutscene
It is similar to BlendPosSpeed, but for rotational values
Blends the end camera position to the player's position, smoothing out the transition from the cutscene to the game
Triggers the output when the scene starts
Triggers the output whether the scene has finished by itself or has been skipped by the user
Triggers the output only if the scene finishes without being interrupted by the user
Triggers only if the scene is stopped or skipped by the user
To start animating, the entity keys can be manually added in the Track View. Their values can be adjusted in the Key Properties section by adjusting the positional, rotational, and scale values over time.
Track view sequence (manually added multiple keys and the key properties adjusted over time)
A useful technique for using the Track View and flow graph together is to send events by using trigger entities. Trigger entities send events to the flow graph to trigger flow graph nodes. Time delay nodes can be used, but are more difficult when adjusting the timing. They also pose issues when a scene is skippable because the logic will continue.
The Track View above has the AreaTrigger4, which triggers a Leave event at 11 seconds; when this is triggered, it will fire a port in the Flow Graph.
The properties of a sequence may be modified by clicking on the Edit Sequence icon, as shown below. There one can define whether the player will keep control over the scene as well as the appearance, such as screen format and HUD visibility.
A cut scene example from the PacificIsland level defined by editing the properties.