Trackview

From CryWiki

Jump to: navigation, search

The Trackview Editor is an extremely powerful animation editor built into Sandbox2. With Trackview you can create almost any scene or animation you wish, from a full blown action cutscene to a simple door opening animation that can be triggered when the player uses the door. This article will cover its basic usage and how you can use it effectively.

Contents

Overview

The Track view is the tool used for making no interactive scenes that are pre determined like cinematic cut scenes, or scripted events.

Included in the CryENGINE® 2 Sandbox editor is a powerful cut-scene editor, which allows you to sequence objects, animations, sounds, etc. into a scene which 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. The system will be familiar to anyone who has used animation software like 3D Studio Max, but this brief guide will help those of you unfamiliar with cut scene editors to start creating simple scenes for your levels.

Introduction - Key Concepts

The cut scene editor is a little bit different to what you will have become accustomed to while learning the sandbox editor, and there are a few key concepts that relate to it that you need to understand, especially if you have never used a sequence editor before. These key concepts are:

  • Sequence
  • Node
  • Track
  • Key
  • Timer Indicator Bar

The sequence is the cut scene itself, and for each sequence you can add a number of nodes for each object that you use, including the top level node of the scene itself which is created with the camera icon on the tool bar. For each node that you have, you can have a number of tracks, depending on what kind of node it is. A camera node can only have the default tracks of FOV, Position and Rotation, plus an events track, but an animated object like a Korean Soldier can have many more. Each track is measured in seconds, and has points marked on it to indicate where a sound starts, or where an object will be at that particular time. Each section of a track’s time is marked off by a Timer Indicator Bar, which moves across the track from left to right as the sequence is played. Any key that falls under the Timer Indicator Bar as it moves across the track becomes active.

Track View Editor Overview/Elements










1. Sequence Tool Bar: contains the icons used for editing sequences.

Image:TrackViewRef_image003.jpg

2. Node hierarchy window: area where the components of the scene are displayed, elements can be added here by alternative right clicking in the white space.

Image:TrackViewRef_image004.jpg

3. Timeline: time display of the length of scene and where the scene currently resides.

Image:TrackViewRef_image005.jpg

4. Key editing window: area displays the sequence key frames and where certain events occur, this is where the majority of editing the scene occurs













Sequence Tool Bar - Icons And Their Functions

The cut scene editor has no pull down menus, although each icon does have a roll over hint to remind you what it does.

The Sequencer Tool Bar

Image:TrackViewRef_image003.jpg

  • <EMIT </img> Add Sequence: used to create and add new sequences.
  • <EMIT </img> Delete Sequence: used to delete an existing sequence.
  • <EMIT </img> Edit Sequence: used to edit the sequence properties of an existing sequence.


Track view properties window

Image:TrackViewRef_image010.jpg

  • Properties
o Sequence Name: contains the name of the current sequence.
o Play On Load: plays the scene when the level starts.
o NoSeek: disables the sequence from being randomly seeked.
o Cut Scene: enables the scene to have 16:9 bars.
  • Cut-Scene Toggles
o Disable HUD: disable the default HUD during the scene.
o Disable Player: hides the player during the scene.
o 16:9: applies cinema style black bars to the scene.
o Non-Skippable: makes the scene uninterruptible by the player when checked.
o Disable Physics: disables physical collisions, useful for performance
o Disable AI: useful to stop systematic AI interfering with scene, useful for performance.
o Disable Sounds: disables sounds that are not in the Track view, useful for disabling systematic sounds from AI which can interfere with the scene.
  • Timing
o Start Time: sets the time the sequence will start at.
o End Time: sets the time the sequence will end.


  • Out of Range


  • Rescale Timing
o Length: rescales the scene to the length you specify in seconds


4. Image:TrackViewRef_image011.jpg

Drop down selection box for selecting which scene is to be worked on.

5. *Image:TrackViewRef_image012.jpg

Add Selected Node: * adds a selected entity to the track view

6. *Image:TrackViewRef_image013.jpg

Add Scene Node: * adds the scene track to the track view, the scene track contains the high level components of the scene like the camera to be used.

Playback controls

Image:TrackViewRef_image014.jpg

7. <EMIT </img> Go to start of sequence:
8. <EMIT </img> Play:
9. <EMIT </img> Drop down selection for playback speed: Playback speed can be adjusted be selecting different values
10. <EMIT </img> Stop:
1. <EMIT </img> Pause:
2. <EMIT </img> Go to end of sequence:
3. <EMIT </img> Record: When active, an entity which is selected and contained in the Track view will have its position recorded at the current frame.
4. <EMIT </img> Loop: loops the scene back to start when finished
5. <EMIT </img> Undo:
6. <EMIT </img> Redo:
7. <EMIT </img> Go to previous key: moves the time slider to the previous frame on the track
8. <EMIT </img> Go to next key: moves the time slider to the next frame on the track
9. <EMIT </img> Copy all keys to selected track: copies a selected key in a selected track
10. <EMIT </img> Move keys: moves the selected key back and forth when dragged
11. <EMIT </img> Slide keys: moves the selected key and all keys proceeding it back and forth when dragged.
12. <EMIT </img> Scale keys: scales the selected key and all the keys proceeding it when dragged.
13. <EMIT </img> Add key: adds key frame to the selected track can also be done by double clicking in the timeline track.
14. <EMIT </img> Delete key: deletes key, can also be done by selecting a key in the track and pressing delete key
15. Image:TrackViewRef_image033.jpg

Time display the time slider is currently on.

Track View Navigation

Useful Shortcuts

Scrubbing the timeline, click on time bar to make the time slider jump to that position, click and holding will allow scrubbing of the time slider.

Image:TrackViewRef_image034.jpg

Adjusting Key Frames
Sliding keys, click on a key frame to select it, a yellow line will appear, click and hold the key frame to slide back and forth to adjust 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
Zooming the timeline in and out, make sure track view window is active and use the middle mouse button wheel while scrolling to zoom in and out
Duplicating Keys On A Track
Position the mouse over the key to be duplicated, hold shift then left click the key, a new key should be positioned directly on top of the old one, continue too hold down lift click to drag the key to the desired time.
Copy And Paste Functionality Between Two Entities
First select the key/s that are to be copied, while selected press (ctrl+c) Then move the mouse over the track of the entity you wish to paste the key frames into. (crtl+v) note, keys can only be copied and pasted between similar tracks, i.e. between the positional tracks of two entities.

Tracks And Properties

Each entity supports multiple tracks, the “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 which is generally always required is the Scene Node, it contains the tracks for the high level components for the scene.

There are many tracks in total, certain tracks are only available if the entity supports them,

animObject1 with multiple tracks
animObject1 with multiple tracks













Position:
Animates the entities position in world space.
Rotation:
Animates the entities rotation in world space.
Event:
Contains a list of event options that relate to the entity, for example unhide and hide on specific frames.

The following tracks need to be added manually.

Scale:
Animates the entities scale in world space.
Visibility:
Animates if the entity is visible or not Sound, plays a sound at the specific times, can be and effect or dialogue.
Animation:
Plays an animation on the entity, animations need to be in the .cal or in a .cga.
Facial Sequence:
Plays a facial sequence that has been created in the facial editor.
Look At:
Procedurally controls the character entity to look at a specific entity using head and or eye movement.
Camera:
The camera also has its own special FOV track for adjusting the camera field of view during the scene.
The Scene track is slightly different to other entities which are added to the track view.

Image:TrackViewRef_image036.jpg

Scene node with tracks

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, owever the sound track plays sounds relative to the camera view, for example its useful for fp dialogue as it will 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:
Enables a music mood to be set.

Adding And Removing Tracks On An Entity

Additional tracks can be added to entities for additional functions, by default the basic tracks are only added when an entity is added to the Track view.

Also tracks can be removed from an entity, this is useful for keeping the Track view clean from un needed visual clutter.

Note
Only entities can be added, brushes cannot be added to the track view.

Adding An Additional Track

Simply right click on the entity in the hierarchy section to display options, mouse down to add track and select the desired track to be added, note that different entity types have different parameters and that certain tracks can only be added for certain entities.

To remove a track simply right click on entity and select Remove Node.

Image:TrackViewRef_image037.jpg

Note
Its also possible to double click an entity in the tree view to select it.

Key Properties

Once keys have been added to a specific track the key properties is required to select the desired function.

By right or double clicking on a key the key properties can be opened. The properties window will differ depending on the track type being edited.

Positional, rotational and scale key properties.

Image:TrackViewRef_image038.jpg

Values can be adjusted in here more precisely than dragging objects around in the view ports.

Ease To:
Values from the previous key in the track will ease to the next keys value.
Ease From:
Values from the current key ease to the next key.
Tension:
Raising the tension increases the influence this key has over time.
Continuity:
Raising the continuity will cause values between multiple keys to from an angular animation path while a low value will have a smooth animation path.
Bias:
Shifts the animation paths influence to either side of the key.
Time:
Indicates which time the frame occurs on in the timeline.

Look IK Key Properties

Select Node:
Selects the entity to be the look at target.
Manipulated Bones:
Filters the objects that are effected by the look at, eye is eyes only.

Image:TrackViewRef_image039.jpg

Animation track key properties

Image:TrackViewRef_image040.jpg

Start animation:
Selects that animation to be played on the entity, note, this option is only available if entity supports/has animations, the animations are referenced in the “.cal” animation file or as a “.cga” contained within the file.
Loop animation:
Loops.
Root not move:
Useful for animations that offset from the origin over time.
Speed:
Used to speed up and slow down animations.

Playing the Scene

A basic flow graph needs to be created for playing a Track view sequence, the flow graph node that is responsible for playing a sequence is found under Animations:PlaySequence,

Image:TrackViewRef_image041.jpg

Overview of the Flow Graph node

Inputs On Left

Sequence
Input field for sequence to play.
StartTrigger
When triggered will start the scene.
StopTrigger
When triggered will stop the scene.
BreakOnStop
When the sequence is stopped; by default the time slider will go to the very last frame and trigger logic, this can be useful for when a scene is skipped; you can still trigger all the logic and positional info on that last frame, this will option will overwrite that logic.
BlendPosSpeed
If a value is stated the game camera will take the value to blend to the Track view camera, used for making the transition from game to cutscene smoother.
BlendRotSpeed
Same as above but for rotational values.
PerformBlendOut
Blends the end camera position to the player position, smoothing out transition from cutscene to gameplay.

Outputs On Right

Started
Triggers output when the scene has started.
Done
Triggers output whether the scene has finished by itself or if skipped by the user.
Finished
Only triggers if scene finishes with out being interrupted by user.
Aborted
Only triggers if the scene if stopped or skipped by user.

Grouping Entities

By attaching related entities to a common parent, assets can be organized into a more manageable hierarchy.

Image:TrackViewRef_image042.jpg

Note
To attach entities together and create a hierarchy first in the menu select Group>Attach, once selected, select the child then select the parent, the entities will now be linked and by manipulating the parent the child will also follow.

If an entity has a parent it will be grouped under that parent if both parent and child are added to the Track view, this is useful for organizing entities













Example of plane_animObject with attached entity hierarchy

If the entities tree is minimised all the children entities will also be hidden underneath it, this is a nice way to keep the Track view uncluttered. Animating entities with key frame animation

Basic object animation can be achieved in the Track view, using positional rotational and scale tracks,

To start animating the entity keys can be manually added in the Track view and there values adjusted in the Key Properties by adjusting positional, rotational and scale values over time.














Track view sequence by manually added multiple keys and adjusting the key properties over time.

A more effective method however is to work by manually manipulating the entity in the view ports and recording the movements,

Image:TrackViewRef_image045.jpg

Note
With the record button clicked, and AnimObject1 selected, any movement in the 3d viewport of the entity will automatically be recorded in the Track view, simply move the time slider along to record various positions at different times.

First make sure the entity you wish to animate is added to the Track view, once added make sure it is selected then click the record icon, with the record icon depressed any movement applied to the selected entity will be recorded into the Track view at the current time, to add more keys simply move the track view time slider to another time and adjust the entity to the desired position, there will now be keys frames that the Track view will interpolate between animating the entity.

Animating Camera’s With Key Frame Animation

Basic camera animation is very similar to object animation except instead of manipulating the camera from a third person perspective it is possible to look through the camera you are animating to get an exact representation of what the camera will look like in the scene.

By default new manually placed cameras are locked, first they need to be unlocked,

Image:TrackViewRef_image046.jpg

In the top left of the view point right click and uncheck the “lock camera movement” option, this option will only be visible if you have first added a camera to the scene, next the record button needs to be selected in the Track view.

Again simply position the camera where desired at a given time then while the record button continues to be active move the time slider to a new time and reposition the camera, continue this process to get the desired camera movement.

The cameras “FOV” Field Of View can be animated by adding keys to the FOV track and adjusting the FOV key properties at specific intervals.

Track View, Flow Graph Relation Integration

Certain features required for creating cinematic effects are only contained within the flow graph, in order to access these effects a bridge between the flow graph and the track view needs to be created.

A useful technique for using the Track view and flow graph together is to send events using trigger entities that send events to the flow graph to trigger flow graph nodes, time delay nodes can be used but are more fiddly when adjusting timing and also pose issues when a scene is skippable as the logic will continue,














Note
The Track view above has an AreaTrigger “cine_FadeOut_DT” which triggers a leave event at 11 seconds, when this is triggered it will fire a port in the Flow Graph.

First place an AreaTrigger into the scene and add it to the track view, under the event track add a key frame where you want to trigger a certain event in the flow graph, in the key properties select for example Leave, now add this same trigger into the flow graph, when the Track view plays over this key it will send an output from the AreaTrigger’s “Leave” output port, this can be connected with a flow graph node to trigger cinematic effects, i.e. a camera fade.

Skippable Scene Logic

When a track view sequence is skipped in game, the track view by default will still trigger all logic which is placed on the final frame in the Track view. This can be very useful if your scene requires heavy post scene clean up to hide entities specific for the scene.
















Track view sequence with keys setup on last frame for post scene clean up.

For example, on a sound entity it can be useful to have a “stop” key frame in the event track on the final frame, this means that if the cutscene is half way through playing a sound effect, if the user skips the scene the sound will be stopped, other wise the sound will continue to play after the scene creating a undesired effect.

It is much cleaner/bug free to place event keys on the final frame to clean up the end of a scene, than to place multiple flow graph nodes to achieve the same after a scene has finished.

Capturing Scenes To Disk For Pre Rendered Scenes And/Or Post

As a track view sequence is pre determined and camera movement is precise the ability to record them to a movie format is useful.

Possible for promotional work or if its decided to pre render the scene for fluctuating frame rate issues.

Cryengine 2 incorporates a system for frame by frame capturing that can later be complied into a movie format.

By using a few c_vars frames can be rendered into a local folder

The captured images are by default placed in the root directory off the game inside a folder called “CaptureOutput”

The following c_vars are useful for frame by frame capturing.

fixed_time_step
Used to the 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.
capture_frames
capture_frames 1, enables capturing of frames capture_frames 0, disables capturing of frames.
capture_file_format
Set the output format for the images.
capture_file_format jpg capture_file_format targa.

Once the frames have been captured a third party application needs to be used to compile the frames into a movie format.

Layers

The layer system within CryENGINE® 2 helps in organizing assets into workable groups, and helps avoid accidentally manipulating unrelated assets.

By using the layer system in a production environment its also possible for multiple designers to be working on the same level and for the cinematic team to work on the same level at the same time as the level designers.

Image:TrackViewRef_image049.jpg

The layer panel in the RollUpBar

For each cinematic first create a new external layer.

Image:TrackViewRef_image050.jpg

Once you have created new external layers for the required number of scenes, simple make sure you have the layer you want to work on selected, this insures new assets will only by placed on this layer.

Image:TrackViewRef_image051.jpg

Also by only having the layer you wish to work on editable, this is shown by the arrow, you can avoid accidentally adding entities to the incorrect layers, and disturbing previous work.

Another useful workflow tip is to rigorously name every asset in the cine layer with a cine_x prefix, this becomes invaluable during debugging as any problematic asset can then be traced to the specific layer and the designer responsible.

Now any entity that is now added to the level will automatically be added to the selected layer, when the level is saved, this layer will be also saved, it is then possible to work on this layer separately from someone working on the main level .cry file and later re import it into the main level for a latest version of the level.

Personal tools